mirror of
https://github.com/containers/podman.git
synced 2025-08-02 17:22:30 +08:00
podman: add new cgroup mode split
When running under systemd there is no need to create yet another cgroup for the container. With conmon-delegated the current cgroup will be split in two sub cgroups: - supervisor - container The supervisor cgroup will hold conmon and the podman process, while the container cgroup is used by the OCI runtime (using the cgroupfs backend). Closes: https://github.com/containers/libpod/issues/6400 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@ -233,9 +233,9 @@ func (r *Runtime) setupContainer(ctx context.Context, ctr *Container) (_ *Contai
|
||||
return nil, errors.Wrapf(err, "error retrieving pod %s cgroup", pod.ID())
|
||||
}
|
||||
ctr.config.CgroupParent = podCgroup
|
||||
case rootless.IsRootless():
|
||||
case rootless.IsRootless() && ctr.config.CgroupsMode != cgroupSplit:
|
||||
ctr.config.CgroupParent = SystemdDefaultRootlessCgroupParent
|
||||
default:
|
||||
case ctr.config.CgroupsMode != cgroupSplit:
|
||||
ctr.config.CgroupParent = SystemdDefaultCgroupParent
|
||||
}
|
||||
} else if len(ctr.config.CgroupParent) < 6 || !strings.HasSuffix(path.Base(ctr.config.CgroupParent), ".slice") {
|
||||
|
Reference in New Issue
Block a user