netavark: static macvlan IP is duplicated after container restart
repro:
sudo podman network create macvtest -d macvlan --subnet=fd22::/16
sudo podman run --net=macvtest:ip=fd22::3 docker.io/nginx
In a second window run:
sudo nsenter -t $(pgrep nginx | tail -n1) -p -n ip -6 a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 state UNKNOWN qlen 1000
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
27: eth0@if3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
inet6 censored-slaac-address/64 scope global tentative dynamic mngtmpaddr
valid_lft 2592000sec preferred_lft 604800sec
inet6 fd22::3/16 scope global tentative
valid_lft forever preferred_lft forever
inet6 fe80::28a7:41ff:feb3:9497/64 scope link
valid_lft forever preferred_lft forever
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:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 state UNKNOWN qlen 1000
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
28: eth0@if3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
inet6 censored-slaac-address/64 scope global dynamic mngtmpaddr
valid_lft 2591990sec preferred_lft 604790sec
inet6 fd22::3/16 scope global dadfailed tentative
valid_lft forever preferred_lft forever
inet6 fe80::54c8:36ff:fe70:2b5b/64 scope link
valid_lft forever preferred_lft forever
Notice the dadfailed on eth0. Does this need to be released somehow?
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 18 (8 by maintainers)
Commits related to this issue
- cleanup: always delete netns mount We should not keep the netns if there was a cleanup problem. Deleting the netns will also delte the virtual links inside and thus make the IPs available again for t... — committed to Luap99/libpod by Luap99 2 years ago
- cleanup: always delete netns mount 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 ... — committed to Luap99/libpod by Luap99 2 years ago
- cleanup: always delete netns mount 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 ... — committed to iamkirkbater/podman by Luap99 2 years ago
I have reproduced this problem locally, hopefully I could find a fix to it.