mirror of
https://github.com/containers/podman.git
synced 2025-10-18 19:53:58 +08:00
libpod: improve heuristic to detect cgroup
improve the heuristic to detect the scope that was created for the container. This is necessary with systemd running as PID 1, since it moves itself to a different sub-cgroup, thus stats would not account for other processes in the same container. Closes: https://github.com/containers/podman/issues/12400 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@ -2618,7 +2618,7 @@ func (c *Container) getOCICgroupPath() (string, error) {
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return filepath.Join(selfCgroup, "container"), nil
|
||||
return filepath.Join(selfCgroup, fmt.Sprintf("libpod-payload-%s", c.ID())), nil
|
||||
case cgroupManager == config.SystemdCgroupsManager:
|
||||
// When the OCI runtime is set to use Systemd as a cgroup manager, it
|
||||
// expects cgroups to be passed as follows:
|
||||
|
Reference in New Issue
Block a user