-
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
kube play
: Cannot set shmsize when running in the host IPC Namespace
#16632
Comments
After I made my patch, I get another error.
|
Can you open a PR for the first fix? @giuseppe thoughts on the second issue? You might have to move to cgroupv2. |
hello @rhatdan Also, I think the second error is not caused by cgroupv2. Moreover, here is the default configure file in the podman image; you can see that cgroup is disabled in the root mode.
That means the error won't be raised (L365). Lines 350 to 376 in c49de22
(if cgroup="disabled" , s.NoCgroups will be true)Lines 1142 to 1160 in c49de22
However, podman/pkg/specgenutil/specgen.go Lines 529 to 537 in c49de22
It fills up the s.CgroupsMode and returns specgen.SpecGenerator and entities.ContainerCreateOptions , but the ToSpecGen function doesn't set this field.
At the end, I did a very roughly patch to fix my problem. I hope I described before can help you fix this problem easier :D. |
the patch LGTM. Could you add it to your open PR? |
Sure, let me add a unit test too |
Merged |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Get the error message
Error: invalid config provided: cannot set shmsize when running in the {host } IPC Namespace
when using the root fullkube play
command.Steps to reproduce the issue:
You can use this command to reproduce the error.
busybox.yaml
Describe the results you received:
Describe the results you expected:
Container runs successfully.
Output of
podman version
:Output of
podman info
:Package info (e.g. output of
rpm -q podman
orapt list podman
orbrew info 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.):
I checked the code and find an override logic in
Inherit
function.podman/pkg/specgen/generate/container_create.go
Lines 614 to 617 in a891199
I think this override logic never be executed.
It's because the variable
s
was unmarshaled fromcompatibleOptions
, andlibpod.InfraInherit
doesn't have theipcns
field. And that meanss.IpcNS.NSMode
always is empty.Therefore, I think this is the correct version; change the
s.IpcNS.NSMode
to theinheritSpec.IpcNS.NSMode
The text was updated successfully, but these errors were encountered: