From 93d1a1a6eaaaccaad0e3a178b5f0a46e15223f7a Mon Sep 17 00:00:00 2001 From: Mrunal Patel Date: Tue, 15 Mar 2016 12:15:16 -0700 Subject: [PATCH] Set Delegate to true for cgroups transient units This is required because we manage some of the cgroups ourselves. This recommendation came from talking with systemd devs about some of the issues that we see when using the systemd cgroups driver. Signed-off-by: Mrunal Patel --- libcontainer/cgroups/systemd/apply_systemd.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libcontainer/cgroups/systemd/apply_systemd.go b/libcontainer/cgroups/systemd/apply_systemd.go index 63a14b4c..ad2ab028 100644 --- a/libcontainer/cgroups/systemd/apply_systemd.go +++ b/libcontainer/cgroups/systemd/apply_systemd.go @@ -193,6 +193,8 @@ func (m *Manager) Apply(pid int) error { systemdDbus.PropSlice(slice), systemdDbus.PropDescription("docker container "+c.Name), newProp("PIDs", []uint32{uint32(pid)}), + // This is only supported on systemd versions 218 and above. + newProp("Delegate", true), ) // Always enable accounting, this gets us the same behaviour as the fs implementation,