Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to start pod with rootless container using --cgroup-parent #23780

Closed
mmmmaeda opened this issue Aug 28, 2024 · 0 comments · Fixed by #23858
Closed

Failed to start pod with rootless container using --cgroup-parent #23780

mmmmaeda opened this issue Aug 28, 2024 · 0 comments · Fixed by #23858
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@mmmmaeda
Copy link
Contributor

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.slice
Incorrect(Podman5.2.0-dev): /sys/fs/cgroup/user.slice/pnew-1000.slice/user@1000.service/pnew.slice/pnew-libpod_pod_$POD_ID.slice

Steps to reproduce the issue

Steps to reproduce the issue

  1. Create pod with the option --cgroup-parent.
    podman pod create --cgroup-parent=pnew.slice my-pod
  2. Start 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 version
Client:       Podman Engine
Version:      5.2.0-dev
API Version:  5.2.0-dev
Go Version:   go1.21.11 (Red Hat 1.21.11-1.el9_4)
Git Commit:   8a53e8eb677f4b10f31f69714ab0f3f964e508cd
Built:        Tue Jul 23 12:39:03 2024
OS/Arch:      linux/amd64

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

@mmmmaeda mmmmaeda added the kind/bug Categorizes issue or PR as related to a bug. label Aug 28, 2024
@github-staff github-staff deleted a comment from Superstar-IT Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant