Public bug reported:
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-separated list of shell-style globs matching the driver
currently bound to the
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/network/10
-netplan-eth0.link). However, while testing netplan under hirsute a
recent change (specifically in 0.101-1) makes it clear that it is in
fact failing to match the interface:
$ 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_matching_driver_name" in
netplan/cli/utils.py to support the space separated format (and I'm
happy to provide a PR implementing that if requested) but for the sake
of consistency I suspect the schema ought to be extended to support the
option of a YAML list instead of a string for that value?
** Affects: netplan.io (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1918421
Title:
netplan does not match multiple driver specifications
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/1918421/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs