mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +00:00
Merge pull request #60293 from tenxcloud/fix_volume_cache_grammar_error
Automatic merge from submit-queue (batch tested with PRs 57326, 60076, 60293, 59756, 60370). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Fix grammar issues and improve log in volume cache code **What this PR does / why we need it**: Fix grammar issues and improve log in volume cache code **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
This commit is contained in:
commit
c0383763ea
@ -131,8 +131,8 @@ type ActualStateOfWorld interface {
|
|||||||
type AttachedVolume struct {
|
type AttachedVolume struct {
|
||||||
operationexecutor.AttachedVolume
|
operationexecutor.AttachedVolume
|
||||||
|
|
||||||
// MountedByNode indicates that this volume has been been mounted by the
|
// MountedByNode indicates that this volume has been mounted by the node and
|
||||||
// node and is unsafe to detach.
|
// is unsafe to detach.
|
||||||
// The value is set and unset by SetVolumeMountedByNode(...).
|
// The value is set and unset by SetVolumeMountedByNode(...).
|
||||||
MountedByNode bool
|
MountedByNode bool
|
||||||
|
|
||||||
@ -473,7 +473,7 @@ func (asw *actualStateOfWorld) updateNodeStatusUpdateNeeded(nodeName types.NodeN
|
|||||||
nodeToUpdate, nodeToUpdateExists := asw.nodesToUpdateStatusFor[nodeName]
|
nodeToUpdate, nodeToUpdateExists := asw.nodesToUpdateStatusFor[nodeName]
|
||||||
if !nodeToUpdateExists {
|
if !nodeToUpdateExists {
|
||||||
// should not happen
|
// 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)
|
needed, nodeName)
|
||||||
return fmt.Errorf(errMsg)
|
return fmt.Errorf(errMsg)
|
||||||
}
|
}
|
||||||
|
@ -40,14 +40,14 @@ import (
|
|||||||
// should be attached to the specified node, and pods are the pods that
|
// should be attached to the specified node, and pods are the pods that
|
||||||
// reference the volume and are scheduled to that node.
|
// reference the volume and are scheduled to that node.
|
||||||
// Note: This is distinct from the DesiredStateOfWorld implemented by the
|
// 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.
|
// contains attach/detach controller specific state.
|
||||||
type DesiredStateOfWorld interface {
|
type DesiredStateOfWorld interface {
|
||||||
// AddNode adds the given node to the list of nodes managed by the attach/
|
// AddNode adds the given node to the list of nodes managed by the attach/
|
||||||
// detach controller.
|
// detach controller.
|
||||||
// If the node already exists this is a no-op.
|
// If the node already exists this is a no-op.
|
||||||
// keepTerminatedPodVolumes is a property of the node that determines
|
// 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)
|
AddNode(nodeName k8stypes.NodeName, keepTerminatedPodVolumes bool)
|
||||||
|
|
||||||
// AddPod adds the given pod to the list of pods that reference the
|
// 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.
|
// The volumeToAttach object represents a volume that should be attached to a node.
|
||||||
type volumeToAttach struct {
|
type volumeToAttach struct {
|
||||||
// multiAttachErrorReported indicates whether the multi-attach error has been reported for the given volume.
|
// 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
|
multiAttachErrorReported bool
|
||||||
|
|
||||||
// volumeName contains the unique identifier for this volume.
|
// volumeName contains the unique identifier for this volume.
|
||||||
@ -235,7 +235,8 @@ func (dsw *desiredStateOfWorld) AddPod(
|
|||||||
attachableVolumePlugin, volumeSpec)
|
attachableVolumePlugin, volumeSpec)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf(
|
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(),
|
volumeSpec.Name(),
|
||||||
err)
|
err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user