Bug 1988252
| Summary: | API: libpod/containers/<id>/stats for unprivileged mode unexpectedly succeeds and has wrong CPU and network numbers | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Martin Pitt <mpitt> |
| Component: | podman | Assignee: | Aditya R <arajan> |
| Status: | CLOSED WONTFIX | QA Contact: | atomic-bugs <atomic-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 8.5 | CC: | arajan, bbaude, dwalsh, jhonce, jligon, jnovy, lsm5, mheon, mmarusak, pthomas, tsweeney, umohnani |
| Target Milestone: | beta | Flags: | pm-rhel:
mirror+
|
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2023-01-30 07:27:44 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Martin Pitt
2021-07-30 07:18:20 UTC
> {"usage":48406528
I also doubt that, TBH. In a fresh boot of my test VM, this starts out as "usage":153837568, i.e. 153 MB. The sole process in that busybox is "sh", and on the host it shows 640 kB residential and 1.3 MB virtual memory:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
admin 1461 0.0 0.0 1328 644 pts/0 Ss+ 03:26 0:00 sh
so this is much too high. The total used memory in that VM (according to free -h) is 226 MB.
I think this is expected to work, but only for cgroupsv2 systems. We likely messed up and enabled it for v1 at the same time. The code we use for determining what cgroup to read stats from is sufficiently robust that it is determining the container's cgroup, but since you're on a v1 system the container does not have a dedicated cgroup, so I imagine we're getting the stats for the user's overall cgroup and reporting them as the stats for the individual container. Easiest fix is to disable the endpoint if we detect we're on v1 - throwing a 500 seems appropriate, since we can't give sane responses. > throwing a 500 seems appropriate
Matthew: Agreed - as I mentioned in the description, that's what the previous version did, and the CLI still does, so that would fix things. I don't think RHEL 8.Y will ever switch to cgroupvsv2 by default (or even support them)?
Jhon, can you take a peak at this please? In cockpit-podman we switched to `libpod/containers/stats` endpoint so we don't see this happening for us anymore. But I just checked with current rhel-8-5 image and it is still affected. Can you please check again now Matej? It is still happening. Has there been any work done on this? kernel-4.18.0-348.el8.x86_64 podman-3.3.1-9.module+el8.5.0+12697+018f24d7.x86_64 runc-1.0.2-1.module+el8.5.0+12582+56d94c81.x86_64 @jhonce any thoughts? After evaluating this issue, there are no plans to address it further or fix it in an upcoming release. Therefore, it is being closed. If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened. The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days |