netplan bridge config doesn't support stp boolean

Bug #1665088 reported by Ryan Harper
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Netplan
Fix Released
High
Mathieu Trudel-Lapierre
nplan (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned
Yakkety
Fix Released
Undecided
Unassigned
Zesty
Fix Released
Undecided
Unassigned
systemd (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned
Zesty
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
Users of netplan may wish to specify a custom MTU value for a device.

[Test case]
- Run nplan integration tests on the release
- Validate that netplan generate && netplan apply alone, without config, behave as expected (no result)
- Validate that netplan generate && netplan apply with minimal config writes /run/NetworkManager/conf.d/10-globally-managed-devices.conf
- Validate that netplan generate && netplan apply works with any existing configuation.
- Use the config below; ensure behavior is as expected (STP value is set on the interface; adjust device names as appropriate). There should be no errors at applying the requested configuration.
- Use the config below with the 'stp' key; the device should be brought up and include the default value set for the kernel.

[Regression potential]
STP default value should continue to be used for the bridge configured using netplan if STP is unset in configuration.

---

networkd supports setting STP value in Bridge type netdevs, but netplan does not accept the key.

root@ubuntu:/etc/netplan# apt-cache policy nplan
nplan:
  Installed: 0.18
  Candidate: 0.18
  Version table:
 *** 0.18 500
        500 http://archive.ubuntu.com/ubuntu zesty/main amd64 Packages
        100 /var/lib/dpkg/status
root@ubuntu:/etc/netplan# lsb_release -rd
Description: Ubuntu Zesty Zapus (development branch)
Release: 17.04

root@ubuntu:/etc/netplan# cat 52-bridge.yaml
network:
    ethernets:
        eth0:
            addresses:
            - 10.11.12.13/24
            match:
                macaddress: '52:54:00:12:34:00'
            set-name: foobar0
        eth1:
            match:
                macaddress: '52:54:00:12:34:02'
            set-name: eth1
        eth2:
            match:
                macaddress: '52:54:00:12:34:04'
            set-name: eth2
    bridges:
        br0:
            addresses:
            - 192.168.14.2/24
            interfaces:
            - eth1
            - eth2
            parameters:
                ageing-time: 250
                priority: 22
                forward-delay: 1
                hello-time: 1
                max-age: 10
                path-cost:
                    eth1: 50
                    eth2: 75
                stp: true
    version: 2

root@ubuntu:/etc/netplan# netplan generate
Error in network definition //etc/netplan/52-bridge.yaml line 24 column 16: unknown key stp

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Indeed, this appears to have been omitted. I believe default should be set to true though.

Changed in netplan:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Mathieu Trudel-Lapierre (cyphermox)
tags: added: maas
Revision history for this message
Mike Pontillo (mpontillo) wrote :

MAAS will very soon be generating netplan with the 'stp' boolean, so until a fix lands for this, MAAS is generating broken netplan.

Changed in netplan:
status: Triaged → In Progress
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

This landed in nplan 0.19:

nplan (0.19) zesty; urgency=medium

  * Add support for unordered definition of network devices: you can now
    specify a virtual devices before their member devices. (LP: #1670495)
  * Allow setting up the STP state for a bridge. (LP: #1665088)
  * Document bond/bridge parameters support. (LP: #1664702)

Changed in netplan:
status: In Progress → Fix Released
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Ryan, or anyone else affected,

Accepted nplan into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nplan/0.21~16.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-needed
no longer affects: ubuntu
Changed in nplan (Ubuntu):
status: New → Fix Released
description: updated
Changed in nplan (Ubuntu Zesty):
status: New → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Ryan, or anyone else affected,

Accepted nplan into yakkety-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nplan/0.23~16.10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in nplan (Ubuntu Yakkety):
status: New → Fix Committed
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Ryan, or anyone else affected,

Accepted nplan into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nplan/0.23~16.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in nplan (Ubuntu Xenial):
status: New → Fix Committed
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Verification done on xenial and yakkety with netplan 0.23~:

The parameters are being accepted by netplan parsing network v2 yaml; and appropriately copied on to the resulting configuration for the renderer. STP is not yet supported by systemd however, so further testing could not be done.

tags: added: verification-done-xenial verification-done-yakkety
removed: verification-needed
Changed in systemd (Ubuntu):
status: New → Fix Released
Changed in systemd (Ubuntu Zesty):
status: New → Fix Released
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Opened the task for systemd for xenial and yakkety. For STP controls to work properly, STP support will have to be backported.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nplan - 0.23~16.04.1

---------------
nplan (0.23~16.04.1) xenial; urgency=medium

  * Backport netplan 0.23 to 16.04. (LP: #1688632)

nplan (0.23) artful; urgency=medium

  * Do not unbind brcmfmac, interface will be gone. (LP: #1696162)

nplan (0.22) artful; urgency=medium

  * Add support for setting a custom MAC address on all device types.
    (LP: #1690388)
  * Improved MAC/vlan integration tests; thanks for Dimitri John Ledkov for the
    changes.

nplan (0.21) artful; urgency=medium

  [ Ryan Harper ]
  * Add support for setting MTU on a device. (LP: #1668693)

  [ Mathieu Trudel-Lapierre ]
  * Don't rebind Atheros AR9271; it would confuse the driver. (LP: #1672740)
  * debian/control: Add Conflicts: against netplan; the network 'plan' daemon.
    Both ship the same /usr/sbin/netplan. (LP: #1665842)

nplan (0.20) zesty; urgency=medium

  * tests/integration.py: increase timeout for integration tests (networkd and
    NetworkManager "wait-online" checks) to account for longer bring-up times
    when dealing with stacked virtual devices.

nplan (0.19) zesty; urgency=medium

  * Add support for unordered definition of network devices: you can now
    specify a virtual devices before their member devices. (LP: #1670495)
  * Allow setting up the STP state for a bridge. (LP: #1665088)
  * Document bond/bridge parameters support. (LP: #1664702)

nplan (0.18) zesty; urgency=medium

  * debian/tests/integration.py: in some cases 'iw reg get' may qualify the
    reg domain results with 'global'; we must not let that trip up tests when
    they are run on Ubuntu infrastructure vs. local tests.

nplan (0.17) zesty; urgency=medium

  * New release:
    - Add support for configuring bonds.
    - Add support for configuring bridges.

nplan (0.16) zesty; urgency=medium

  [ Martin Pitt ]
  * doc/example-config: Adjust "routes:" example.
    It does not make sense to make "routes:" a global thing, they should be
    tied to an interface so that the route is only set when the corresponding
    interface exists and is up, and the config is not split in two parts.
  * doc/netplan.md: Point out that NM does not support globbing (LP: #1631018)

  [ Mathieu Trudel-Lapierre ]
  * Fix coverage for src/netplan to be 100%, and fail if coverage falls below
    that mark again.
  * Add support for specifying routes.

nplan (0.15) zesty; urgency=medium

  * tests/generate.py: Fix PEP-8 error (newly detected by -proposed
    pycodestyle).

 -- Mathieu Trudel-Lapierre <email address hidden> Tue, 06 Jun 2017 17:19:10 -0700

Changed in nplan (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for nplan has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nplan - 0.23~16.10.1

---------------
nplan (0.23~16.10.1) yakkety; urgency=medium

  * Backport netplan 0.23 to 16.10. (LP: #1688632)

nplan (0.23) artful; urgency=medium

  * Do not unbind brcmfmac, interface will be gone. (LP: #1696162)

nplan (0.22) artful; urgency=medium

  * Add support for setting a custom MAC address on all device types.
    (LP: #1690388)
  * Improved MAC/vlan integration tests; thanks for Dimitri John Ledkov for the
    changes.

nplan (0.21) artful; urgency=medium

  [ Ryan Harper ]
  * Add support for setting MTU on a device. (LP: #1668693)

  [ Mathieu Trudel-Lapierre ]
  * Don't rebind Atheros AR9271; it would confuse the driver. (LP: #1672740)
  * debian/control: Add Conflicts: against netplan; the network 'plan' daemon.
    Both ship the same /usr/sbin/netplan. (LP: #1665842)

nplan (0.20) zesty; urgency=medium

  * tests/integration.py: increase timeout for integration tests (networkd and
    NetworkManager "wait-online" checks) to account for longer bring-up times
    when dealing with stacked virtual devices.

nplan (0.19) zesty; urgency=medium

  * Add support for unordered definition of network devices: you can now
    specify a virtual devices before their member devices. (LP: #1670495)
  * Allow setting up the STP state for a bridge. (LP: #1665088)
  * Document bond/bridge parameters support. (LP: #1664702)

nplan (0.18) zesty; urgency=medium

  * debian/tests/integration.py: in some cases 'iw reg get' may qualify the
    reg domain results with 'global'; we must not let that trip up tests when
    they are run on Ubuntu infrastructure vs. local tests.

nplan (0.17) zesty; urgency=medium

  * New release:
    - Add support for configuring bonds.
    - Add support for configuring bridges.

nplan (0.16) zesty; urgency=medium

  [ Martin Pitt ]
  * doc/example-config: Adjust "routes:" example.
    It does not make sense to make "routes:" a global thing, they should be
    tied to an interface so that the route is only set when the corresponding
    interface exists and is up, and the config is not split in two parts.
  * doc/netplan.md: Point out that NM does not support globbing (LP: #1631018)

  [ Mathieu Trudel-Lapierre ]
  * Fix coverage for src/netplan to be 100%, and fail if coverage falls below
    that mark again.
  * Add support for specifying routes.

nplan (0.15) zesty; urgency=medium

  * tests/generate.py: Fix PEP-8 error (newly detected by -proposed
    pycodestyle).

nplan (0.14) zesty; urgency=medium

  * tests/generate.py: Introduce macros for commonly expected networkd output
  * networkd: Use NetworkManager compatible DHCP route metrics (LP: #1639754)
  * doc/netplan.md: Fix wrong wifi reference in "br0" example
  * doc/netplan.md: Clarify introduction
  * tests/integration.py: Fix race condition with waiting for networkd

nplan (0.13) zesty; urgency=medium

  [ Jonathan Cave ]
  * Blacklist mwifiex_pcie from rebinds (work around LP: #1630285)

  [ Martin Pitt ]
  * Add support for nameservers (LP: #1626617)

 -- Mathieu Trudel-Lapierre <email address hidden> Tue, 06 Jun 2017 17:25:57 -0700

Changed in nplan (Ubuntu Yakkety):
status: Fix Committed → Fix Released
Changed in systemd (Ubuntu Xenial):
milestone: none → ubuntu-16.04.3
no longer affects: systemd (Ubuntu Yakkety)
Revision history for this message
Dimitri John Ledkov (xnox) wrote :
Changed in systemd (Ubuntu Xenial):
status: New → In Progress
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Ryan, or anyone else affected,

Accepted systemd into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/systemd/229-4ubuntu20 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in systemd (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-xenial
removed: verification-done-xenial
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

229-4ubuntu19
netplan apply resulted in:
Oct 02 15:19:49 test-upgrade systemd[1]: Starting Network Service...
Oct 02 15:19:49 test-upgrade systemd-networkd[1149]: [/run/systemd/network/10-netplan-br0.netdev:6] Unknown lvalue 'AgeingTimeSec' in section 'Bridge'
Oct 02 15:19:49 test-upgrade systemd-networkd[1149]: [/run/systemd/network/10-netplan-br0.netdev:7] Unknown lvalue 'Priority' in section 'Bridge'
Oct 02 15:19:49 test-upgrade systemd-networkd[1149]: [/run/systemd/network/10-netplan-br0.netdev:11] Unknown lvalue 'STP' in section 'Bridge'
Oct 02 15:19:49 test-upgrade systemd-networkd[1149]: br0: IPv6 enabled for interface: Success

229-4ubuntu20
netplan apply resulted in
Oct 02 15:21:35 test-upgrade systemd[1]: Starting Network Service...
Oct 02 15:21:35 test-upgrade systemd-networkd[3188]: br0: IPv6 enabled for interface: Success
Oct 02 15:21:35 test-upgrade systemd-networkd[3188]: br0: netdev ready

tags: added: verification-done verification-done-xenial
removed: verification-needed verification-needed-xenial
tags: added: id-596df0fafcee7c0b66ed241f
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemd - 229-4ubuntu20

---------------
systemd (229-4ubuntu20) xenial; urgency=medium

  * resolved: recognize DNS names with more than one trailing dot as invalid
    (LP: #1600000)
  * Ignore failures to set Nice priority on services in containers.
    (LP: #1709536)
  * networkd: accept `:' in ifnames in systemd/networkd. (LP: #1714933)
  * initramfs-tools: trigger udevadm add actions with subsystems first.
    (LP: #1713536)
  * networkd: Add support to set STP value on a bridge. (LP: #1665088)
  * networkd: add support for AgeingTImeSec, Priority and DefaultPVID settings.
    (LP: #1715131)
    - Drop cherrypick of uint16 config parser, superseeded by above commit.
  * networkd: add support to set ActiveSlave and PrimarySlave. (LP: #1709135)
    - networkd: add support to configure ARP, depedency of Primary/ActiveSlave.

 -- Dimitri John Ledkov <email address hidden> Tue, 05 Sep 2017 14:01:51 +0100

Changed in systemd (Ubuntu Xenial):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.