Skip to content

Conversation

@dcantah
Copy link
Member

@dcantah dcantah commented Mar 4, 2023

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.

@dcantah dcantah marked this pull request as draft March 4, 2023 12:12
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]>
@dcantah dcantah force-pushed the sandbox-create-cleanup branch from 40a5266 to f7eb86e Compare March 5, 2023 07:10
@dcantah dcantah marked this pull request as ready for review March 5, 2023 07:54
@dmcgowan
Copy link
Member

dmcgowan commented Mar 6, 2023

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)

@dmcgowan dmcgowan added this to the 1.7 milestone Mar 6, 2023
@dcantah
Copy link
Member Author

dcantah commented Mar 6, 2023

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.

Error("failed to shutdown sandbox after failed create")
}

ctx, cancel := context.WithTimeout(ctx, 5*time.Second)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the timeout should be configurable and 5 sec is default one.

@fuweid fuweid merged commit b6c72a0 into containerd:main Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants