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
2202688e
Commit
2202688e
authored
Oct 12, 2016
by
Yu-Ju Hong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more log messages for sandbox restarts
parent
04437f64
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
kuberuntime_manager.go
pkg/kubelet/kuberuntime/kuberuntime_manager.go
+3
-0
No files found.
pkg/kubelet/kuberuntime/kuberuntime_manager.go
View file @
2202688e
...
...
@@ -387,6 +387,7 @@ type podContainerSpecChanges struct {
// (changed, new attempt, original sandboxID if exist).
func
(
m
*
kubeGenericRuntimeManager
)
podSandboxChanged
(
pod
*
api
.
Pod
,
podStatus
*
kubecontainer
.
PodStatus
)
(
changed
bool
,
attempt
uint32
,
sandboxID
string
)
{
if
len
(
podStatus
.
SandboxStatuses
)
==
0
{
glog
.
V
(
2
)
.
Infof
(
"No sandbox for pod %q can be found. Need to start a new one"
,
format
.
Pod
(
pod
))
return
true
,
0
,
""
}
...
...
@@ -400,12 +401,14 @@ func (m *kubeGenericRuntimeManager) podSandboxChanged(pod *api.Pod, podStatus *k
// Needs to create a new sandbox when readySandboxCount > 1 or the ready sandbox is not the latest one.
sandboxStatus
:=
podStatus
.
SandboxStatuses
[
0
]
if
readySandboxCount
>
1
||
sandboxStatus
.
GetState
()
!=
runtimeApi
.
PodSandBoxState_READY
{
glog
.
V
(
2
)
.
Infof
(
"No ready sandbox for pod %q can be found. Need to start a new one"
,
format
.
Pod
(
pod
))
return
true
,
sandboxStatus
.
Metadata
.
GetAttempt
()
+
1
,
sandboxStatus
.
GetId
()
}
// Needs to create a new sandbox when network namespace changed.
if
sandboxStatus
.
Linux
!=
nil
&&
sandboxStatus
.
Linux
.
Namespaces
.
Options
!=
nil
&&
sandboxStatus
.
Linux
.
Namespaces
.
Options
.
GetHostNetwork
()
!=
kubecontainer
.
IsHostNetworkPod
(
pod
)
{
glog
.
V
(
2
)
.
Infof
(
"Sandbox for pod %q has changed. Need to start a new one"
,
format
.
Pod
(
pod
))
return
true
,
sandboxStatus
.
Metadata
.
GetAttempt
()
+
1
,
""
}
...
...
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