-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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: checkpoint error when destroy container #3578
Conversation
Signed-off-by: gosoon <[email protected]>
@@ -69,7 +69,11 @@ checkpointed.`, | |||
|
|||
if !(options.LeaveRunning || options.PreDump) { | |||
// destroy container unless we tell CRIU to keep it | |||
defer destroy(container) | |||
defer func() { | |||
if err := killContainer(container); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this change. What destroy does is removing the container. What killContainer
does is sending SIGKILL to the container. Replacing one with the other does not make sense.
I don't understand how it fixes #3577 either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gosoon ^^^^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the logic of this change, nor how it fixes #3577.
@gosoon PTAL ^^^ |
@gosoon I left a question above. Your patch comes without an explanation. Can you please describe/explain why this change is needed, what it does, etc. |
OK, I took a look and it seems that destroy() should not be called at all if the checkpointing failed. Here's a PR: #3655 |
Superceded by #3655 |
fix issue#3577