-
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
checkpoint/restore: implement --manage-cgroups-mode ignore #3546
checkpoint/restore: implement --manage-cgroups-mode ignore #3546
Commits on Dec 15, 2022
-
restore: fix ignoring --manage-cgroups-mode
Merge the logic of setPageServer, setManageCgroupsMode, and setEmptyNsMask into criuOptions. This does three things: 1. Fixes ignoring --manage-cgroups-mode on restore; 2. Simplifies the code in checkpoint.go and restore.go; 3. Ensures issues like 1 won't happen again. Signed-off-by: Kir Kolyshkin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ff3b4f3 - Browse repository at this point
Copy the full SHA ff3b4f3View commit details -
checkpoint/restore: add --manage-cgroups-mode ignore
- add the new mode and document it; - slightly improve the --help output; - slightly simplify the parsing code. Signed-off-by: Kir Kolyshkin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 212d25e - Browse repository at this point
Copy the full SHA 212d25eView commit details -
restore: fix --manage-cgroups-mode ignore on cgroup v2
When manage-cgroups-mode: ignore is used, criu still needs to know the cgroup path to work properly (see [1]). Revert "libct/criuApplyCgroups: don't set cgroup paths for v2" This reverts commit d5c57dc. [1]: checkpoint-restore/criu#1793 (comment) Signed-off-by: Kir Kolyshkin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3438ef3 - Browse repository at this point
Copy the full SHA 3438ef3View commit details -
libct/criuApplyCgroups: add a TODO
I don't want to implement it now, because this might result in some new issues, but this is definitely something that is worth implementing. Signed-off-by: Kir Kolyshkin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e8cf878 - Browse repository at this point
Copy the full SHA e8cf878View commit details -
tests/int: add "--manage-cgroups-mode ignore" test
This test checks that the container is restored into a different cgroup. To do so, a user should - use --manage-cgroups-mode ignore on both checkpoint and restore; - change the cgroupsPath value in config.json before restoring. The test does some checks to ensure that its logic is correct, and that after the restore the old (original) cgroup does not exist, the new one exists, and the container's init is in that new cgroup. Signed-off-by: Kir Kolyshkin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d4582ae - Browse repository at this point
Copy the full SHA d4582aeView commit details -
man/runc-restore: describe restore into different cgroup
Signed-off-by: Kir Kolyshkin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6835287 - Browse repository at this point
Copy the full SHA 6835287View commit details -
tests/int/checkpoint: fix lazy migration flakiness
When doing a lazy checkpoint/restore, we should not restore into the same cgroup, otherwise there is a race which result in occasional killing of the restored container (GH opencontainers#2760, opencontainers#2924). The fix is to use --manage-cgroup-mode=ignore, which allows to restore into a different cgroup. Note that since cgroupsPath is not set in config.json, the cgroup is derived from the container name, so calling set_cgroups_path is not needed. For the previous (unsuccessful) attempt to fix this, as well as detailed (and apparently correct) analysis, see commit 36fe3cc. Signed-off-by: Kir Kolyshkin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c4aa452 - Browse repository at this point
Copy the full SHA c4aa452View commit details