Skip to content

Commit

Permalink
Merge pull request #60400 from andyzhangx/automated-cherry-pick-of-#6…
Browse files Browse the repository at this point in the history
…0346-upstream-release-1.9

Automatic merge from submit-queue.

Automated cherry pick of #60346: fix device name change issue for azure disk

Cherry pick of #60346 on release-1.9.

#60346: fix device name change issue for azure disk
**Release note**:

```
fix disk unavailable issue when mounting multiple azure disks due to dev name change
```
  • Loading branch information
Kubernetes Submit Queue committed Mar 3, 2018
2 parents 136abdb + a3b31a9 commit d6f4eab
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkg/volume/azure_dd/azure_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ import (
)

const (
defaultFSType = "ext4"
defaultStorageAccountType = storage.StandardLRS
defaultAzureDiskKind = v1.AzureSharedBlobDisk
defaultFSType = "ext4"
defaultStorageAccountType = storage.StandardLRS
defaultAzureDiskKind = v1.AzureSharedBlobDisk
defaultAzureDataDiskCachingMode = v1.AzureDataDiskCachingNone
)

type dataDisk struct {
Expand Down Expand Up @@ -141,7 +142,7 @@ func normalizeStorageAccountType(storageAccountType string) (storage.SkuName, er

func normalizeCachingMode(cachingMode v1.AzureDataDiskCachingMode) (v1.AzureDataDiskCachingMode, error) {
if cachingMode == "" {
return v1.AzureDataDiskCachingReadWrite, nil
return defaultAzureDataDiskCachingMode, nil
}

if !supportedCachingModes.Has(string(cachingMode)) {
Expand Down

0 comments on commit d6f4eab

Please sign in to comment.