cloud-init-dev team mailing list archive
-
cloud-init-dev team
-
Mailing list archive
-
Message #02140
[Merge] ~xnox/cloud-init:vlan-macaddress into cloud-init:master
Dimitri John Ledkov has proposed merging ~xnox/cloud-init:vlan-macaddress into cloud-init:master.
Commit message:
netplan: pass macaddress, when specified, for vlans
LP: #1690388
Requested reviews:
cloud init development team (cloud-init-dev)
Related bugs:
Bug #1690388 in cloud-init (Ubuntu): "wrong hwaddr on the vlan bond with nplan and cloud-init"
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1690388
For more details, see:
https://code.launchpad.net/~xnox/cloud-init/+git/cloud-init/+merge/324021
netplan: pass macaddress, when specified, for vlans
LP: #1690388
--
Your team cloud init development team is requested to review the proposed merge of ~xnox/cloud-init:vlan-macaddress into cloud-init:master.
diff --git a/cloudinit/net/netplan.py b/cloudinit/net/netplan.py
index 825fe83..1963bb3 100644
--- a/cloudinit/net/netplan.py
+++ b/cloudinit/net/netplan.py
@@ -345,7 +345,9 @@ class Renderer(renderer.Renderer):
'id': ifcfg.get('vlan_id'),
'link': ifcfg.get('vlan-raw-device')
}
-
+ macaddr = ifcfg.get('mac_address', None)
+ if macaddr is not None:
+ vlan['macaddress'] = macaddr.lower()
_extract_addresses(ifcfg, vlan)
vlans.update({ifname: vlan})
Follow ups