-
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
--manage-cgroups-mode
can not be ignore
when checkpoint and restore containers
#4178
Comments
If this is a bug, I'd like to submit a PR to fix it :) |
Thanks, I think it's not a bug:
But it seems that it doesn't fit to the doc you provided: |
@lifubang Thanks for the reply. However, I don't think the code you provided is helpful in answering this question. This piece of code is not used by the code being run, and I am not sure if it will be used by CRIU to determine the value of |
IIUC, If you don't set |
Please note that It looks like you're using runc 1.1.10 which does not have it. Please give https://github.com/opencontainers/runc/releases/tag/v1.2.0-rc.1 a try and see if it helps. |
Hello, for me it helped. |
I think as per #4178 (comment) this should be closed (and yet we only have --manage-cgroup-mode ignore in runc 1.2 which is not out yet, except for a few release candidates). |
Description
I am attempting to use runc to checkpoint and restore containers (by calling CRIU), and I do not want CRIU to dump and restore cgroups. I found in the documentation for restore that this can be achieved by setting the
--manage-cgroups-mode
parameter toignore
during the checkpoint and restore process.However, I discovered through the code that if I set
--manage-cgroups-mode
toignore
, this parameter will not ultimately take effect in the final concatenation of the call to CRIU's rpc options, as the value ofignore
is 0.runc/libcontainer/criu_linux.go
Lines 389 to 393 in 313ec8b
Steps to reproduce the issue
Describe the results you received and expected
If a user sets
--manage-cgroups-mode
toignore
while using the checkpoint or restore commands, runc should translate this value into the corresponding enumeration value given in go-criu (which is0
) and append it torpcOpts
. However, the current logic fails to retain the user's setting ofignore
, and does not pass the corresponding--manage-cgroups
option to CRIU, resulting in CRIU usingsoft
instead ofignore
as the default value.What version of runc are you using?
runc version 1.1.10
commit: v1.1.10-0-g18a0cb0f-dirty
spec: 1.0.2-dev
go: go1.21.6
libseccomp: 2.5.4
Host OS information
PRETTY_NAME="Ubuntu 23.10"
NAME="Ubuntu"
VERSION_ID="23.10"
VERSION="23.10 (Mantic Minotaur)"
VERSION_CODENAME=mantic
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=mantic
LOGO=ubuntu-logo
Host kernel information
Linux lima-ccr-dev 6.5.0-14-generic #14-Ubuntu SMP PREEMPT_DYNAMIC Tue Nov 14 15:13:47 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
The text was updated successfully, but these errors were encountered: