summaryrefslogtreecommitdiff
path: root/libpod/pod_internal.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-08-13 15:39:11 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-08-15 18:07:04 +0000
commit0998808a752a8a7ae43f2630023b22c1b3de47a4 (patch)
tree7307d450f56898f5779c324b8c75efd2b40060f0 /libpod/pod_internal.go
parentad7d46957156a2ab9ae5bae6b4e337d941a3b971 (diff)
downloadpodman-0998808a752a8a7ae43f2630023b22c1b3de47a4.tar.gz
podman-0998808a752a8a7ae43f2630023b22c1b3de47a4.tar.bz2
podman-0998808a752a8a7ae43f2630023b22c1b3de47a4.zip
Create pod CGroups when using the systemd cgroup driver
Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #1266 Approved by: baude
Diffstat (limited to 'libpod/pod_internal.go')
-rw-r--r--libpod/pod_internal.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/libpod/pod_internal.go b/libpod/pod_internal.go
index c8d8405bb..1ba4487ab 100644
--- a/libpod/pod_internal.go
+++ b/libpod/pod_internal.go
@@ -2,6 +2,7 @@ package libpod
import (
"context"
+ "fmt"
"path/filepath"
"strings"
"time"
@@ -67,8 +68,11 @@ func (p *Pod) refresh() error {
if p.config.UsePodCgroup {
switch p.runtime.config.CgroupManager {
case SystemdCgroupsManager:
- // NOOP for now, until proper systemd cgroup management
- // is implemented
+ cgroupPath, err := systemdSliceFromPath(p.config.CgroupParent, fmt.Sprintf("libpod_pod_%s", p.ID()))
+ if err != nil {
+ logrus.Errorf("Error creating CGroup for pod %s: %v", p.ID(), err)
+ }
+ p.state.CgroupPath = cgroupPath
case CgroupfsCgroupsManager:
p.state.CgroupPath = filepath.Join(p.config.CgroupParent, p.ID())