-
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
--cpu fails with podman run in the vm for macos #13054
Comments
@baude @ashley-cui @flouthoc is this something we should do in the ignition script? |
If systemd path exists we could do that in ignition or i guess it should even work if we prepopulate the path, I'll try this . We should only do it if its @giuseppe Could you suggest if is there any other problem if CPU delegation is done by default for |
I don't see any risk for the Podman VM. The only reason systemd doesn't do that by default is because the CPU controller is expensive, so creating many cgroups could slowdown the kernel. |
@giuseppe Thanks for confirming I created a PR which delegates @jarrellmark Above PR should close this issue. Could you please try this patch on your podman-remote run --cpus 1 -it alpine /bin/sh |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Using podman run --cpu flag fails under macOS using the podman machine vm.
This can be solved by doing:
podman machine ssh
And following these instructions: https://github.com/containers/podman/blob/main/troubleshooting.md#26-running-containers-with-cpu-limits-fails-with-a-permissions-error
I'd recommend the podman machine to have /etc/systemd/system/user@.service.d/delegate.conf configured by default to allow the --cpu flag to work.
Steps to reproduce the issue:
On macOS
Start a new podman machine: podman machine init
Start the podman machine: podman machine start
Try running a container with the --cpu flag: podman run --cpu 1 -it alpine /bin/sh
Describe the results you received:
Error: opening file
cpu.max
for writing: Permission denied: OCI runtime permission denied errorDescribe the results you expected:
Expected to see a busybox shell running in alpine.
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)
No
Additional environment details (AWS, VirtualBox, physical, etc.):
macOS
The text was updated successfully, but these errors were encountered: