Skip to content

Commit

Permalink
Merge pull request #3811 from haircommander/root-cgroup-no-init-1.1
Browse files Browse the repository at this point in the history
[1.1] libctr/cgroups: don't take init's cgroup into account
  • Loading branch information
mrunalp authored Apr 7, 2023
2 parents 9c1c844 + 10cfd81 commit 53333a5
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions libcontainer/cgroups/systemd/v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,14 +273,7 @@ func getSubsystemPath(slice, unit, subsystem string) (string, error) {
return "", err
}

initPath, err := cgroups.GetInitCgroup(subsystem)
if err != nil {
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")

return filepath.Join(mountpoint, initPath, slice, unit), nil
return filepath.Join(mountpoint, slice, unit), nil
}

func (m *legacyManager) Freeze(state configs.FreezerState) error {
Expand Down

0 comments on commit 53333a5

Please sign in to comment.