Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
2e0abfa2
Commit
2e0abfa2
authored
Feb 23, 2018
by
Lei Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix grammar and log issue in volume cache code
parent
0cb15453
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
actual_state_of_world.go
...roller/volume/attachdetach/cache/actual_state_of_world.go
+3
-3
desired_state_of_world.go
...oller/volume/attachdetach/cache/desired_state_of_world.go
+5
-4
No files found.
pkg/controller/volume/attachdetach/cache/actual_state_of_world.go
View file @
2e0abfa2
...
...
@@ -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
)
}
...
...
pkg/controller/volume/attachdetach/cache/desired_state_of_world.go
View file @
2e0abfa2
...
...
@@ -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. The
y
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
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment