mirror of
https://github.com/opencontainers/runc.git
synced 2026-04-22 23:17:17 +08:00
libct/specconv/CreateCgroupConfig: don't set c.Parent default
c.Parent is only used by systemd cgroup drivers, and both v1 and v2 drivers do have code to set the default if it is empty, so setting it here is redundant. In addition, in case of cgroup v2 rootless container setting it here is harmful as the default should be user.slice not system.slice. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -345,7 +345,7 @@ func TestLinuxCgroupSystemdWithEmptyPath(t *testing.T) {
|
||||
t.Errorf("Couldn't create Cgroup config: %v", err)
|
||||
}
|
||||
|
||||
expectedParent := "system.slice"
|
||||
expectedParent := ""
|
||||
if cgroup.Parent != expectedParent {
|
||||
t.Errorf("Expected to have %s as Parent instead of %s", expectedParent, cgroup.Parent)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user