← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1709180] Re: cloud-init v2 yaml doesn't preserve bond/bridge parameters when rendering

 

This bug is believed to be fixed in cloud-init in 17.1. If this is still
a problem for you, please make a comment and set the state back to New

Thank you.

** Changed in: cloud-init
       Status: New => Fix Released

-- 
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/1709180

Title:
  cloud-init v2 yaml doesn't preserve bond/bridge parameters when
  rendering

Status in cloud-init:
  Fix Released

Bug description:
  cloud-init/master:

  % cat bonding.yaml
  network:
    version: 2
    ethernets:
      eth0:
        match:
          macaddress: 52:54:00:12:34:00
          driver: virtio
        set-name: eth0
      ens4:
        match:
          macaddress: 52:54:00:12:34:02 
          driver: e1000
        set-name: ens4
    bonds:
      bond0:
        interfaces: [eth0, ens4]
        parameters:
          mode: active-backup
          mii-monitor-interval: 100
        dhcp4: true

  Should result in a netplan yaml of:

  network:
      version: 2
      ethernets:
          ens4:
              match:
                  macaddress: '52:54:00:12:34:02'
              set-name: ens4
          eth0:
              match:
                  macaddress: '52:54:00:12:34:00'
              set-name: eth0
      bonds:
          bond0:
              dhcp4: true
              interfaces:
              - ens4
              - eth0
              parameters:
                  mii-monitor-interval: 100
                  mode: active-backup

  Multiple issues:

  1) the common bond/bridge handler needs to call the right _handle
  function depending on the command type (bond or bridge)

  2) network_state needs to translate v2 'parameters' key to v1 since we
  utilize the v1 type handlers

  3) the v2 handle_ethernets fails to set the v1 'mac_address' property
  which prevents v2 match/set-name from getting rendered

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1709180/+subscriptions


References