Merge pull request #38801 from nak3/nfs-mkdir

Automatic merge from submit-queue

Catch error when failed to make directory in NFS volume plugin

NFS: Catch error when failed to make directory

Currently, NFS volume plugin doesn't catch the error from
os.MkdirAll. That makes it difficult to debug why failed to make the
directory. This patch adds error catch to os.MkdirAll.
pull/6/head
Kubernetes Submit Queue 2017-04-07 16:48:46 -07:00 committed by GitHub
commit 854441643f
1 changed files with 3 additions and 1 deletions

View File

@ -246,7 +246,9 @@ func (b *nfsMounter) SetUpAt(dir string, fsGroup *int64) error {
if !notMnt {
return nil
}
os.MkdirAll(dir, 0750)
if err := os.MkdirAll(dir, 0750); err != nil {
return err
}
source := fmt.Sprintf("%s:%s", b.server, b.exportPath)
options := []string{}
if b.readOnly {