I found time to run more tests and discovered that my patches were wrong... And the fix was actually even simpler.
root@netplan:~# cat fix-bug-1770082.diff Index: b/netplan/cli/commands/apply.py =================================================================== --- a/netplan/cli/commands/apply.py 2018-10-04 16:04:57.000000000 +0000 +++ b/netplan/cli/commands/apply.py 2018-10-15 18:37:06.975347468 +0000 @@ -140,9 +140,9 @@ driver = match.get('driver') mac = match.get('macaddress') if driver: - matches['by-driver'][driver] = phy + matches['by-driver'][driver] = newname if mac: - matches['by-mac'][mac] = phy + matches['by-mac'][mac] = newname
# /sys/class/net/ens3/device -> ../../../virtio0 # /sys/class/net/ens3/device/driver -> ../../../../bus/virtio/drivers/virtio_net
Just changed two words... I created a pull request on github (https://github.com/CanonicalLtd/netplan/pull/50).
I found time to run more tests and discovered that my patches were wrong... And the fix was actually even simpler.
root@netplan:~# cat fix-bug-1770082.diff cli/commands/ apply.py ======= ======= ======= ======= ======= ======= ======= ======= ==== cli/commands/ apply.py 2018-10-04 16:04:57.000000000 +0000 cli/commands/ apply.py 2018-10-15 18:37:06.975347468 +0000 'macaddress' ) 'by-driver' ][driver] = phy 'by-driver' ][driver] = newname 'by-mac' ][mac] = phy 'by-mac' ][mac] = newname
Index: b/netplan/
=======
--- a/netplan/
+++ b/netplan/
@@ -140,9 +140,9 @@
driver = match.get('driver')
mac = match.get(
if driver:
- matches[
+ matches[
if mac:
- matches[
+ matches[
# /sys/class/ net/ens3/ device -> ../../../virtio0 net/ens3/ device/ driver -> ../../. ./../bus/ virtio/ drivers/ virtio_ net
# /sys/class/
Just changed two words... /github. com/CanonicalLt d/netplan/ pull/50).
I created a pull request on github (https:/