mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
Revert "Merge pull request #87258 from verult/slow-rxm-attach"
This reverts commit15c3f1b119, reversing changes made to52d7614a8c.
This commit is contained in:
@@ -138,9 +138,9 @@ type OperationExecutor interface {
|
||||
// back off on retries.
|
||||
VerifyControllerAttachedVolume(volumeToMount VolumeToMount, nodeName types.NodeName, actualStateOfWorld ActualStateOfWorldAttacherUpdater) error
|
||||
|
||||
// IsOperationPending returns true if an operation for the given volumeName
|
||||
// and one of podName or nodeName is pending, otherwise it returns false
|
||||
IsOperationPending(volumeName v1.UniqueVolumeName, podName volumetypes.UniquePodName, nodeName types.NodeName) bool
|
||||
// IsOperationPending returns true if an operation for the given volumeName and podName is pending,
|
||||
// otherwise it returns false
|
||||
IsOperationPending(volumeName v1.UniqueVolumeName, podName volumetypes.UniquePodName) bool
|
||||
// ExpandInUseVolume will resize volume's file system to expected size without unmounting the volume.
|
||||
ExpandInUseVolume(volumeToMount VolumeToMount, actualStateOfWorld ActualStateOfWorldMounterUpdater) error
|
||||
// ReconstructVolumeOperation construct a new volumeSpec and returns it created by plugin
|
||||
@@ -650,11 +650,8 @@ type operationExecutor struct {
|
||||
operationGenerator OperationGenerator
|
||||
}
|
||||
|
||||
func (oe *operationExecutor) IsOperationPending(
|
||||
volumeName v1.UniqueVolumeName,
|
||||
podName volumetypes.UniquePodName,
|
||||
nodeName types.NodeName) bool {
|
||||
return oe.pendingOperations.IsOperationPending(volumeName, podName, nodeName)
|
||||
func (oe *operationExecutor) IsOperationPending(volumeName v1.UniqueVolumeName, podName volumetypes.UniquePodName) bool {
|
||||
return oe.pendingOperations.IsOperationPending(volumeName, podName)
|
||||
}
|
||||
|
||||
func (oe *operationExecutor) AttachVolume(
|
||||
@@ -663,13 +660,8 @@ func (oe *operationExecutor) AttachVolume(
|
||||
generatedOperations :=
|
||||
oe.operationGenerator.GenerateAttachVolumeFunc(volumeToAttach, actualStateOfWorld)
|
||||
|
||||
if util.IsMultiAttachForbidden(volumeToAttach.VolumeSpec) {
|
||||
return oe.pendingOperations.Run(
|
||||
volumeToAttach.VolumeName, "" /* podName */, "" /* nodeName */, generatedOperations)
|
||||
}
|
||||
|
||||
return oe.pendingOperations.Run(
|
||||
volumeToAttach.VolumeName, "" /* podName */, volumeToAttach.NodeName, generatedOperations)
|
||||
volumeToAttach.VolumeName, "" /* podName */, generatedOperations)
|
||||
}
|
||||
|
||||
func (oe *operationExecutor) DetachVolume(
|
||||
@@ -682,13 +674,8 @@ func (oe *operationExecutor) DetachVolume(
|
||||
return err
|
||||
}
|
||||
|
||||
if util.IsMultiAttachForbidden(volumeToDetach.VolumeSpec) {
|
||||
return oe.pendingOperations.Run(
|
||||
volumeToDetach.VolumeName, "" /* podName */, "" /* nodeName */, generatedOperations)
|
||||
}
|
||||
|
||||
return oe.pendingOperations.Run(
|
||||
volumeToDetach.VolumeName, "" /* podName */, volumeToDetach.NodeName, generatedOperations)
|
||||
volumeToDetach.VolumeName, "" /* podName */, generatedOperations)
|
||||
}
|
||||
|
||||
func (oe *operationExecutor) VerifyVolumesAreAttached(
|
||||
@@ -774,7 +761,7 @@ func (oe *operationExecutor) VerifyVolumesAreAttached(
|
||||
|
||||
// Ugly hack to ensure - we don't do parallel bulk polling of same volume plugin
|
||||
uniquePluginName := v1.UniqueVolumeName(pluginName)
|
||||
err = oe.pendingOperations.Run(uniquePluginName, "" /* Pod Name */, "" /* nodeName */, generatedOperations)
|
||||
err = oe.pendingOperations.Run(uniquePluginName, "" /* Pod Name */, generatedOperations)
|
||||
if err != nil {
|
||||
klog.Errorf("BulkVerifyVolumes.Run Error bulk volume verification for plugin %q with %v", pluginName, err)
|
||||
}
|
||||
@@ -792,7 +779,7 @@ func (oe *operationExecutor) VerifyVolumesAreAttachedPerNode(
|
||||
}
|
||||
|
||||
// Give an empty UniqueVolumeName so that this operation could be executed concurrently.
|
||||
return oe.pendingOperations.Run("" /* volumeName */, "" /* podName */, "" /* nodeName */, generatedOperations)
|
||||
return oe.pendingOperations.Run("" /* volumeName */, "" /* podName */, generatedOperations)
|
||||
}
|
||||
|
||||
func (oe *operationExecutor) MountVolume(
|
||||
@@ -833,7 +820,7 @@ func (oe *operationExecutor) MountVolume(
|
||||
|
||||
// TODO mount_device
|
||||
return oe.pendingOperations.Run(
|
||||
volumeToMount.VolumeName, podName, "" /* nodeName */, generatedOperations)
|
||||
volumeToMount.VolumeName, podName, generatedOperations)
|
||||
}
|
||||
|
||||
func (oe *operationExecutor) UnmountVolume(
|
||||
@@ -864,7 +851,7 @@ func (oe *operationExecutor) UnmountVolume(
|
||||
podName := volumetypes.UniquePodName(volumeToUnmount.PodUID)
|
||||
|
||||
return oe.pendingOperations.Run(
|
||||
volumeToUnmount.VolumeName, podName, "" /* nodeName */, generatedOperations)
|
||||
volumeToUnmount.VolumeName, podName, generatedOperations)
|
||||
}
|
||||
|
||||
func (oe *operationExecutor) UnmountDevice(
|
||||
@@ -895,7 +882,7 @@ func (oe *operationExecutor) UnmountDevice(
|
||||
podName := nestedpendingoperations.EmptyUniquePodName
|
||||
|
||||
return oe.pendingOperations.Run(
|
||||
deviceToDetach.VolumeName, podName, "" /* nodeName */, generatedOperations)
|
||||
deviceToDetach.VolumeName, podName, generatedOperations)
|
||||
}
|
||||
|
||||
func (oe *operationExecutor) ExpandInUseVolume(volumeToMount VolumeToMount, actualStateOfWorld ActualStateOfWorldMounterUpdater) error {
|
||||
@@ -903,7 +890,7 @@ func (oe *operationExecutor) ExpandInUseVolume(volumeToMount VolumeToMount, actu
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return oe.pendingOperations.Run(volumeToMount.VolumeName, "", "" /* nodeName */, generatedOperations)
|
||||
return oe.pendingOperations.Run(volumeToMount.VolumeName, "", generatedOperations)
|
||||
}
|
||||
|
||||
func (oe *operationExecutor) VerifyControllerAttachedVolume(
|
||||
@@ -917,7 +904,7 @@ func (oe *operationExecutor) VerifyControllerAttachedVolume(
|
||||
}
|
||||
|
||||
return oe.pendingOperations.Run(
|
||||
volumeToMount.VolumeName, "" /* podName */, "" /* nodeName */, generatedOperations)
|
||||
volumeToMount.VolumeName, "" /* podName */, generatedOperations)
|
||||
}
|
||||
|
||||
// ReconstructVolumeOperation return a func to create volumeSpec from mount path
|
||||
|
||||
Reference in New Issue
Block a user