OSDs down in Ubuntu 22.04 - due to MAC collisions
Problem
After an upgrade of two Ubuntu hosts to 22.04, OSDs are going down.
ceph-<fsid>@osd.xxx services are disappearing automatically (right after
ceph orch daemon redeploy osd.xxx) from the output of systemctl list-units.
Ceph Version
18.2.8
Cause
MAC address has changed on upgraded nodes to the same faked MAC. Starting from
Ubuntu 22.04, systemd generates fake MACs for bonds (instead of picking up the
MAC of the first interface in the bond as it did before). Because all nodes
have the same /etc/machine-id, which is used in combination with the
interface name to generate the faked MAC, upgraded nodes had the same MAC,
leading to MAC collisions.
Solution
Run the following commands on each node:
cp /etc/machine-id /root/machine-id.old
rm -f /etc/machine-id /var/lib/dbus/machine-id
systemd-machine-id-setup
ln -sf /etc/machine-id /var/lib/dbus/machine-id
reboot
This creates a symbolic link between /etc/machine-id and
/var/lib/dbus/machine-id.