-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Cannot start rootless containers via docker-compose #19829
Comments
I take it from the reproducer that Compose sets oom-sore-adj by default on all containers? |
Ah, you note that it does in additional information. I'm reluctant to make failures on oom_score_adj nonfatal by default, but given this breaks compose, we may not have many options. @vrothberg Do you have an opinion here? |
This would only effect rootless mode in compatibility correct. We could assume that if oom-score-adj=0 and compatibility mode and rootless mode, then warn. |
It will impact any rootless container, not only the ones created via the compat API. I somehow agree with Lennart's take in systemd/systemd#29032 (comment):
I don't think it's worth arguing much. Podman will be more portable if we make it smarter in dealing with oom_score_adj when running rootless. @giuseppe WDYT? |
would we break anything if we just do not set |
since we have no control on Docker Compose and the value is hardcoded, we probably need a check to clamp the oom |
That is a great idea and aligns with Lennart's comment. Shall we still allow setting it to a higher value than the current one? |
yes, setting to a higher value is fine |
I can play with it and see how the idea works |
opened a PR: #19843 |
when running rootless, if the specified oom_score_adj for the container process is lower than the current value, clamp it to the current value and print a warning. Closes: containers#19829 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
when running rootless, if the specified oom_score_adj for the container process is lower than the current value, clamp it to the current value and print a warning. Closes: containers#19829 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> (cherry picked from commit 8b4a79a)
when running rootless, if the specified oom_score_adj for the container process is lower than the current value, clamp it to the current value and print a warning. Closes: containers#19829 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> (cherry picked from commit 8b4a79a)
FWIW, I get this error even when |
Is there a work-around like an environment or config variable I can set? My distro is currently stuck at podman 4.6.1. Found it:
crun version 1.8.7 works fine |
Issue Description
Since commit systemd/systemd@ce7de0b systemd user instance runs with reduced oom_score_adj. This is a PITA for podman and rootless containers because they may fail to start because they cannot set oom_score_adj = 0 (lower than the default 100) and they treat it fatally.
Steps to reproduce the issue
Steps to reproduce the issue
Describe the results you received
First service of docker-compose definition fails to start.
Describe the results you expected
All service container start.
podman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
No
Additional environment details
Additional information
I suspect the fix is not effective because docker-compose explicitly synthesizes explicit
"OomScoreAdj": 0
.I find it better to treat failure to set
oom_score_adj
as a soft error (report a warning, don't fail the container start, it's only a hint, it won't ensure QoS afterall).The text was updated successfully, but these errors were encountered: