From 4a4940694f40e8d74b73e8dfdfcec9c953e3fbfe Mon Sep 17 00:00:00 2001 From: carlory Date: Thu, 9 Nov 2023 11:56:51 +0800 Subject: [PATCH] remove stale comments --- .../volume/attachdetach/cache/actual_state_of_world.go | 8 ++------ .../volume/attachdetach/reconciler/reconciler.go | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/pkg/controller/volume/attachdetach/cache/actual_state_of_world.go b/pkg/controller/volume/attachdetach/cache/actual_state_of_world.go index db79351be78..bfed9af1a5e 100644 --- a/pkg/controller/volume/attachdetach/cache/actual_state_of_world.go +++ b/pkg/controller/volume/attachdetach/cache/actual_state_of_world.go @@ -23,14 +23,13 @@ package cache import ( "fmt" - "k8s.io/klog/v2" "sync" "time" - "k8s.io/apimachinery/pkg/api/resource" - v1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" "k8s.io/apimachinery/pkg/types" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/volume" "k8s.io/kubernetes/pkg/volume/util" "k8s.io/kubernetes/pkg/volume/util/operationexecutor" @@ -64,9 +63,6 @@ type ActualStateOfWorld interface { // SetVolumeMountedByNode sets the MountedByNode value for the given volume // and node. When set to true the mounted parameter indicates the volume // is mounted by the given node, indicating it may not be safe to detach. - // If the forceUnmount is set to true the MountedByNode value would be reset - // to false even it was not set yet (this is required during a controller - // crash recovery). // If no volume with the name volumeName exists in the store, an error is // returned. // If no node with the name nodeName exists in list of attached nodes for diff --git a/pkg/controller/volume/attachdetach/reconciler/reconciler.go b/pkg/controller/volume/attachdetach/reconciler/reconciler.go index 45783e98ccc..ebc831dda32 100644 --- a/pkg/controller/volume/attachdetach/reconciler/reconciler.go +++ b/pkg/controller/volume/attachdetach/reconciler/reconciler.go @@ -191,7 +191,7 @@ func (rc *reconciler) reconcile(ctx context.Context) { // Because the detach operation updates the ActualStateOfWorld before // marking itself complete, it's possible for the volume to be removed // from the ActualStateOfWorld between the GetAttachedVolumes() check - // and the IsOperationPending() check above. + // and the IsOperationSafeToRetry() check above. // Check the ActualStateOfWorld again to avoid issuing an unnecessary // detach. // See https://github.com/kubernetes/kubernetes/issues/93902