-
Notifications
You must be signed in to change notification settings - Fork 85
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
static macvlan IP is duplicated after container restart #302
Comments
Please provide the full output of |
(I wonder if we shouldn't make that part of the template if the reproducer includes Podman, having a full |
|
Repro'd on another machine, podman info:
|
I have reproduced this problem locally, hopefully I could find a fix to it. |
@flouthoc PTAL |
Since @cathay4t is interested in working on this issue as per his availability so assigning this issue to him. |
any luck so far? |
@cathay4t are you blocked on troubleshooting or implementation? How can I help? As it stands netavark cannot use assigned IPs with macvlan at all in practice. |
Is this fixed now? |
Sorry for the long delay. Investigating. |
The root cause of this problem is left over of network namespace holding the macvlan after container stopped. Next This issue is fixed in latest main branch( e466e39). Please let me know if you want me to biset out which commit fixed the problem. |
Do you know what is keeping the netns open? Podman should remove the bind mount and close the open fd on container stop and netavark cannot keep anything open since it is short lived and will exit. |
I got this error in netavark 1.1: ERRO[0000] Unable to clean up network for container 15d1ec7d1f5287953327cd85b348ac7c6f5bc47a802b22d1dcf2f942536d4490: "error tearing down network namespace configuration for container 15d1ec7d1f5287953327cd85b348ac7c6f5bc47a802b22d1dcf2f942536d4490: netavark (exit code 1): IO error: Unable to resolve bridge interface : Received a netlink error message No such device (os error 19)" The network namespace is created at |
Podman should still remove the netns even if netavark or cni cleanup fail IMO, so this would be a podman bug. cc @mheon For the netavark error message you linked I do not see how the tokio update would fix that but if it does we should make a new release. |
Looking at the error I think this was fixed with my netavark restructure in #360 |
It looks like the Podman cleanup logic actually refuses to unmount the NS if tearing down network setup failed - ref: https://github.com/containers/podman/blob/main/libpod/networking_linux.go#L699-L711 |
We should not keep the netns if there was a cleanup problem. Deleting the netns will also delete the virtual links inside and thus make the IPs available again for the next use. context: containers/netavark#302 [NO NEW TESTS NEEDED] This is very hard to trigger reliable and it would need to work with cni and netavark. This mostly happens because of specic bugs but those will be fixed and then this test would fail. Signed-off-by: Paul Holzinger <[email protected]>
I created containers/podman#16016 for the podman cleanup issue |
repro:
In a second window run:
looks ok, now ctrl+c the nginx and start it again.
sudo nsenter -t $(pgrep nginx | tail -n1) -p -n ip -6 a
now shows:Notice the
dadfailed
on eth0. Does this need to be released somehow?The text was updated successfully, but these errors were encountered: