Commit 23dbd699 authored by mlmhl's avatar mlmhl

return NodeStageVolume/NodePublishVolume error if operation failed

parent 34001d8c
...@@ -352,9 +352,8 @@ func (c *csiAttacher) MountDevice(spec *volume.Spec, devicePath string, deviceMo ...@@ -352,9 +352,8 @@ func (c *csiAttacher) MountDevice(spec *volume.Spec, devicePath string, deviceMo
if err != nil { if err != nil {
glog.Errorf(log("attacher.MountDevice failed: %v", err)) glog.Errorf(log("attacher.MountDevice failed: %v", err))
if err := removeMountDir(c.plugin, deviceMountPath); err != nil { if removeMountDirErr := removeMountDir(c.plugin, deviceMountPath); removeMountDirErr != nil {
glog.Error(log("attacher.MountDevice failed to remove mount dir after a NodeStageVolume() error [%s]: %v", deviceMountPath, err)) glog.Error(log("attacher.MountDevice failed to remove mount dir after a NodeStageVolume() error [%s]: %v", deviceMountPath, removeMountDirErr))
return err
} }
return err return err
} }
......
...@@ -207,9 +207,8 @@ func (c *csiMountMgr) SetUpAt(dir string, fsGroup *int64) error { ...@@ -207,9 +207,8 @@ func (c *csiMountMgr) SetUpAt(dir string, fsGroup *int64) error {
if err != nil { if err != nil {
glog.Errorf(log("mounter.SetupAt failed: %v", err)) glog.Errorf(log("mounter.SetupAt failed: %v", err))
if err := removeMountDir(c.plugin, dir); err != nil { if removeMountDirErr := removeMountDir(c.plugin, dir); removeMountDirErr != nil {
glog.Error(log("mounter.SetuAt failed to remove mount dir after a NodePublish() error [%s]: %v", dir, err)) glog.Error(log("mounter.SetupAt failed to remove mount dir after a NodePublish() error [%s]: %v", dir, removeMountDirErr))
return err
} }
return err return err
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment