Skip to content

Restore cgroup namespace in ignore mode - #5418

Closed
TimDurward wants to merge 1 commit into
opencontainers:mainfrom
TimDurward:criu-ignore-cgroupns
Closed

TimDurward wants to merge 1 commit into
opencontainers:mainfrom
TimDurward:criu-ignore-cgroupns

Conversation

@TimDurward

Copy link
Copy Markdown

When restoring into a different cgroup with --manage-cgroups-mode=ignore, the process is placed in the configured cgroup but its private cgroup namespace is not preserved. /proc/self/cgroup consequently exposes the host-relative cgroup path instead of 0::/.

This change keeps the restored process in a private cgroup namespace. The existing test for restoring into a new cgroup now checks that /proc/self/cgroup still reports 0::/ after restore.

Fixes #5417

@kolyshkin
kolyshkin force-pushed the criu-ignore-cgroupns branch from b531698 to 0e3ad85 Compare August 24, 2026 19:59
Signed-off-by: Timothy Durward <timothy.a.durward@gmail.com>
@kolyshkin
kolyshkin force-pushed the criu-ignore-cgroupns branch from 0e3ad85 to 185f256 Compare August 28, 2026 08:47

@kolyshkin kolyshkin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@TimDurward thanks for the patch.

Мoving runc restore itself into container's cgroup temporarily feels like a bad thing to do.

(an older version of this comment suggested using SysProcAttr.UseCgroupFD/CLONE_INTO_CGROUP which is not the right solution)

@kolyshkin

Copy link
Copy Markdown
Contributor

Being fixed in criu (checkpoint-restore/criu#3139) instead.

@kolyshkin kolyshkin closed this Sep 14, 2026
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.

restore loses private cgroup namespace in ignore mode

2 participants