mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
add and clear err message in RemoveVolumeFromReportAsAttached
This commit is contained in:
parent
b33c8153eb
commit
0861688237
@ -424,7 +424,7 @@ func (asw *actualStateOfWorld) removeVolumeFromReportAsAttached(
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return fmt.Errorf("volume %q or node %q does not exist in volumesToReportAsAttached list",
|
return fmt.Errorf("volume %q does not exist in volumesToReportAsAttached list or node %q does not exist in nodesToUpdateStatusFor list",
|
||||||
volumeName,
|
volumeName,
|
||||||
nodeName)
|
nodeName)
|
||||||
|
|
||||||
|
@ -150,7 +150,13 @@ func (rc *reconciler) reconcile() {
|
|||||||
|
|
||||||
// Before triggering volume detach, mark volume as detached and update the node status
|
// Before triggering volume detach, mark volume as detached and update the node status
|
||||||
// If it fails to update node status, skip detach volume
|
// If it fails to update node status, skip detach volume
|
||||||
rc.actualStateOfWorld.RemoveVolumeFromReportAsAttached(attachedVolume.VolumeName, attachedVolume.NodeName)
|
err = rc.actualStateOfWorld.RemoveVolumeFromReportAsAttached(attachedVolume.VolumeName, attachedVolume.NodeName)
|
||||||
|
if err != nil {
|
||||||
|
glog.V(5).Infof("RemoveVolumeFromReportAsAttached failed while removing volume %q from node %q with: %v",
|
||||||
|
attachedVolume.VolumeName,
|
||||||
|
attachedVolume.NodeName,
|
||||||
|
err)
|
||||||
|
}
|
||||||
|
|
||||||
// Update Node Status to indicate volume is no longer safe to mount.
|
// Update Node Status to indicate volume is no longer safe to mount.
|
||||||
err = rc.nodeStatusUpdater.UpdateNodeStatuses()
|
err = rc.nodeStatusUpdater.UpdateNodeStatuses()
|
||||||
|
Loading…
Reference in New Issue
Block a user