Skip to content

Commit

Permalink
Merge pull request #2162 from giuseppe/ignore-cgroupv1-controllers
Browse files Browse the repository at this point in the history
cgroups: ignore ownership for cgroup v1 controllers
  • Loading branch information
openshift-merge-bot[bot] authored Sep 18, 2024
2 parents 315d7c1 + cb8be07 commit db81457
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/cgroups/cgroups_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,12 @@ func UserOwnsCurrentSystemdCgroup() (bool, error) {
continue
}

// If we are on a cgroup v2 system and there are cgroup v1 controllers
// mounted, ignore them when the current process is at the root cgroup.
if cgroup2 && parts[1] != "" && parts[2] == "/" {
continue
}

var cgroupPath string

if cgroup2 {
Expand Down

0 comments on commit db81457

Please sign in to comment.