Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix post stop hook not always called successfully #4364

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

abel-von
Copy link

@abel-von abel-von commented Aug 2, 2024

If the first time post stop hook called with a failure(maybe because some resources is not ready to be recycled), the second retry of runc delete will return directly because the container root directoy is already removed. so that the post stop hook is not called.

I think we may have to do container root dir removal after post stop hook executed. I think it is also more consistant with the sematics of "Poststop", because otherwise it should be "PostDelete".

fix #4363

If the first time post stop hook called with a failure(maybe because
some resources is not ready to be recycled), the second retry of `runc
delete` will return directly because the container root directoy is
already removed. so that the post stop hook is not called.

Signed-off-by: Abel Feng <fshb1988@gmail.com>
@rata
Copy link
Member

rata commented Aug 2, 2024

Thanks! This change of behavior, judging from the runtime-spec PR, requires a change of behavior at the runtime-spec first. I'm marking as draft for now, let me know if I'm missing something.

@rata rata marked this pull request as draft August 2, 2024 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The removal of container root directory should be after poststop run successfully.
2 participants