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
8e48221c
Commit
8e48221c
authored
Aug 10, 2016
by
Yu-Ju Hong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kubelet: mark source ready after updating the cache
This ensures that cleanup routines don't start until the cache content is up-to-date.
parent
cdfd46cc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
kubelet.go
pkg/kubelet/kubelet.go
+8
-1
No files found.
pkg/kubelet/kubelet.go
View file @
8e48221c
...
@@ -2175,7 +2175,6 @@ func (kl *Kubelet) syncLoopIteration(configCh <-chan kubetypes.PodUpdate, handle
...
@@ -2175,7 +2175,6 @@ func (kl *Kubelet) syncLoopIteration(configCh <-chan kubetypes.PodUpdate, handle
glog
.
Errorf
(
"Update channel is closed. Exiting the sync loop."
)
glog
.
Errorf
(
"Update channel is closed. Exiting the sync loop."
)
return
false
return
false
}
}
kl
.
sourcesReady
.
AddSource
(
u
.
Source
)
switch
u
.
Op
{
switch
u
.
Op
{
case
kubetypes
.
ADD
:
case
kubetypes
.
ADD
:
...
@@ -2202,6 +2201,14 @@ func (kl *Kubelet) syncLoopIteration(configCh <-chan kubetypes.PodUpdate, handle
...
@@ -2202,6 +2201,14 @@ func (kl *Kubelet) syncLoopIteration(configCh <-chan kubetypes.PodUpdate, handle
// TODO: Do we want to support this?
// TODO: Do we want to support this?
glog
.
Errorf
(
"Kubelet does not support snapshot update"
)
glog
.
Errorf
(
"Kubelet does not support snapshot update"
)
}
}
// Mark the source ready after receiving at least one update from the
// source. Once all the sources are marked ready, various cleanup
// routines will start reclaiming resources. It is important that this
// takes place only after kubelet calls the update handler to process
// the update to ensure the internal pod cache is up-to-date.
kl
.
sourcesReady
.
AddSource
(
u
.
Source
)
case
e
:=
<-
plegCh
:
case
e
:=
<-
plegCh
:
if
isSyncPodWorthy
(
e
)
{
if
isSyncPodWorthy
(
e
)
{
// PLEG event for a pod; sync it.
// PLEG event for a pod; sync it.
...
...
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