← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1735821] Re: netplan needs bridge port-priority support

 

This bug was fixed in the package nplan - 0.32~17.10.3

---------------
nplan (0.32~17.10.3) artful; urgency=medium

  * Don't silently break Bridge Priority by adding port-priority.

nplan (0.32~17.10.2) artful; urgency=medium

  * Fix syntax for IPv6 addresses in doc. (LP: #1735317)
  * doc: routes are not top-level but per-interface. (LP: #1726695)
  * Implement bridge port-priority parameter. (LP: #1735821)
  * Implement "optional: true" to correctly write systemd network definitions
    with "RequiredForOnline=false", such that these networks do not block boot.
    (LP: #1664844)
  * Various documentation fixes. (LP: #1751814)

 -- Mathieu Trudel-Lapierre <cyphermox@xxxxxxxxxx>  Fri, 02 Mar 2018
16:50:47 -0500

** Changed in: nplan (Ubuntu Artful)
       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/1735821

Title:
  netplan needs bridge port-priority support

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

Bug description:
  [Impact]
  Users of netplan configuring any bridge. Port priority is a very common setting to change when setting up bridge devices that might have multiple interfaces.

  [Test case]
  1) Write a netplan configuration:
  network:
      version: 2
      ethernets:
          eth0:
              match:
                  name: eth0
      bridges:
          br0:
              addresses:
              - 192.168.14.2/24
              interfaces:
              - eth0
              parameters:
                  path-cost:
                      eth0: 50
                  priority: 22
                  port-priority:
                      eth0: 14

  2) Run 'sudo netplan apply'

  3) Validate that the config generated by netplan is correct:

  In /run/systemd/network/10-netplan-eth0.network:

  [...]
  [Bridge]
  [...]
  Priority=14

  4) Validate that the port-priority value for the bridge has been
  correctly set:

  $ cat /sys/class/net/mybr/brif/eth0/priority


  [Regression potential]
  This might impact STP behavior, such that while the port priority for a bridge changes, the general network topology might change -- this may lead to loss of connectivity on the bridge itself or on other devices on the network, invalid packet traffic (packets showing up where they should not), etc.

  ---

  Now that systemd supports port-priority for bridges (LP: #1668347)
  netplan should handle port-priority like it does path-cost.

  1) % lsb_release -rd
  Description:	Ubuntu 16.04.3 LTS
  Release:	16.04

  1) # lsb_release -rd
  Description:	Ubuntu Bionic Beaver (development branch)
  Release:	18.04

  2) # apt-cache policy nplan
  nplan:
    Installed: 0.30
    Candidate: 0.32
    Version table:
       0.32 500
          500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
   *** 0.30 100
          100 /var/lib/dpkg/status

  3) netplan generate renders a networkd .network file which has
  [Bridge] section including  Priority  value set on each of the bridge
  ports specified

  4) netplan fails to parse the input yaml with

  Sample config that should parse:

  % cat br-pp.yaml
  network:
      version: 2
      ethernets:
          eth0:
              match:
                  macaddress: '52:54:00:12:34:04'
      bridges:
          br0:
              addresses:
              - 192.168.14.2/24
              interfaces:
              - eth0
              parameters:
                  path-cost:
                      eth0: 50
                  priority: 22
                  port-priority:
                      eth0: 14

  % netplan generate
  Error in network definition br-pp.yaml line 13 column 16: unknown key port-priority

  If fixed, then I would expect a /run/systemd/network/10-netplan-eth0.network that looks like
  [Match]
  MACAddress=52:54:00:12:34:00
  Name=eth0

  [Network]
  Bridge=br0
  LinkLocalAddressing=no
  IPv6AcceptRA=no

  [Bridge]
  Cost=50
  Priority=14

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