Skip to content

Commit

Permalink
restore: fix --manage-cgroups-mode ignore on cgroup v2
Browse files Browse the repository at this point in the history
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 <kolyshkin@gmail.com>
  • Loading branch information
kolyshkin committed Nov 2, 2022
1 parent 2ac7907 commit bff06e8
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions libcontainer/container_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -1560,11 +1560,6 @@ func (c *Container) criuApplyCgroups(pid int, req *criurpc.CriuReq) error {
return err
}

if cgroups.IsCgroup2UnifiedMode() {
return nil
}
// the stuff below is cgroupv1-specific

path := fmt.Sprintf("/proc/%d/cgroup", pid)
cgroupsPaths, err := cgroups.ParseCgroupFile(path)
if err != nil {
Expand Down

0 comments on commit bff06e8

Please sign in to comment.