netplan should consider adding more udev attribute for exact matching of failover 3-netdev interfaces
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Netplan |
Invalid
|
Undecided
|
Unassigned | ||
initramfs-tools (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Medium
|
Jay Vosburgh | ||
netplan.io (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Bionic |
Invalid
|
Undecided
|
Unassigned | ||
systemd (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Bionic |
Invalid
|
Undecided
|
Unassigned |
Bug Description
[Impact]
* At present, virtual machines utilizing net_failover network interface configurations are incorrectly configured due to the reliance on the MAC address to identify specific network interfaces. When net_failover is utilized, multiple interfaces will bear the same MAC address (the net_failover master itself, as well as the interfaces subordinate to it), rendering the MAC address ineffective for unique identification of the interface. This results in incorrect naming of network interfaces from the "set-name" directive in the netplan configuration.
* The solution here is to use the interface name instead of the MAC address when the interface is a net_failover master device. Logic is added on initramfs-tools to check the device type and virtio flags to apply this change only to net_failover master devices.
[Test Case]
* The change can be tested by configuring a virtual machine with a virtio_net network device with the "failover=on" option to the "-device" option to qemu, e.g.,
-device virtio-
* This will set the virtio device "standby" feature bit (bit 62, counting from 0). This requires a version of qemu with support for this feature.
* When so configured, the netplan configuration generated by initramfs will not contain a "macaddress:" match directive for the network interface in question.
[Regression Potential]
* Erroneous identification of a network interface as a net_failover master device could lead to omission of a macaddress directive, causing interfaces to be incorrectly named.
Changed in netplan: | |
status: | New → Triaged |
Changed in netplan.io (Ubuntu): | |
status: | New → Triaged |
Changed in systemd (Ubuntu): | |
status: | New → Incomplete |
tags: | added: sts |
tags: | removed: sts |
Changed in initramfs-tools (Ubuntu Bionic): | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Guilherme G. Piccoli (gpiccoli) |
assignee: | Guilherme G. Piccoli (gpiccoli) → Jay Vosburgh (jvosburgh) |
tags: | added: sts |
description: | updated |
tags: | added: patch |
tags: | removed: sts-sponsor-mfo |
netplan is currently writing about as much as we can for the networkd/udev configs; some values we don't know how to handle at all.
Looking at this, it feels to me like there will indeed be a need to find a different data point to differentiate the interfaces, and MAC and driver are not sufficient. This might require work in udev, so I've added a task for systemd.
Could you please provide us with more information on these devices? Could you please run 'udevadm info' for the slaves as well, so we see if there are any extra fields we can use?
If we can't find anything usable already in udev, then we might need to consider modifying the kernel driver itself to expose some information that will be needed to make the difference between the devices.
This is Triaged/Undecided for netplan, since it's quite obviously a limitation, it will need work to implement, but we can't really prioritize it before knowing what data we can work with to match on the interfaces / work done on systemd/udev.