Merge pull request #69032 from mlmhl/azure_file_setup

return error if make dir failed when setting up azure file volume
pull/58/head
k8s-ci-robot 2018-09-29 22:21:58 -07:00 committed by GitHub
commit 9895e4e844
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -269,7 +269,9 @@ func (b *azureFileMounter) SetUpAt(dir string, fsGroup *int64) error {
if runtime.GOOS == "windows" {
mountOptions = []string{fmt.Sprintf("AZURE\\%s", accountName), accountKey}
} else {
os.MkdirAll(dir, 0700)
if err := os.MkdirAll(dir, 0700); err != nil {
return err
}
// parameters suggested by https://azure.microsoft.com/en-us/documentation/articles/storage-how-to-use-files-linux/
options := []string{fmt.Sprintf("username=%s,password=%s", accountName, accountKey)}
if b.readOnly {