-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
podman stats not working, returns cgroup deleted with systemd enabled container on ubuntu 20.04 #10602
Comments
Running as root, or rootless? |
Sorry, i forgot to mention it: running as root. Containers without entrypoint=/sbin/init are fine as well. |
Alright. Probably systemd mode, then - we do some things with cgroups on v1 to make systemd work in a container. I wonder if this has been broken for years, but no one has run |
Quite possible. I can confirm that the same setup but with cgroup v2 (via kernel parameter) works like expected. |
seems to work fine on Fedora 24 with cgroup v1. Could you please attach the output for |
@giuseppe sure, here is the tail. Ping me if you need the full trace:
|
thanks! Could you also give me the output for: |
I assume you want the /proc/self/mountinfo for the host? It might be a bit confusing:
|
I see what happens. systemd moves itself to a different cgroup under the named hierarchy and that might confuse the cgroup detection code. |
opened a PR: #10609 |
when looking up the container cgroup, ignore named hierarchies since containers running systemd as payload will create a sub-cgroup and move themselves there. Closes: containers#10602 Signed-off-by: Giuseppe Scrivano <[email protected]>
when looking up the container cgroup, ignore named hierarchies since containers running systemd as payload will create a sub-cgroup and move themselves there. Closes: containers#10602 Signed-off-by: Giuseppe Scrivano <[email protected]>
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
I can not get stats from a ubuntu 20.04 container on a ubuntu 20.04 host with cgroup v1 and systemd in the container using podman 3.1.2.
Same setup works on a fedora host with cgroup v2. Maybe it is related to #9252 ?
Steps to reproduce the issue:
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
No
The text was updated successfully, but these errors were encountered: