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:
Kir Kolyshkin
2021-04-01 19:33:57 -07:00
parent f0dec0b4bf
commit 27bb1bd5ea
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -445,7 +445,7 @@ func CreateCgroupConfig(opts *CreateOpts, defaultDevs []*devices.Device) (*confi
if useSystemdCgroup {
if myCgroupPath == "" {
c.Parent = "system.slice"
// Default for c.Parent is set by systemd cgroup drivers.
c.ScopePrefix = "runc"
c.Name = name
} else {