Failed to start pod with rootless container using --cgroup-parent #23780
Labels
kind/bug
Categorizes issue or PR as related to a bug.
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
Issue Description
In Podman5.2.0-dev, if the --cgroup-parent option is used when creating a Pod, the Pod fails to start.
In Podman4.4.1, pod starts successfully with the same option.
When comparing the two versions, it appears that in Podman5.2.0-dev, the cgroup path following /sys/fs/cgroup/user.slice is not named
user
, but rather it is named after the parent slice.--cgroup-parent=pnew.slice:
Correct(Podman4.4.1): /sys/fs/cgroup/user.slice/user-1000.slice/user@1000.service/
pnew
.slice/pnew
-libpod_pod_$POD_ID.sliceIncorrect(Podman5.2.0-dev): /sys/fs/cgroup/user.slice/
pnew
-1000.slice/user@1000.service/pnew
.slice/pnew
-libpod_pod_$POD_ID.sliceSteps to reproduce the issue
Steps to reproduce the issue
--cgroup-parent
.podman pod create --cgroup-parent=pnew.slice my-pod
podman pod start my-pod
Describe the results you received
$ podman pod create --cgroup-parent=pnew.slice my-pod
a4ce4d9c04d357922b461b109c1440e4bc280ed805d91e53f9e18e0ea947386a
$ podman pod start my-pod
Error: starting container 62e745dd38edf151927d4f3845620461b5901a7fc97588eb42ebe0d211e32883: unable to create pod cgroup for pod a4ce4d9c04d357922b461b109c1440e4bc280ed805d91e53f9e18e0ea947386a: creating cgroup user.slice/pnew-1000.slice/user@1000.service/pnew.slice/pnew-libpod_pod_a4ce4d9c04d357922b461b109c1440e4bc280ed805d91e53f9e18e0ea947386a.slice: Unit pnew-libpod_pod_a4ce4d9c04d357922b461b109c1440e4bc280ed805d91e53f9e18e0ea947386a.slice was already loaded or has a fragment file
Describe the results you expected
Successfully start the Pod.
podman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
No response
Additional information
The cgroup path for rootless containers has been changed in the following:
5121c9e
The text was updated successfully, but these errors were encountered: