mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Mark MountDevice as uncertain after failed resize
When NodeExpand fails between MountDevice and SetUp, make sure the next NodeExpand attempt is called before SetUp.
This commit is contained in:
parent
9a765f8c2d
commit
b3b53cbf63
@ -607,6 +607,17 @@ func (og *operationGenerator) GenerateMountVolumeFunc(
|
|||||||
|
|
||||||
if resizeError != nil {
|
if resizeError != nil {
|
||||||
klog.Errorf("MountVolume.NodeExpandVolume failed with %v", resizeError)
|
klog.Errorf("MountVolume.NodeExpandVolume failed with %v", resizeError)
|
||||||
|
|
||||||
|
// Resize failed. To make sure NodeExpand is re-tried again on the next attempt
|
||||||
|
// *before* SetUp(), mark the mounted device as uncertain.
|
||||||
|
markDeviceUncertainErr := actualStateOfWorld.MarkDeviceAsUncertain(
|
||||||
|
volumeToMount.VolumeName, devicePath, deviceMountPath)
|
||||||
|
if markDeviceUncertainErr != nil {
|
||||||
|
// just log, return the resizeError error instead
|
||||||
|
klog.Infof(volumeToMount.GenerateMsgDetailed(
|
||||||
|
"MountVolume.MountDevice failed to mark volume as uncertain",
|
||||||
|
markDeviceUncertainErr.Error()))
|
||||||
|
}
|
||||||
return volumeToMount.GenerateError("MountVolume.MountDevice failed while expanding volume", resizeError)
|
return volumeToMount.GenerateError("MountVolume.MountDevice failed while expanding volume", resizeError)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user