[release/0.8] shim: Clean up delete invocation behavior #1042
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport of 450cdb1 for
release/0.8
.This changes the behavior when the shim is invoked with the "delete"
command line argument.
Previously, the delete path did two things it should not:
Attempted to locate the sandbox container for the pod and delete it as
well. This meant if "shim delete" was invoked for a workload
container, it could bring down the whole pod. The only reason we did
not see this in the past is that prior to containerd 1.5 "shim delete"
was not called for successful container stop operations.
Deleted the bundle directory. We shouldn't do this in the shim, as
containerd does it itself.
For reference on what the Linux shim does, see here: https://github.com/containerd/containerd/blob/master/runtime/v2/runc/v2/service.go#L291
Signed-off-by: Kevin Parsons kevpar@microsoft.com
(cherry picked from commit 450cdb1)
Signed-off-by: Kevin Parsons kevpar@microsoft.com