netplan does not match multiple driver specifications
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
netplan.io (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The current network-config configuration for cloud-init on the Ubuntu Raspberry Pi images includes the following section for matching the built-in Ethernet port on all supported models of Pi:
ethernets:
eth0:
# Rename the built-in ethernet device to "eth0"
match:
driver: bcmgenet smsc95xx lan78xx
set-name: eth0
dhcp4: true
optional: true
The space-separated list of driver names (actually globs) is the format supported by networkd; from systemd.network(5):
Driver=
A whitespace-
device, as exposed by the udev property ID_NET_DRIVER of its parent device, or if that is
not set, the driver as exposed by ethtool -i of the device itself. If the list is prefixed
with a "!", the test is inverted.
Given that netplan only supports driver matching when the back-end is networkd, it would be logical to assume that it also permits multiple specifications here (although the format is somewhat incongruous given it's not a YAML list), and this had *appeared* to work historically (netplan happily copied the specification to /run/systemd/
$ sudo netplan apply
[]
Cannot find unique matching interface for 'eth0': {'driver': 'bcmgenet smsc95xx lan78xx'}
A work-around I'm implementing for now is to use three separate sections (each with a different name) to split out the driver components but I get the impression netplan probably ought to support this a bit more elegantly given the underlying networkd back-end does.
It would be trivial to tweak "is_interface_
Changed in netplan.io (Ubuntu): | |
status: | New → Triaged |
tags: | added: rls-ii-incoming |
tags: | added: fr-1742 |
tags: |
added: rls-jj-incoming removed: rls-ii-incoming |
tags: | removed: rls-jj-incoming |
Addressed in PR 202: https:/ /github. com/canonical/ netplan/ pull/202