Comment 9 for bug 1991552

Revision history for this message
Nick Rosbrook (enr0n) wrote :

To further investigate systemd's involvement here, please start by enabling debug logging on systemd-udevd:

$ cat /etc/systemd/system/systemd-udevd.service.d/override.conf
[Service]
Environment=SYSTEMD_LOG_LEVEL=debug
LogRateLimitIntervalSec=0
$ systemctl daemon-reload # Or, reboot

Looking for messages matching "MAC address" should show most relevant udev log messages:

$ journalctl -u systemd-udevd -b 0 --grep "MAC address"

If this is a race between udev and lxd, you should be able to work around it from the udev side by overriding the default MACAddressPolicy[1]:

$ cat /etc/systemd/network/99-default.link.d/mac-address-policy-none.conf
[Link]
MACAddressPolicy=none

If that override works as intended, then systemd should never try to set the MAC address for an interface (unless there are some other configs in place on the system that take precedence over 99-default.link).

[1] https://www.freedesktop.org/software/systemd/man/systemd.link.html#MACAddressPolicy=