Public bug reported: The netplan configuration redeclares the nameservers anchor for every single section (vlans, bonds), and use the same id for similar entries (id001).
In this specific case the network configuration in maas have a bond0 with two vlans, bond0.3502 and bond0.3503, and an untagged bond1 without vlans. The rendered 50-cloud-init.yaml looks like this: network: version: 2 ethernets: ... bonds: ... bond1: ... nameservers: &id001 <- anchor declaration here addresses: - 255.255.255.1 - 255.255.255.2 - 255.255.255.3 - 255.255.255.5 search: - customer.domain - maas ... bondM: ... nameservers: *id001 vlans: bond0.3502: ... nameservers: &id001 <- anchor redeclaration here addresses: - 255.255.255.1 - 255.255.255.2 - 255.255.255.3 - 255.255.255.5 search: - customer.domain - maas bond0.3503: ... nameservers: *id001 As the cloudinit renders an invalid yaml file, the netplan apply produces the following error: (due to the anchor redeclaration in the vlans section): Invalid YAML at /etc/netplan/50-cloud-init.yaml line 118 column 25: second occurence This render bug prevents us using the untagged bond and the bond with the vlans in the same configuration. ** Affects: cloud-init Importance: Undecided Status: New -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to cloud-init. https://bugs.launchpad.net/bugs/1815051 Title: Bionic netplan render invalid yaml duplicate anchor declaration for nameserver entries Status in cloud-init: New Bug description: The netplan configuration redeclares the nameservers anchor for every single section (vlans, bonds), and use the same id for similar entries (id001). In this specific case the network configuration in maas have a bond0 with two vlans, bond0.3502 and bond0.3503, and an untagged bond1 without vlans. The rendered 50-cloud-init.yaml looks like this: network: version: 2 ethernets: ... bonds: ... bond1: ... nameservers: &id001 <- anchor declaration here addresses: - 255.255.255.1 - 255.255.255.2 - 255.255.255.3 - 255.255.255.5 search: - customer.domain - maas ... bondM: ... nameservers: *id001 vlans: bond0.3502: ... nameservers: &id001 <- anchor redeclaration here addresses: - 255.255.255.1 - 255.255.255.2 - 255.255.255.3 - 255.255.255.5 search: - customer.domain - maas bond0.3503: ... nameservers: *id001 As the cloudinit renders an invalid yaml file, the netplan apply produces the following error: (due to the anchor redeclaration in the vlans section): Invalid YAML at /etc/netplan/50-cloud-init.yaml line 118 column 25: second occurence This render bug prevents us using the untagged bond and the bond with the vlans in the same configuration. To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1815051/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp