Skip to content
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 should not add host.containers.internal for ipvlan networks #11351

Closed
nivekuil opened this issue Aug 29, 2021 · 5 comments · Fixed by #12807
Closed

podman should not add host.containers.internal for ipvlan networks #11351

nivekuil opened this issue Aug 29, 2021 · 5 comments · Fixed by #12807
Assignees
Labels
In Progress This issue is actively being worked by the assignee, please do not work on this at this time. kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. network Networking related issue or feature

Comments

@nivekuil
Copy link

/kind bug

Description
When connected to an ipvlan, pod's host.containers.internal points to gateway ip, not host ip, and even if it did it wouldn't be routable. As a result host.containers.internal is unusable since it always resolves to a broken ip.

Steps to reproduce the issue:
If you connect a pod to an ipvlan network, something like this:

{"cniVersion":"0.4.0","name":"cni-podman1","plugins":
[{"ipam":{
"ranges":[[{"rangeStart":"ffff:ffff:100:d6::3","subnet":"ffff:ffff:100::/48"}]],
"routes":[{"dst":"::/0"}],"type":"host-local"},"mode":"l2","type":"ipvlan","master":"eth0"}]}

in this case the gateway (as determined by subnet, so ffff:ffff:100::1) is different from the host, but podman will point host.containers.internal to it anyway. Furthermore host<->container isn't possible through this interface anyway, so podman should just do nothing.

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Aug 29, 2021
@rhatdan
Copy link
Member

rhatdan commented Aug 29, 2021

@Luap99 PTAL

@Luap99
Copy link
Member

Luap99 commented Aug 30, 2021

I think I can fix this for 4.0, it should be simple to check for the bridge driver before we add this entry. Fixing this for 3.X would be to much work.

@Luap99 Luap99 added the network Networking related issue or feature label Sep 12, 2021
@Luap99 Luap99 self-assigned this Sep 24, 2021
@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@Luap99 Luap99 added the In Progress This issue is actively being worked by the assignee, please do not work on this at this time. label Jan 11, 2022
Luap99 added a commit to Luap99/libpod that referenced this issue Jan 11, 2022
For ip/macvlan networks we cannot use the gateway as address for this
hostname. In this case the gateway is normally not on the host so we
just try to use a local ip instead.

[NO NEW TESTS NEEDED] We cannot run macvlan networks in CI.

Fixes containers#11351

Signed-off-by: Paul Holzinger <[email protected]>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
In Progress This issue is actively being worked by the assignee, please do not work on this at this time. kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. network Networking related issue or feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants