Skip to content

Commit d5c57dc

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 52b56bc commit d5c57dc

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

libcontainer/container_linux.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,6 +1357,11 @@ func (c *linuxContainer) criuApplyCgroups(pid int, req *criurpc.CriuReq) error {
13571357
return newSystemError(err)
13581358
}
13591359

1360+
if cgroups.IsCgroup2UnifiedMode() {
1361+
return nil
1362+
}
1363+
// the stuff below is cgroupv1-specific
1364+
13601365
path := fmt.Sprintf("/proc/%d/cgroup", pid)
13611366
cgroupsPaths, err := cgroups.ParseCgroupFile(path)
13621367
if err != nil {

0 commit comments

Comments
 (0)