diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-06-29 10:53:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-29 10:53:41 -0400 |
commit | 6ac009d5304127f6758be157c7302646e5a481e5 (patch) | |
tree | 75f186484198eb84f18c575e86032e25d5e819a3 /libpod/oci_conmon_linux.go | |
parent | 771c887010709cdf718be252ca91a852c6735da7 (diff) | |
parent | 6ee5f740a4ecb70636b888e78b02065ee984636c (diff) | |
download | podman-6ac009d5304127f6758be157c7302646e5a481e5.tar.gz podman-6ac009d5304127f6758be157c7302646e5a481e5.tar.bz2 podman-6ac009d5304127f6758be157c7302646e5a481e5.zip |
Merge pull request #6666 from giuseppe/conmon-delegate
podman: add new cgroup mode split
Diffstat (limited to 'libpod/oci_conmon_linux.go')
-rw-r--r-- | libpod/oci_conmon_linux.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libpod/oci_conmon_linux.go b/libpod/oci_conmon_linux.go index d8a89047e..26e5d70b0 100644 --- a/libpod/oci_conmon_linux.go +++ b/libpod/oci_conmon_linux.go @@ -881,6 +881,12 @@ func (r *ConmonOCIRuntime) createOCIContainer(ctr *Container, restoreOptions *Co return err } + if ctr.config.CgroupsMode == cgroupSplit { + if err := utils.MoveUnderCgroupSubtree("supervisor"); err != nil { + return err + } + } + args := r.sharedConmonArgs(ctr, ctr.ID(), ctr.bundlePath(), filepath.Join(ctr.state.RunDir, "pidfile"), ctr.LogPath(), r.exitsDir, ociLog, ctr.LogDriver(), logTag) if ctr.config.Spec.Process.Terminal { @@ -1173,7 +1179,7 @@ func (r *ConmonOCIRuntime) sharedConmonArgs(ctr *Container, cuuid, bundlePath, p "--socket-dir-path", r.socketsDir, } - if r.cgroupManager == config.SystemdCgroupsManager && !ctr.config.NoCgroups { + if r.cgroupManager == config.SystemdCgroupsManager && !ctr.config.NoCgroups && ctr.config.CgroupsMode != cgroupSplit { args = append(args, "-s") } @@ -1275,7 +1281,7 @@ func (r *ConmonOCIRuntime) moveConmonToCgroupAndSignal(ctr *Container, cmd *exec // If cgroup creation is disabled - just signal. switch ctr.config.CgroupsMode { - case "disabled", "no-conmon": + case "disabled", "no-conmon", cgroupSplit: mustCreateCgroup = false } |