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
afa709b8
Commit
afa709b8
authored
Oct 13, 2016
by
Kubernetes Submit Queue
Committed by
GitHub
Oct 13, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #34662 from yujuhong/sandbox_logs
Automatic merge from submit-queue Add more log messages for sandbox restarts
parents
36be3b34
2202688e
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 @
afa709b8
...
@@ -387,6 +387,7 @@ type podContainerSpecChanges struct {
...
@@ -387,6 +387,7 @@ type podContainerSpecChanges struct {
// (changed, new attempt, original sandboxID if exist).
// (changed, new attempt, original sandboxID if exist).
func
(
m
*
kubeGenericRuntimeManager
)
podSandboxChanged
(
pod
*
api
.
Pod
,
podStatus
*
kubecontainer
.
PodStatus
)
(
changed
bool
,
attempt
uint32
,
sandboxID
string
)
{
func
(
m
*
kubeGenericRuntimeManager
)
podSandboxChanged
(
pod
*
api
.
Pod
,
podStatus
*
kubecontainer
.
PodStatus
)
(
changed
bool
,
attempt
uint32
,
sandboxID
string
)
{
if
len
(
podStatus
.
SandboxStatuses
)
==
0
{
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
,
""
return
true
,
0
,
""
}
}
...
@@ -400,12 +401,14 @@ func (m *kubeGenericRuntimeManager) podSandboxChanged(pod *api.Pod, podStatus *k
...
@@ -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.
// Needs to create a new sandbox when readySandboxCount > 1 or the ready sandbox is not the latest one.
sandboxStatus
:=
podStatus
.
SandboxStatuses
[
0
]
sandboxStatus
:=
podStatus
.
SandboxStatuses
[
0
]
if
readySandboxCount
>
1
||
sandboxStatus
.
GetState
()
!=
runtimeApi
.
PodSandBoxState_READY
{
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
()
return
true
,
sandboxStatus
.
Metadata
.
GetAttempt
()
+
1
,
sandboxStatus
.
GetId
()
}
}
// Needs to create a new sandbox when network namespace changed.
// Needs to create a new sandbox when network namespace changed.
if
sandboxStatus
.
Linux
!=
nil
&&
sandboxStatus
.
Linux
.
Namespaces
.
Options
!=
nil
&&
if
sandboxStatus
.
Linux
!=
nil
&&
sandboxStatus
.
Linux
.
Namespaces
.
Options
!=
nil
&&
sandboxStatus
.
Linux
.
Namespaces
.
Options
.
GetHostNetwork
()
!=
kubecontainer
.
IsHostNetworkPod
(
pod
)
{
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
,
""
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