← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1815051] Re: Bionic netplan render invalid yaml duplicate anchor declaration for nameserver entries

 

** Also affects: cloud-init (Ubuntu)
   Importance: Undecided
       Status: New

** Changed in: cloud-init (Ubuntu)
   Importance: Undecided => High

** Changed in: cloud-init (Ubuntu)
       Status: New => In Progress

-- 
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:
  In Progress
Status in cloud-init package in Ubuntu:
  In Progress
Status in cloud-init source package in Xenial:
  New
Status in cloud-init source package in Bionic:
  New
Status in cloud-init source package in Cosmic:
  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


References