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
97f546d2
Unverified
Commit
97f546d2
authored
Jun 11, 2018
by
Michal Fojtik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
volume: decrease memory allocations for debugging messages
parent
5aa8d690
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
reconciler.go
pkg/controller/volume/attachdetach/reconciler/reconciler.go
+9
-3
No files found.
pkg/controller/volume/attachdetach/reconciler/reconciler.go
View file @
97f546d2
...
...
@@ -257,13 +257,17 @@ func (rc *reconciler) attachDesiredVolumes() {
for
_
,
volumeToAttach
:=
range
rc
.
desiredStateOfWorld
.
GetVolumesToAttach
()
{
if
rc
.
actualStateOfWorld
.
VolumeNodeExists
(
volumeToAttach
.
VolumeName
,
volumeToAttach
.
NodeName
)
{
// Volume/Node exists, touch it to reset detachRequestedTime
glog
.
V
(
5
)
.
Infof
(
volumeToAttach
.
GenerateMsgDetailed
(
"Volume attached--touching"
,
""
))
if
glog
.
V
(
5
)
{
glog
.
Infof
(
volumeToAttach
.
GenerateMsgDetailed
(
"Volume attached--touching"
,
""
))
}
rc
.
actualStateOfWorld
.
ResetDetachRequestTime
(
volumeToAttach
.
VolumeName
,
volumeToAttach
.
NodeName
)
continue
}
// Don't even try to start an operation if there is already one running
if
rc
.
attacherDetacher
.
IsOperationPending
(
volumeToAttach
.
VolumeName
,
""
)
{
glog
.
V
(
10
)
.
Infof
(
"Operation for volume %q is already running. Can't start attach for %q"
,
volumeToAttach
.
VolumeName
,
volumeToAttach
.
NodeName
)
if
glog
.
V
(
10
)
{
glog
.
Infof
(
"Operation for volume %q is already running. Can't start attach for %q"
,
volumeToAttach
.
VolumeName
,
volumeToAttach
.
NodeName
)
}
continue
}
...
...
@@ -279,7 +283,9 @@ func (rc *reconciler) attachDesiredVolumes() {
}
// Volume/Node doesn't exist, spawn a goroutine to attach it
glog
.
V
(
5
)
.
Infof
(
volumeToAttach
.
GenerateMsgDetailed
(
"Starting attacherDetacher.AttachVolume"
,
""
))
if
glog
.
V
(
5
)
{
glog
.
Infof
(
volumeToAttach
.
GenerateMsgDetailed
(
"Starting attacherDetacher.AttachVolume"
,
""
))
}
err
:=
rc
.
attacherDetacher
.
AttachVolume
(
volumeToAttach
.
VolumeToAttach
,
rc
.
actualStateOfWorld
)
if
err
==
nil
{
glog
.
Infof
(
volumeToAttach
.
GenerateMsgDetailed
(
"attacherDetacher.AttachVolume started"
,
""
))
...
...
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