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
[1]:
@@ -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 {
