checkpoint-restore / criu

Checkpoint/Restore tool
criu.org
Other
2.86k stars 576 forks source link

dump: Don't unfreeze tasks on dump failure with --no-resume-on-error. #2215

Open osctobe opened 1 year ago

osctobe commented 1 year ago

Make it possible to kill or leave stopped tasks if a dump failed after stopping the tree.

codecov-commenter commented 1 year ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (cda1c5c) 70.51% compared to head (55c284d) 70.51%.

:exclamation: Current head 55c284d differs from pull request most recent head 6f08f8f. Consider uploading reports for the commit 6f08f8f to get more accurate results

Files Patch % Lines
criu/cr-service.c 50.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## criu-dev #2215 +/- ## ========================================= Coverage 70.51% 70.51% ========================================= Files 133 133 Lines 33534 33539 +5 ========================================= + Hits 23646 23650 +4 - Misses 9888 9889 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

rst0git commented 1 year ago

@osctobe Would it be possible to add a test for this functionality?

osctobe commented 1 year ago

@osctobe Would it be possible to add a test for this functionality?

There are no tests for --leave-stopped or --leave-running yet that could be extended with this case. The change is tested in production (always enabled), though.

avagin commented 1 year ago

@osctobe Would it be possible to add a test for this functionality?

There are no tests for --leave-stopped or --leave-running yet that could be extended with this case.

Here is the test for --leave-stopped: https://github.com/checkpoint-restore/criu/blob/criu-dev/test/jenkins/criu-stop.sh

The change is tested in production (always enabled), though.

I am sorry, but it doesn't work this way. I think our fault injection engine can be used to introduce a test. test/jenkins/criu-fault.sh contains all these tests.

0x7f454c46 commented 1 year ago

You keep adding Change-Id: Ia8956063cdc130650cfcde86851ee6a14331f2c2 that pollute git logs and don't provide anything outside your company. Clean these up, please.

Snorch commented 1 year ago

See the freezer_restore_state() related code. If before dump you put your processes in freezer cgroup and make it FROZEN, you can later decide after dump finishes if you want to make cgroup THAWED (no dump failure) or leave it frozen (on dump failure). This does effectively the same as you want to accomplish with this new option.

avagin commented 1 year ago

@osctobe could you response to comments?

github-actions[bot] commented 10 months ago

A friendly reminder that this PR had no activity for 30 days.

github-actions[bot] commented 8 months ago

A friendly reminder that this PR had no activity for 30 days.