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
035afab9
Commit
035afab9
authored
Mar 13, 2017
by
Yu-Ju Hong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dockershim: remove corrupted sandbox checkpoints
This is a workaround to ensure that kubelet doesn't block forever when the checkpoint is corrupted.
parent
4ff0af82
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
docker_sandbox.go
pkg/kubelet/dockershim/docker_sandbox.go
+14
-2
No files found.
pkg/kubelet/dockershim/docker_sandbox.go
View file @
035afab9
...
...
@@ -144,6 +144,16 @@ func (ds *dockerService) StopPodSandbox(podSandboxID string) error {
glog
.
Warningf
(
"Both sandbox container and checkpoint for id %q could not be found. "
+
"Proceed without further sandbox information."
,
podSandboxID
)
}
else
{
if
checkpointErr
==
errors
.
CorruptCheckpointError
{
// Remove the corrupted checkpoint so that the next
// StopPodSandbox call can proceed. This may indicate that
// some resources won't be reclaimed.
// TODO (#43021): Fix this properly.
glog
.
Warningf
(
"Removing corrupted checkpoint %q: %+v"
,
podSandboxID
,
*
checkpoint
)
if
err
:=
ds
.
checkpointHandler
.
RemoveCheckpoint
(
podSandboxID
);
err
!=
nil
{
glog
.
Warningf
(
"Unable to remove corrupted checkpoint %q: %v"
,
podSandboxID
,
err
)
}
}
return
utilerrors
.
NewAggregate
([]
error
{
fmt
.
Errorf
(
"failed to get checkpoint for sandbox %q: %v"
,
podSandboxID
,
checkpointErr
),
fmt
.
Errorf
(
"failed to get sandbox status: %v"
,
statusErr
)})
...
...
@@ -393,8 +403,10 @@ func (ds *dockerService) ListPodSandbox(filter *runtimeapi.PodSandboxFilter) ([]
glog
.
Errorf
(
"Failed to retrieve checkpoint for sandbox %q: %v"
,
id
,
err
)
if
err
==
errors
.
CorruptCheckpointError
{
glog
.
V
(
2
)
.
Info
(
"Removing corrupted checkpoint %q: %+v"
,
id
,
*
checkpoint
)
ds
.
checkpointHandler
.
RemoveCheckpoint
(
id
)
glog
.
Warningf
(
"Removing corrupted checkpoint %q: %+v"
,
id
,
*
checkpoint
)
if
err
:=
ds
.
checkpointHandler
.
RemoveCheckpoint
(
id
);
err
!=
nil
{
glog
.
Warningf
(
"Unable to remove corrupted checkpoint %q: %v"
,
id
,
err
)
}
}
continue
}
...
...
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