Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions cgroup/manager_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package cgroup

import (
"path/filepath"
"strings"

"github.com/opencontainers/runc/libcontainer/cgroups"
"github.com/opencontainers/runc/libcontainer/cgroups/fs"
Expand Down Expand Up @@ -37,6 +38,13 @@ func newAllCGroupManager(cgroupFile string, cgroupMount string, log *zap.Sugared

// prefix the cgroup path with the mount point path
for subsystem, path := range cgroupPaths {
// Skip named hierarchies (e.g. "name=systemd"): they are not resource controllers
// and their mount directory name differs from the subsystem key, making the path wrong.
if strings.HasPrefix(subsystem, "name=") {
delete(cgroupPaths, subsystem)
continue
}

log.Debugw("adding cgroup subsystem path to manager", tags.SubsystemKey, subsystem, tags.PathKey, path)
cgroupPaths[subsystem] = filepath.Join(cgroupMount, subsystem, path)
}
Expand Down