-
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 container clone] the memory swappiness tuning doesn't play well on cgroup2 system #13916
Comments
I will add a check for cgroupsv2 and return an error. |
resolves containers#13916 Signed-off-by: cdoern <[email protected]>
Oh I see, this is only a check that happens when a container is run @chuanchang if you start the container it fails so I will add a clone specific check |
actually I am unsure if this is a clone bug... @rhatdan |
@chuanchang discussed this with the team and it is the intended behavior that cgroups related configs are validated at runtime. |
It works well on cgroupv1 system, but an expected error can't be raised on cgroupv2 system even though the cloned contaier is started later, please see details at above "Describe the results you received:" section, I will list it here again.
|
Cant start my container anymore. What can i do?
|
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
The memory swappiness tuning doesn' t support on cgroup2 system
Steps to reproduce the issue:
$ ./bin/podman run --name mycnt1 -d quay.io/libpod/alpine sleep 99999
$ ./bin/podman container clone --memory-swappiness=101 mycnt1 --name mycnt1-clone
Describe the results you received:
[ajia@Fedora35 podman]$ grep cgroup /proc/mounts
cgroup2 /sys/fs/cgroup cgroup2 rw,seclabel,nosuid,nodev,noexec,relatime 0 0
[ajia@Fedora35 podman]$ ./bin/podman run --name mycnt1 -d quay.io/libpod/alpine sleep 99999
16e5d62424cffbc9df7f6dd11742b78d06e55274ca856f910623189fbce681c0
[ajia@Fedora35 podman]$ ./bin/podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
16e5d62424cf quay.io/libpod/alpine:latest sleep 99999 4 seconds ago Up 4 seconds ago mycnt1
[ajia@Fedora35 podman]$ ./bin/podman container clone --memory-swappiness=101 mycnt1 --name mycnt1-clone
ac217d7481b0f935b63a3fe8f650953c4c115c618f7c22ef775575208a4c0997
NOTE: without any error output like "Error: invalid value: 101, valid memory swappiness range is 0-100"
[ajia@Fedora35 podman]$ ./bin/podman start mycnt1-clone
mycnt1-clone
NOTE: the container can be staring successfully w/o error like "Error: invalid value: 101, valid memory swappiness range is 0-100" too.
[ajia@Fedora35 podman]$ ./bin/podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ac217d7481b0 quay.io/libpod/alpine:latest sleep 99999 53 minutes ago Up 52 minutes ago mycnt1-clone
Describe the results you expected:
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.): physical
The text was updated successfully, but these errors were encountered: