-
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
Requests to socket activated endpoints on the same host fail when using pasta #24613
Comments
If your domain resolves to the ip of the host and this is the main interface then this ip is copied by pasta into namesapce. As such if you connect to it from within the namesapce it will stay local to that namesapce and routed to the host. https://blog.podman.io/2024/03/podman-5-0-breaking-changes-in-detail/ (see the pasta section) So you should be able to connect to host.containers.internal instead but I think this is only connecting to ipv4 not ipv6. So you may need to specify your own --map-guest-addr option with an ipv6 address but I haven't tested that so far. |
Interesting. The systemd socket is binding to both ipv4 and ipv6, so doing Only problem is that I would want my domain ( |
|
That does indeed work, thanks! Couldn't find that anywhere ;) So I think this issue can be closed? I still don't fully understand why it was working without the socket activation, but I might understand after taking a closer look tomorrow. |
So I figured it out. It was working before switching to socket activation because the target container has a shared network with caddy. After switching it still has the shared network, but caddy doesn't accept the requests anymore so they fail. Because adding |
Issue Description
Containers can't make requests to other containers on the same host when using pasta and systemd socket activation. We encountered this issue when trying to use matrix and other containers with matrix integration on the same host. The problem does not occur when using slirp4netns or host networking.
It's a bit difficult to explain. I hope the reproduce section clarifies the issue.
Steps to reproduce the issue
$ podman run -it --rm alpine wget https://[domain of host]
on the same host as the socket activated caddy instance. It outputs:This command does work when executed on any other host.
$ podman run -it --net=host --rm alpine wget https://[domain of host]
or$ podman run -it --net=slirp4netns --rm alpine wget https://[domain of host]
does work:Describe the results you received
I can't make requests to the same host when using caddy, pasta and systemd socket activation.
Describe the results you expected
A successful requests.
podman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
No
Additional environment details
The host is running Fedora CoreOS 41.20241027.3.0.
Additional information
Tried with
pasta 0^20240906.g6b38f07-1.fc41.aarch64-pasta
andpasta 0^20241030.gee7d0b6-1.fc42.x86_64-pasta
. I wasn't able to get podman 5.3 to install on CoreOS.The text was updated successfully, but these errors were encountered: