← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1706752] Re: eni rendering broken for bridge params that require repeated key for values

 

This is believed fixed in 17.1.

** Changed in: cloud-init
       Status: Fix Committed => 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/1706752

Title:
  eni rendering broken for bridge params that require repeated key for
  values

Status in cloud-init:
  Fix Released
Status in cloud-init package in Ubuntu:
  Fix Released
Status in cloud-init source package in Xenial:
  Fix Released
Status in cloud-init source package in Zesty:
  Fix Released
Status in cloud-init source package in Artful:
  Fix Released

Bug description:
  === Begin SRU Template ===
  [Impact]
  ENI rendering of bridge configuration options for bridge_pathcost, bridge_portprio and bridge_waitport would be limited to a single key/val pair. Now support multi-line key values for these configuration options.

  [Test Case]
  if [ ! -f lxc-proposed-snapshot ]; then
    wget https://git.launchpad.net/~smoser/cloud-init/+git/sru-info/plain/bin/lxc-proposed-snapshot -O lxc-proposed-snapshot
    chmod 755 lxc-proposed-snapshot
  fi

  ## get render tool
  $ wget https://git.launchpad.net/~cloud-init-dev/cloud-init/plain/tools/net-convert.py -O net-convert.py

  ## write the network_data.json
  $ cat >network_data.yaml <<EOF
  version: 1
  config:
      - type: physical
        name: eth0
        mac_address: "c0:d6:9f:2c:e8:80"
      - type: physical
        name: eth1
        mac_address: "aa:d6:9f:2c:e8:80"
      - type: bridge
        name: br0
        bridge_interfaces:
          - eth0
          - eth1
        params:
          bridge_ageing: 250
          bridge_bridgeprio: 22
          bridge_fd: 1
          bridge_gcint: 2
          bridge_hello: 1
          bridge_maxage: 10
          bridge_maxwait: 0
          bridge_pathcost:
            - eth0 50
            - eth1 75
          bridge_portprio:
            - eth0 28
            - eth1 14
          bridge_stp: 'off'
          bridge_waitport:
            - 1 eth0
            - 2 eth1
  EOF

  for release in xenial zesty; do
          ref=$release-proposed;
          echo "$release START --------------";
          ./lxc-proposed-snapshot --proposed --publish $release $ref;
          lxc start test-$release;
          lxc file push net-convert.py test-$release/net-convery.py;
          lxc file push network_data.yaml test-$release/network_data.yaml;
          for k in eni netplan; do
              lxc exec test-$release -- python3 /net-convert.py \
              --network-data=net-config.yaml --kind=yaml \
              --output-kind=$k --mac=eth0,c0:d6:9f:2c:e8:80 \
              --directory=out.d ;
          done
          lxc exec test-$release -- cat out.d/etc/network/interfaces
          lxc exec test-$release -- cat out.d/etc/netplan/50-cloud-init.yaml
  done

  [Regression Potential]
  Fairly low, this feature adds support for multi-line keys for 3 specific bridge configuration options bridge_pathcost, bridge_portprio and bridge_waitport.
  Prior releases didn't have this support and would have only allowed for a single configuration value for the key. Now the configuration is properly rendered for multiple-interfaces.

  [Other Info]
  Upstream commit at
    https://git.launchpad.net/cloud-init/commit/?id=00b678c61

  This is fixed in cloud-init via commit 00b678c61a.

   Fix eni rendering for bridge params that require repeated key for
  values.

   There are a few bridge parameters which require repeating the key with each
   value in the list when rendering eni.  Extend the network unittests to cover
   all of the known bridge parameters and check we render eni and netplan
   correctly.

  ProblemType: Bug
  DistroRelease: Ubuntu 17.04
  Package: cloud-init 0.7.9-90-g61eb03fe-0ubuntu1
  ProcVersionSignature: Ubuntu 4.10.0-26.30-generic 4.10.17
  Uname: Linux 4.10.0-26-generic x86_64
  NonfreeKernelModules: zfs zunicode zavl zcommon znvpair
  ApportVersion: 2.20.4-0ubuntu4.5
  Architecture: amd64
  Date: Wed Jul 26 19:33:36 2017
  PackageArchitecture: all
  ProcEnviron:
   TERM=xterm-256color
   PATH=(custom, no user)
   LANG=C.UTF-8
  SourcePackage: cloud-init
  UpgradeStatus: No upgrade log present (probably fresh install)

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


References