-
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
Port forwarding with podman machine for 127.0.0.1 should work #11528
Comments
Thanks for the issue. Fixing this is unfortunately not as easy as I would like. |
FYI, podman will use CNI as a default rootless_networking method in macOS from the next release. |
A friendly reminder that this issue had no activity for 30 days. |
Yes I started to work on this but other things have higher priorities. |
No problem |
Would this be the same problem as the port mapping for pods happening inside the podman machine VM instead of on the host on OS X? See below:
Creating a container on the host. Port mapping is fine:
Creating a pod on the host. Port mapping is messed up (accessible from within the podman machine VM):
|
@convexset That looks like a separate issue, please open a new one. |
FYI, I think once this is fixed, https://github.com/kubernetes-sigs/kind should be able to work OOTB with podman! |
Should we close this issue? |
@rhatdan why? |
I am working on it right now |
@ncdc sorry I read: |
Docker supports the notion of |
@colinbendell Port ranges are already supported |
Digging deeper, it looks like an EXPOSE problem where port ranges aren't supported. All good; shouldn't be a concern then for this PR. |
This commits adds port forwarding logic directly into podman. The podman-machine cni plugin is no longer needed. The following new features are supported: - works with cni, netavark and slirp4netns - ports can use the hostIP to bind instead of hard coding 0.0.0.0 - gvproxy no longer listens on 0.0.0.0:7777 (requires a new gvproxy version) - support the udp protocol With this we no longer need podman-machine-cni and should remove it from the packaging. There is also a change to make sure we are backwards compatible with old config which include this plugin. Fixes containers#11528 Fixes containers#11728 [NO NEW TESTS NEEDED] We have no podman machine test at the moment. Please test this manually on your system. Signed-off-by: Paul Holzinger <[email protected]>
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
When using podman machine (created via simple
podman machine init
/podman machine start
) on macOS, port forwarding with explicit127.0.0.1
for host does not work, most likely because the listen address is passed as is into the virtual machine, and then the proxy tool cannot connect to the virtual machine's port (which is visible by stray error log entries from tcpproxy).Steps to reproduce the issue:
Describe the results you received:
cURL call to 28888 in the above example fails, while the same call to 18888 succeeds.
Describe the results you expected:
Both calls succeed.
Additional information you deem important (e.g. issue happens only occasionally):
Discovered this when trying to use podman instead of Docker Deskop together with some internal script which always uses 127.0.0.1 for listen host (and cannot be configured not to do so).
Note that Docker for Mac supports 127.0.0.1 as expected, so the above commands reproduced with Docker work.
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 (3.3.1 seems like the latest version now)
Additional environment details (AWS, VirtualBox, physical, etc.):
Running under macOS Big Sur 11.5.2
The text was updated successfully, but these errors were encountered: