mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-18 16:21:13 +00:00
return NodeStageVolume/NodePublishVolume error if operation failed
This commit is contained in:
parent
34001d8c6a
commit
23dbd69925
@ -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 {
|
|||||||
|
|
||||||
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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user