-
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
Can't adjust fs.mqueue.* sysctls inside rootless container #5369
Comments
Works for me on f32? |
@rhatdan Thank you for the suggestion, but setting SELinux to Permissive was the first thing that I've tried. I should've mentioned it in the OP - sorry.
|
Try with --privileged, to see if it is dropped caps or seccomp. |
Tried as instructed (with SELinux in Enforcing and Permissive mode), got the same result.
|
Ok it looks like user namespace then. podman unshare cat /proc/sys/fs/mqueue/msg_max |
$ podman run --rm docker.io/library/centos ls -l /sys/fs/mqueue/msg_max |
Okay, I've modified the msg_max parameter to a value on the host machine to one different than default (10) to illustrate better. No idea if this will help but trying my best to make things easier for everyone involved.
For the last three I'm guessing there should be a /proc prefixed to the path:
The contents of my /etc/subuid and /etc/subgid were generated during installation and weren't modified:
|
@giuseppe Does this work for you? |
I think the kernel is blocking it:
|
So this is a kernel issue. |
I still experience this issue with podman. I am able to set --sysctl fs.mqueue.msg_max=50 correctly with docker |
Are you running podman as root user? |
no, I am running rootless as per the setup instructions: https://wiki.archlinux.org/title/Podman#Rootless_Podman Using the example mentioned in this issue
A proposed solution is mentioned: https://bbs.archlinux.org/viewtopic.php?id=253966 and #4162 however setting I have also tried
|
an unprivileged user cannot change that value. You need to be root on the host. Said so, with some manual hacks, root on the host could change that setting for the unprivileged container as well, but this must be done after the container already runs and the namespaces are created (you need to use |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Hello,
Let me preface everything with me saying that I'm not sure this is a bug or just me lacking experience and going against conventional wisdom. If that's the case - forgive me.
I'm trying to create a container as a rootless user with custom values for kernel parameters regarding message queues (fs.mqueue.*) with the --sysctl switch but I'm unable to do so.
The host machine running podman is a stock Fedora 31 system with no configuration file change.
The
podman run
command listed below runs successfuly when executed withsudo
but I need it to work without root privileges.Steps to reproduce the issue:
podman run --rm --name sysctl-test --sysctl fs.mqueue.msg_max=20 docker.io/library/centos
Describe the results you received:
Error: open /proc/sys/fs/mqueue/msg_max: Permission denied: OCI runtime permission denied error
Describe the results you expected:
Successful creation and startup of a CentOS container with modified fs.mqueue.msg_max value
Additional information you deem important (e.g. issue happens only occasionally):
Aforementioned error seems to appear only in regards to the fs.mqueue.* parameters.
I've tried modifying other parameters which are listed as namespaced in the podman documentation with the
--sysctl
switch and they were successfulExample:
podman run --rm --name sysctl-test --sysctl net.ipv4.ip_forward=0 docker.io/library/centos
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):The text was updated successfully, but these errors were encountered: