aboutsummaryrefslogtreecommitdiff
path: root/libpod/container_internal.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-03-21 12:19:26 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-05-11 14:43:57 +0000
commit853c5c41f1a0f65815674cce0777a20de24c8309 (patch)
tree76d7c1569b1a08f2b0b738c9a96e7f8fceb4b254 /libpod/container_internal.go
parentdf83d361e4fe3c1fc1939b096cb21aa2e7ec3d74 (diff)
downloadpodman-853c5c41f1a0f65815674cce0777a20de24c8309.tar.gz
podman-853c5c41f1a0f65815674cce0777a20de24c8309.tar.bz2
podman-853c5c41f1a0f65815674cce0777a20de24c8309.zip
Add --cgroup-manager flag to Podman binary
Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #507 Approved by: baude
Diffstat (limited to 'libpod/container_internal.go')
-rw-r--r--libpod/container_internal.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index 1098dc66c..816e7bd31 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -1133,7 +1133,9 @@ func (c *Container) generateSpec(ctx context.Context) (*spec.Spec, error) {
// When runc is set to use Systemd as a cgroup manager, it
// expects cgroups to be passed as follows:
// slice:prefix:name
- g.SetLinuxCgroupsPath(path.Base(c.config.CgroupParent) + ":" + "libpod" + ":" + c.ID())
+ systemdCgroups := fmt.Sprintf("%s:libpod:%s", path.Base(c.config.CgroupParent), c.ID())
+ logrus.Debugf("Setting CGroups for container %s to %s", c.ID(), systemdCgroups)
+ g.SetLinuxCgroupsPath(systemdCgroups)
} else {
cgroupPath, err := c.CGroupPath()
if err != nil {