-
Notifications
You must be signed in to change notification settings - Fork 575
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
dump: Don't unfreeze tasks on dump failure with --no-resume-on-error. #2215
base: criu-dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2070,7 +2070,9 @@ static int cr_dump_finish(int ret) | |
* consistency of the FS and other resources, we simply | ||
* start rollback procedure and cleanup everything. | ||
*/ | ||
if (ret || post_dump_ret || opts.final_state == TASK_ALIVE) { | ||
if (opts.resume_on_dump_error && (ret || post_dump_ret)) | ||
opts.final_state = TASK_ALIVE; | ||
if (opts.final_state == TASK_ALIVE) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we need to check that final_state isn't TASK_DEAD here. If finale_state is TASK_STOPPED, we have to do all these actions, right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it is kinda strange that we don't unlock network for --leave-stopped. One would not be able to just resume such stopped container with SIGCONT, but will also need to manually unlock network and remove link remaps and do other cleanups. |
||
unsuspend_lsm(); | ||
network_unlock(); | ||
delete_link_remaps(); | ||
|
@@ -2082,7 +2084,7 @@ static int cr_dump_finish(int ret) | |
|
||
if (arch_set_thread_regs(root_item, true) < 0) | ||
return -1; | ||
pstree_switch_state(root_item, (ret || post_dump_ret) ? TASK_ALIVE : opts.final_state); | ||
pstree_switch_state(root_item, opts.final_state); | ||
timing_stop(TIME_FROZEN); | ||
free_pstree(root_item); | ||
seccomp_free_entries(); | ||
|
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.
Could you add some lines about what situations it is useful and why? What benefit does it provide?
How should a user decide what is preferred for them in case of criu failure?
Current doc lines are copy'n'paste from above without adding any useful context.