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
63b7c05b
Commit
63b7c05b
authored
May 20, 2016
by
Mike Danese
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #24743 from pmorie/kill-pod-errs
Clearly identify errors killing pods in events and logs
parents
3e5c77ef
451c7f28
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
kubelet.go
pkg/kubelet/kubelet.go
+5
-6
No files found.
pkg/kubelet/kubelet.go
View file @
63b7c05b
...
@@ -1787,14 +1787,13 @@ func (kl *Kubelet) syncPod(o syncPodOptions) error {
...
@@ -1787,14 +1787,13 @@ func (kl *Kubelet) syncPod(o syncPodOptions) error {
kl
.
statusManager
.
SetPodStatus
(
pod
,
apiPodStatus
)
kl
.
statusManager
.
SetPodStatus
(
pod
,
apiPodStatus
)
// Kill pod if it should not be running
// Kill pod if it should not be running
if
err
:=
canRunPod
(
pod
);
err
!=
nil
||
pod
.
DeletionTimestamp
!=
nil
||
apiPodStatus
.
Phase
==
api
.
PodFailed
{
if
errOuter
:=
canRunPod
(
pod
);
errOuter
!=
nil
||
pod
.
DeletionTimestamp
!=
nil
||
apiPodStatus
.
Phase
==
api
.
PodFailed
{
if
err
:=
kl
.
killPod
(
pod
,
nil
,
podStatus
,
nil
);
err
!=
nil
{
if
errInner
:=
kl
.
killPod
(
pod
,
nil
,
podStatus
,
nil
);
errInner
!=
nil
{
// there was an error killing the pod, so we return that error directly
errOuter
=
fmt
.
Errorf
(
"error killing pod: %v"
,
errInner
)
utilruntime
.
HandleError
(
err
)
utilruntime
.
HandleError
(
errOuter
)
return
err
}
}
// there was no error killing the pod, but the pod cannot be run, so we return that err (if any)
// there was no error killing the pod, but the pod cannot be run, so we return that err (if any)
return
err
return
err
Outer
}
}
// Create Mirror Pod for Static Pod if it doesn't already exist
// Create Mirror Pod for Static Pod if it doesn't already exist
...
...
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