mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-22 02:18:51 +00:00
Remove needless checks for nodestage during expansion
This commit is contained in:
@@ -478,12 +478,7 @@ func (plugin *FakeVolumePlugin) NodeExpand(resizeOptions NodeResizeOptions) (boo
|
||||
return false, fmt.Errorf("Test failure: NodeExpand")
|
||||
}
|
||||
|
||||
// Set up fakeVolumePlugin not support STAGE_UNSTAGE for testing the behavior
|
||||
// so as volume can be node published before we can resize
|
||||
if resizeOptions.CSIVolumePhase == volume.CSIVolumeStaged {
|
||||
return false, nil
|
||||
}
|
||||
if resizeOptions.CSIVolumePhase == volume.CSIVolumePublished && resizeOptions.VolumeSpec.Name() == FailVolumeExpansion {
|
||||
if resizeOptions.VolumeSpec.Name() == FailVolumeExpansion {
|
||||
return false, fmt.Errorf("fail volume expansion for volume: %s", FailVolumeExpansion)
|
||||
}
|
||||
return true, nil
|
||||
|
Reference in New Issue
Block a user