fix init.scope in cgroup paths

Signed-off-by: Seth Jennings <sjenning@redhat.com>
This commit is contained in:
Seth Jennings 2016-07-26 20:57:38 -05:00
parent 5226749985
commit 4b44b98596
1 changed files with 2 additions and 0 deletions

View File

@ -388,6 +388,8 @@ func getSubsystemPath(c *configs.Cgroup, subsystem string) (string, error) {
if err != nil { if err != nil {
return "", err return "", err
} }
// if pid 1 is systemd 226 or later, it will be in init.scope, not the root
initPath = strings.TrimSuffix(filepath.Clean(initPath), "init.scope")
slice := "system.slice" slice := "system.slice"
if c.Parent != "" { if c.Parent != "" {