mirror of
https://github.com/containers/podman.git
synced 2025-10-18 03:33:32 +08:00
add libpod/config
Refactor the `RuntimeConfig` along with related code from libpod into libpod/config. Note that this is a first step of consolidating code into more coherent packages to make the code more maintainable and less prone to regressions on the long runs. Some libpod definitions were moved to `libpod/define` to resolve circular dependencies. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
@ -1059,9 +1059,9 @@ func (c *Container) NamespacePath(linuxNS LinuxNS) (string, error) { //nolint:in
|
||||
// CGroupPath returns a cgroups "path" for a given container.
|
||||
func (c *Container) CGroupPath() (string, error) {
|
||||
switch c.runtime.config.CgroupManager {
|
||||
case CgroupfsCgroupsManager:
|
||||
case define.CgroupfsCgroupsManager:
|
||||
return filepath.Join(c.config.CgroupParent, fmt.Sprintf("libpod-%s", c.ID())), nil
|
||||
case SystemdCgroupsManager:
|
||||
case define.SystemdCgroupsManager:
|
||||
if rootless.IsRootless() {
|
||||
uid := rootless.GetRootlessUID()
|
||||
return filepath.Join(c.config.CgroupParent, fmt.Sprintf("user-%d.slice/user@%d.service/user.slice", uid, uid), createUnitName("libpod", c.ID())), nil
|
||||
|
Reference in New Issue
Block a user