Sandbox: Delete shim+shutdown sandbox on create failure#8204
Merged
fuweid merged 1 commit intocontainerd:mainfrom Mar 7, 2023
Merged
Sandbox: Delete shim+shutdown sandbox on create failure#8204fuweid merged 1 commit intocontainerd:mainfrom
fuweid merged 1 commit intocontainerd:mainfrom
Conversation
Currently if create fails the shim will just be kind of stuck in limbo. This calls shutdown to allow the shim to exit, and then invokes shim delete. Signed-off-by: Danny Canter <[email protected]>
40a5266 to
f7eb86e
Compare
dmcgowan
approved these changes
Mar 6, 2023
Member
|
I wonder if we can tie this into the new garbage collector logic in the future (https://github.com/containerd/containerd/blob/main/metadata/gc.go#L98) |
Member
Author
|
Not a bad idea @dmcgowan. There's a couple other pain points here, we might want to do the same if Start fails as well. |
fuweid
reviewed
Mar 7, 2023
| Error("failed to shutdown sandbox after failed create") | ||
| } | ||
|
|
||
| ctx, cancel := context.WithTimeout(ctx, 5*time.Second) |
Member
There was a problem hiding this comment.
the timeout should be configurable and 5 sec is default one.
fuweid
approved these changes
Mar 7, 2023
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.
Currently if create fails the shim will just be kind of stuck in limbo. This calls shutdown to allow the shim to exit, and then invokes shim delete.