Skip to content

Commit 775a5cb

Browse files
committed
libct/criuApplyCgroups: don't set cgroup paths for v2
There is no need to have cgroupv1-specific controller paths on restore in case of cgroupv2. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
1 parent 17a9d86 commit 775a5cb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libcontainer/container_linux.go

+5
Original file line numberDiff line numberDiff line change
@@ -1452,6 +1452,11 @@ func (c *linuxContainer) criuApplyCgroups(pid int, req *criurpc.CriuReq) error {
14521452
return newSystemError(err)
14531453
}
14541454

1455+
if cgroups.IsCgroup2UnifiedMode() {
1456+
return nil
1457+
}
1458+
// the stuff below is cgroupv1-specific
1459+
14551460
path := fmt.Sprintf("/proc/%d/cgroup", pid)
14561461
cgroupsPaths, err := cgroups.ParseCgroupFile(path)
14571462
if err != nil {

0 commit comments

Comments
 (0)