-
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
Wrong memory limit stats from podman's remote stats API #14676
Comments
Hi @pjknkda , Thanks for creating the issue. One difference i found is that in case of cgroupv2 I am unable to find why do we have a suffix for diff --git a/src/libcrun/cgroup-systemd.c b/src/libcrun/cgroup-systemd.c
index 4931fce..04fa943 100644
--- a/src/libcrun/cgroup-systemd.c
+++ b/src/libcrun/cgroup-systemd.c
@@ -885,9 +885,6 @@ find_systemd_subgroup (json_map_string_string *annotations, int cgroup_mode)
return annotation;
}
- if (cgroup_mode == CGROUP_MODE_UNIFIED)
- return "container";
-
return NULL;
} |
I am looking at it, I am still not 100% sure where this should be fixed. |
use the memory limit specified for the container instead of reading it from the cgroup. It is not reliable to read it from the cgroup since the container could have been moved to a different cgroup and in general the OCI runtime might create a sub-cgroup (like crun does). Closes: containers#14676 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
opened a PR #14677 |
use the memory limit specified for the container instead of reading it from the cgroup. It is not reliable to read it from the cgroup since the container could have been moved to a different cgroup and in general the OCI runtime might create a sub-cgroup (like crun does). Closes: containers#14676 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
I am getting this error with v4.1.1: #16007 |
Description
podman
remote stats API reports wrong "memory_limit" stats for memory-limited container when the container is launched withcrun
. I am not sure whether the issue comes frompodman
orcrun
, but decided to report here because the issue is gone if I change the runtime torunc
.How to reproduce
Run rootful podman API daemon
Launch a container with latest
crun
runtime with memory limitCheck the output from
podman
's remote stats APIConfirm that
memory_stats.limit
is wrongly reported.Repeat the same procedure with
runc
runtimeConfirm that
memory_stats.limit
is correctly reported.Environment
The text was updated successfully, but these errors were encountered: