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
0fec31a1
Commit
0fec31a1
authored
Feb 27, 2015
by
Dawn Chen
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4918 from vmarmol/handle-crash
Handle crash in per-pod thread and container killer.
parents
d68c738f
c7e7ecdf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
kubelet.go
pkg/kubelet/kubelet.go
+1
-0
pod_workers.go
pkg/kubelet/pod_workers.go
+5
-1
No files found.
pkg/kubelet/kubelet.go
View file @
0fec31a1
...
@@ -974,6 +974,7 @@ func (kl *Kubelet) killContainersInPod(pod *api.BoundPod, dockerContainers docke
...
@@ -974,6 +974,7 @@ func (kl *Kubelet) killContainersInPod(pod *api.BoundPod, dockerContainers docke
count
++
count
++
wg
.
Add
(
1
)
wg
.
Add
(
1
)
go
func
()
{
go
func
()
{
defer
util
.
HandleCrash
()
err
:=
kl
.
killContainer
(
dockerContainer
)
err
:=
kl
.
killContainer
(
dockerContainer
)
if
err
!=
nil
{
if
err
!=
nil
{
glog
.
Errorf
(
"Failed to delete container: %v; Skipping pod %q"
,
err
,
podFullName
)
glog
.
Errorf
(
"Failed to delete container: %v; Skipping pod %q"
,
err
,
podFullName
)
...
...
pkg/kubelet/pod_workers.go
View file @
0fec31a1
...
@@ -23,6 +23,7 @@ import (
...
@@ -23,6 +23,7 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/client/record"
"github.com/GoogleCloudPlatform/kubernetes/pkg/client/record"
"github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/dockertools"
"github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/dockertools"
"github.com/GoogleCloudPlatform/kubernetes/pkg/types"
"github.com/GoogleCloudPlatform/kubernetes/pkg/types"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/golang/glog"
"github.com/golang/glog"
)
)
...
@@ -104,7 +105,10 @@ func (p *podWorkers) UpdatePod(pod *api.BoundPod, updateComplete func()) {
...
@@ -104,7 +105,10 @@ func (p *podWorkers) UpdatePod(pod *api.BoundPod, updateComplete func()) {
// update of this pod is being processed are ignored.
// update of this pod is being processed are ignored.
podUpdates
=
make
(
chan
workUpdate
,
1
)
podUpdates
=
make
(
chan
workUpdate
,
1
)
p
.
podUpdates
[
uid
]
=
podUpdates
p
.
podUpdates
[
uid
]
=
podUpdates
go
p
.
managePodLoop
(
podUpdates
)
go
func
()
{
defer
util
.
HandleCrash
()
p
.
managePodLoop
(
podUpdates
)
}()
}
}
// TODO(wojtek-t): Consider changing to the following model:
// TODO(wojtek-t): Consider changing to the following model:
// - add a cache of "desired" pod state
// - add a cache of "desired" pod state
...
...
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