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: checkpoint error when destroy container #3578

Closed
wants to merge 2 commits into from

Conversation

gosoon
Copy link

@gosoon gosoon commented Aug 28, 2022

@@ -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 {
Copy link
Contributor

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

@gosoon ^^^^

Copy link
Contributor

@kolyshkin kolyshkin left a 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.

@kolyshkin
Copy link
Contributor

@gosoon PTAL ^^^

@kolyshkin
Copy link
Contributor

@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.

@kolyshkin
Copy link
Contributor

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

@kolyshkin
Copy link
Contributor

Superceded by #3655

@kolyshkin kolyshkin closed this Dec 1, 2022
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.

runc checkpoint: destroy container error
2 participants