diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2020-06-18 13:56:30 +0200 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2020-06-25 17:16:12 +0200 |
commit | 6ee5f740a4ecb70636b888e78b02065ee984636c (patch) | |
tree | fb01a86c33a53b78420426a6780ce938b25d068f /libpod/container_validate.go | |
parent | 35cca198b31582b75304e3614f8942b83a38422e (diff) | |
download | podman-6ee5f740a4ecb70636b888e78b02065ee984636c.tar.gz podman-6ee5f740a4ecb70636b888e78b02065ee984636c.tar.bz2 podman-6ee5f740a4ecb70636b888e78b02065ee984636c.zip |
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>
Diffstat (limited to 'libpod/container_validate.go')
-rw-r--r-- | libpod/container_validate.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libpod/container_validate.go b/libpod/container_validate.go index b7f0aadff..a53a1839d 100644 --- a/libpod/container_validate.go +++ b/libpod/container_validate.go @@ -34,6 +34,10 @@ func (c *Container) validate() error { return errors.Wrapf(define.ErrInvalidArg, "cannot both create a network namespace and join another container's network namespace") } + if c.config.CgroupsMode == cgroupSplit && c.config.CgroupParent != "" { + return errors.Wrapf(define.ErrInvalidArg, "cannot specify --cgroup-mode=split with a cgroup-parent") + } + // Not creating cgroups has a number of requirements, mostly related to // the PID namespace. if c.config.NoCgroups || c.config.CgroupsMode == "disabled" { |