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 377d9ba2d8e..59fba9ca6ba 100644 --- a/pkg/controller/volume/attachdetach/cache/actual_state_of_world.go +++ b/pkg/controller/volume/attachdetach/cache/actual_state_of_world.go @@ -131,8 +131,8 @@ type ActualStateOfWorld interface { type AttachedVolume struct { operationexecutor.AttachedVolume - // MountedByNode indicates that this volume has been been mounted by the - // node and is unsafe to detach. + // MountedByNode indicates that this volume has been mounted by the node and + // is unsafe to detach. // The value is set and unset by SetVolumeMountedByNode(...). MountedByNode bool @@ -473,7 +473,7 @@ func (asw *actualStateOfWorld) updateNodeStatusUpdateNeeded(nodeName types.NodeN nodeToUpdate, nodeToUpdateExists := asw.nodesToUpdateStatusFor[nodeName] if !nodeToUpdateExists { // should not happen - errMsg := fmt.Sprintf("Failed to set statusUpdateNeeded to needed %t because nodeName=%q does not exist", + errMsg := fmt.Sprintf("Failed to set statusUpdateNeeded to needed %t, because nodeName=%q does not exist", needed, nodeName) return fmt.Errorf(errMsg) } diff --git a/pkg/controller/volume/attachdetach/cache/desired_state_of_world.go b/pkg/controller/volume/attachdetach/cache/desired_state_of_world.go index 2de32e164bf..8e9fdd78042 100644 --- a/pkg/controller/volume/attachdetach/cache/desired_state_of_world.go +++ b/pkg/controller/volume/attachdetach/cache/desired_state_of_world.go @@ -40,14 +40,14 @@ import ( // should be attached to the specified node, and pods are the pods that // reference the volume and are scheduled to that node. // Note: This is distinct from the DesiredStateOfWorld implemented by the -// kubelet volume manager. The both keep track of different objects. This +// kubelet volume manager. They both keep track of different objects. This // contains attach/detach controller specific state. type DesiredStateOfWorld interface { // AddNode adds the given node to the list of nodes managed by the attach/ // detach controller. // If the node already exists this is a no-op. // keepTerminatedPodVolumes is a property of the node that determines - // if for terminated pods volumes should be mounted and attached. + // if volumes should be mounted and attached for terminated pods. AddNode(nodeName k8stypes.NodeName, keepTerminatedPodVolumes bool) // AddPod adds the given pod to the list of pods that reference the @@ -167,7 +167,7 @@ type nodeManaged struct { // The volumeToAttach object represents a volume that should be attached to a node. type volumeToAttach struct { // multiAttachErrorReported indicates whether the multi-attach error has been reported for the given volume. - // It is used to to prevent reporting the error from being reported more than once for a given volume. + // It is used to prevent reporting the error from being reported more than once for a given volume. multiAttachErrorReported bool // volumeName contains the unique identifier for this volume. @@ -235,7 +235,8 @@ func (dsw *desiredStateOfWorld) AddPod( attachableVolumePlugin, volumeSpec) if err != nil { return "", fmt.Errorf( - "failed to GetUniqueVolumeNameFromSpec for volumeSpec %q err=%v", + "failed to get UniqueVolumeName from volumeSpec for plugin=%q and volume=%q err=%v", + attachableVolumePlugin.GetPluginName(), volumeSpec.Name(), err) }