Comment 23 for bug 1899487

Revision history for this message
Frode Nordahl (fnordahl) wrote :

To add to Bretts comment in #21, the proposed workaround is only effective if you know about this situation beforehand. I.e. if you enabled the override through vendor data before deploying any Focal or newer instances.

Another possible workaround is to preform a "cold migration". When Nova stops/starts an instance the domain XML on the hypervisor is re-created.

We can take advantage of this behavior, if an instance is stop/started after a network MTU has been lowered the new domain XML will have the new MTU which makes the libvirt driver enforce the MTU in the instance.

The instance configuration will still make systemd-networkd attempt to set the hard coded MTU but it will not be allowed to:

ubuntu@u:~$ grep mtu /etc/netplan/50-cloud-init.yaml
            mtu: 1442
ubuntu@u:~$ zgrep MTU /var/log/syslog.*
/var/log/syslog.2.gz:Dec 10 13:54:19 u systemd-networkd[287]: /run/systemd/network/10-netplan-ens2.network: MTUBytes= in [Link] section and UseMTU= in [DHCP] section are set. Disabling UseMTU=.
/var/log/syslog.2.gz:Dec 10 13:54:19 u systemd-networkd[287]: ens2: Could not set MTU, ignoring: mtu greater than device maximum. Invalid argument
ubuntu@u:~$ ip link
2: ens2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1441 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether fa:16:3e:30:f3:82 brd ff:ff:ff:ff:ff:ff