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
25acc9ba
Commit
25acc9ba
authored
Dec 15, 2015
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #18301 from yujuhong/remove_wait
Auto commit by PR queue bot
parents
650ecd6b
e0d9ccde
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
22 deletions
+5
-22
kubelet.go
pkg/kubelet/kubelet.go
+5
-22
No files found.
pkg/kubelet/kubelet.go
View file @
25acc9ba
...
...
@@ -144,20 +144,6 @@ type SyncHandler interface {
type
SourcesReadyFn
func
(
sourcesSeen
sets
.
String
)
bool
// Wait for the container runtime to be up with a timeout.
func
waitUntilRuntimeIsUp
(
cr
kubecontainer
.
Runtime
,
timeout
time
.
Duration
)
error
{
var
err
error
=
nil
waitStart
:=
time
.
Now
()
for
time
.
Since
(
waitStart
)
<
timeout
{
_
,
err
=
cr
.
Version
()
if
err
==
nil
{
return
nil
}
time
.
Sleep
(
100
*
time
.
Millisecond
)
}
return
err
}
// New instantiates a new Kubelet object along with all the required internal modules.
// No initialization of Kubelet and its modules should happen here.
func
NewMainKubelet
(
...
...
@@ -2594,15 +2580,12 @@ func (kl *Kubelet) GetPodByName(namespace, name string) (*api.Pod, bool) {
}
func
(
kl
*
Kubelet
)
updateRuntimeUp
()
{
start
:=
time
.
Now
()
err
:=
waitUntilRuntimeIsUp
(
kl
.
containerRuntime
,
100
*
time
.
Millisecond
)
if
err
==
nil
{
// Errors in initialization will be synchronized internally.
kl
.
oneTimeInitializer
.
Do
(
kl
.
initializeRuntimeDependentModules
)
kl
.
runtimeState
.
setRuntimeSync
(
time
.
Now
())
}
else
{
glog
.
Errorf
(
"Container runtime sanity check failed after %v, err: %v"
,
time
.
Since
(
start
),
err
)
if
_
,
err
:=
kl
.
containerRuntime
.
Version
();
err
!=
nil
{
glog
.
Errorf
(
"Container runtime sanity check failed: %v"
,
err
)
return
}
kl
.
oneTimeInitializer
.
Do
(
kl
.
initializeRuntimeDependentModules
)
kl
.
runtimeState
.
setRuntimeSync
(
time
.
Now
())
}
func
(
kl
*
Kubelet
)
reconcileCBR0
(
podCIDR
string
)
error
{
...
...
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