Handle os.MkdirAll error

Signed-off-by: PingWang <wang.ping5@zte.com.cn>
This commit is contained in:
PingWang 2022-06-30 16:25:35 +08:00
parent 91aca10d59
commit 1061c4f6d0
2 changed files with 6 additions and 2 deletions

View File

@ -340,7 +340,9 @@ func (cephfsVolume *cephfs) execFuseMount(mountpoint string) error {
klog.V(4).Info("cephfs mount begin using fuse.")
keyringPath := cephfsVolume.GetKeyringPath()
os.MkdirAll(keyringPath, 0750)
if err := os.MkdirAll(keyringPath, 0750); err != nil {
return err
}
payload := make(map[string]util.FileProjection, 1)
var fileProjection util.FileProjection

View File

@ -247,7 +247,9 @@ func (mounter *quobyteMounter) SetUpAt(dir string, mounterArgs volume.MounterArg
return nil
}
os.MkdirAll(dir, 0750)
if err := os.MkdirAll(dir, 0750); err != nil {
return err
}
var options []string
options = append(options, "allow-usermapping-in-volumename")
if mounter.readOnly {