You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tests:integration: Avoid race condition with veth MAC addresses.
When a new veth device is created via iproute2 ("ip link add ..."), the kernel
assigns a MAC address. Once udev picks up the interface, it will apply systemd
"MACAddressPolicy=permanent" default policy. But as veths cannot (by nature)
have a permanent MAC, systemd-udev will create a random (but persistent) MAC,
changing the kernel MAC.
Previously we waited for 0.1 sec to (hopefully) pick up the later system-udev
MAC, but sometimes that wasn't enough, and we still got the earlier kernel MAC,
failing certain tests cases, such as:
__main__.TestNetworkManager.test_eth_permanent_mac
__main__.TestNetworkManager.test_rename_interfaces
__main__.TestNetworkd.test_eth_permanent_mac
__main__.TestNetworkd.test_rename_interfaces
This patch drops the "time.sleep(0.1)" and instead triggers our test interfaces
and waits for settlement of those uevents via 'udevadm', to avoid race
conditions.
0 commit comments