-
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 rootless container with --uidmap and --pod cannot bind to ports below 1024 #12669
Comments
In the latest branch, I believe specifying a UIDmap different then the pod you are joining, is not allowed. Basically --uidmap and --pod should conflict, if you want to create a pod in a particular UserNS mapping, then you need to do it at Pod Creation. All containers of a POD have to run within the PODs user namespace. (At least if they are sharing the userns. |
@cdoern Am I correct in assuming these conflict? |
Yes, I think that conflict is supposed to happen. You should be able to resolve this by setting |
Yes, that's accurate - the two options should be mutually-exclusive assuming that any namespaces are shared by the pod. |
Thank you für the quick reply. I now usw --uidmap on the pod and it works as expected. Do you want me to keep this issue open as a reminder to have --pod and --uidmap conflicting? |
Yes, @cdoern Can you open a PR to stop --uidman/--gidmap on the client if you are in a Pod. |
Sure @rhatdan, I'll just put it at the cmd level |
add a check in namespaceOptions() that ensures the user is not setting a new uid/gid map if entering or creating a pod that has an infra container resolves containers#12669 Signed-off-by: cdoern <cdoern@redhat.com>
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
When using --uidmap and --pod on a rootless container, the container cannot bind to port 80.
Steps to reproduce the issue:
and see it fail.
Describe the results you received:
The container is not able to bind to port 80
Describe the results you expected:
The container is able to bind to port 80
Additional information you deem important (e.g. issue happens only occasionally):
Issue happens on my fedora core OS box with SELinux and on my arch notebook without SELinux.
sudo sysctl net.ipv4.ip_unprivileged_port_start=30
does not help either. The problem persists with other images (tested with nextcloud)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/master/troubleshooting.md)
Yes, Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
The text was updated successfully, but these errors were encountered: