shim: Clean up delete invocation behavior#1041
Merged
kevpar merged 1 commit intomicrosoft:masterfrom May 28, 2021
Merged
Conversation
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>
dcantah
approved these changes
May 28, 2021
anmaxvl
approved these changes
May 28, 2021
ambarve
reviewed
May 29, 2021
Contributor
ambarve
left a comment
There was a problem hiding this comment.
We should remove the limited read code above the OpenComputeSystem call also since now we don't delete the bundle directory and containerd will read the panic.log when deleting bundle directory.
dcantah
added a commit
to dcantah/containerd
that referenced
this pull request
Jul 1, 2021
0.8.18 contains a fix for shim delete behavior, please see: microsoft/hcsshim#1041 There's no new vendored files as nothing from hcsshim/cmd/containerd-shim-runhcs-v1 gets imported here but for containerd releases the runhcs shim binary is built from whatever commit is vendored into containerd. Signed-off-by: Daniel Canter <dcanter@microsoft.com>
dcantah
added a commit
to dcantah/containerd
that referenced
this pull request
Jul 12, 2021
0.8.18 contains a fix for shim delete behavior, please see: microsoft/hcsshim#1041 This time it brings in quite a few new files as 1.5 was on 0.8.16 of hcsshim and 0.8.17 brought in a few new things. 0.8.18 doesn't actually bring in any new vendored files but the version of the runhcs-shim built is based off of the commit that's vendored into Containerd, so we need to vendor the version that has the fix. Signed-off-by: Daniel Canter <dcanter@microsoft.com> (cherry picked from commit a81f05f) Signed-off-by: Daniel Canter <dcanter@microsoft.com>
anmaxvl
pushed a commit
to anmaxvl/hcsshim
that referenced
this pull request
Aug 19, 2021
fahedouch
pushed a commit
to fahedouch/containerd
that referenced
this pull request
Oct 15, 2021
0.8.18 contains a fix for shim delete behavior, please see: microsoft/hcsshim#1041 There's no new vendored files as nothing from hcsshim/cmd/containerd-shim-runhcs-v1 gets imported here but for containerd releases the runhcs shim binary is built from whatever commit is vendored into containerd. Signed-off-by: Daniel Canter <dcanter@microsoft.com>
dims
pushed a commit
to dims/containerd-api-only
that referenced
this pull request
Mar 10, 2022
0.8.18 contains a fix for shim delete behavior, please see: microsoft/hcsshim#1041 There's no new vendored files as nothing from hcsshim/cmd/containerd-shim-runhcs-v1 gets imported here but for containerd releases the runhcs shim binary is built from whatever commit is vendored into containerd. Signed-off-by: Daniel Canter <dcanter@microsoft.com>
dims
pushed a commit
to dims/containerd-api-only
that referenced
this pull request
Mar 26, 2022
0.8.18 contains a fix for shim delete behavior, please see: microsoft/hcsshim#1041 There's no new vendored files as nothing from hcsshim/cmd/containerd-shim-runhcs-v1 gets imported here but for containerd releases the runhcs shim binary is built from whatever commit is vendored into containerd. Signed-off-by: Daniel Canter <dcanter@microsoft.com>
dims
pushed a commit
to dims/containerd-api-only
that referenced
this pull request
Mar 26, 2022
0.8.18 contains a fix for shim delete behavior, please see: microsoft/hcsshim#1041 There's no new vendored files as nothing from hcsshim/cmd/containerd-shim-runhcs-v1 gets imported here but for containerd releases the runhcs shim binary is built from whatever commit is vendored into containerd. Signed-off-by: Daniel Canter <dcanter@microsoft.com>
akhilerm
pushed a commit
to akhilerm/containerd-api
that referenced
this pull request
May 23, 2022
0.8.18 contains a fix for shim delete behavior, please see: microsoft/hcsshim#1041 There's no new vendored files as nothing from hcsshim/cmd/containerd-shim-runhcs-v1 gets imported here but for containerd releases the runhcs shim binary is built from whatever commit is vendored into containerd. Signed-off-by: Daniel Canter <dcanter@microsoft.com>
yylt
pushed a commit
to yylt/containerd
that referenced
this pull request
Jun 14, 2022
0.8.18 contains a fix for shim delete behavior, please see: microsoft/hcsshim#1041 There's no new vendored files as nothing from hcsshim/cmd/containerd-shim-runhcs-v1 gets imported here but for containerd releases the runhcs shim binary is built from whatever commit is vendored into containerd. Signed-off-by: Daniel Canter <dcanter@microsoft.com>
akhilerm
pushed a commit
to akhilerm/containerd-api
that referenced
this pull request
Jun 22, 2022
0.8.18 contains a fix for shim delete behavior, please see: microsoft/hcsshim#1041 There's no new vendored files as nothing from hcsshim/cmd/containerd-shim-runhcs-v1 gets imported here but for containerd releases the runhcs shim binary is built from whatever commit is vendored into containerd. Signed-off-by: Daniel Canter <dcanter@microsoft.com>
akhilerm
pushed a commit
to akhilerm/containerd-api
that referenced
this pull request
Oct 4, 2022
0.8.18 contains a fix for shim delete behavior, please see: microsoft/hcsshim#1041 There's no new vendored files as nothing from hcsshim/cmd/containerd-shim-runhcs-v1 gets imported here but for containerd releases the runhcs shim binary is built from whatever commit is vendored into containerd. Signed-off-by: Daniel Canter <dcanter@microsoft.com>
akhilerm
pushed a commit
to akhilerm/containerd-api
that referenced
this pull request
Oct 4, 2022
0.8.18 contains a fix for shim delete behavior, please see: microsoft/hcsshim#1041 There's no new vendored files as nothing from hcsshim/cmd/containerd-shim-runhcs-v1 gets imported here but for containerd releases the runhcs shim binary is built from whatever commit is vendored into containerd. Signed-off-by: Daniel Canter <dcanter@microsoft.com>
akhilerm
pushed a commit
to akhilerm/containerd-test
that referenced
this pull request
Feb 22, 2023
0.8.18 contains a fix for shim delete behavior, please see: microsoft/hcsshim#1041 There's no new vendored files as nothing from hcsshim/cmd/containerd-shim-runhcs-v1 gets imported here but for containerd releases the runhcs shim binary is built from whatever commit is vendored into containerd. Signed-off-by: Daniel Canter <dcanter@microsoft.com> Containerd-test-commit: a81f05f
akhilerm
pushed a commit
to akhilerm/containerd-test
that referenced
this pull request
Feb 22, 2023
0.8.18 contains a fix for shim delete behavior, please see: microsoft/hcsshim#1041 There's no new vendored files as nothing from hcsshim/cmd/containerd-shim-runhcs-v1 gets imported here but for containerd releases the runhcs shim binary is built from whatever commit is vendored into containerd. Signed-off-by: Daniel Canter <dcanter@microsoft.com> Containerd-test-commit: 63f6f54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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