Netplan: "interface X already has a path cost of Y" for bridge with VLANs

Bug #1934790 reported by Thomas Dreibholz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Netplan
New
Undecided
Unassigned

Bug Description

I am trying to configure a bridge setup with VLANs, with this simple setup for reproduction of the issue:
* bridge0: VLAN trunk
* bridge1: VLAN 100, bridging VLAN 100 on Ethernet and VLAN 100 on bridge0

Without setting path costs, the setup is successful:
network:
  version: 2

  ethernets:
    ethernet0:
      match:
        macaddress: 00:8a:8d:8a:71:73
      set-name: ethernet0
      dhcp4: false
      accept-ra: false

  vlans:
    bridge0.100:
      link: bridge0
      id: 100
    ethernet0.100:
      link: ethernet0
      id: 100

  bridges:
    bridge0:
      accept-ra: no

    bridge1:
      accept-ra: no
      interfaces:
        - bridge0.100
        - ethernet0.100
      parameters:
        stp: true

Now, trying to add path costs:
        path-cost:
          bridge0.100: 10000
          ethernet0.100: 10000

This results in a Netplan error:
Error in network definition: bridge1: interface 'bridge0.100' already has a path cost of 10000

Revision history for this message
Thomas Dreibholz (dreibh) wrote :

$ apt-show-versions | grep netplan.io
netplan.io:amd64/focal-updates 0.102-0ubuntu1~20.04.2 uptodate

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal

Revision history for this message
Thomas Dreibholz (dreibh) wrote :

Trying to set the path costs manually works fine:

$ sudo brctl setpathcost bridge1 bridge0.100 10000
$ sudo brctl setpathcost bridge1 ethernet0.100 10000
$ sudo brctl showstp bridge1
bridge1
 bridge id 8000.008a8d8a7173
 designated root 8000.008a8d8a7173
 root port 0 path cost 0
 max age 20.00 bridge max age 20.00
 hello time 2.00 bridge hello time 2.00
 forward delay 15.00 bridge forward delay 15.00
 ageing time 300.00
 hello timer 1.86 tcn timer 0.00
 topology change timer 0.00 gc timer 295.78
 flags

bridge0.100 (1)
 port id 8001 state disabled
 designated root 8000.008a8d8a7173 path cost 10000
 designated bridge 8000.008a8d8a7173 message age timer 0.00
 designated port 8001 forward delay timer 0.00
 designated cost 0 hold timer 0.00
 flags

ethernet0.100 (2)
 port id 8002 state disabled
 designated root 8000.008a8d8a7173 path cost 10000
 designated bridge 8000.008a8d8a7173 message age timer 0.00
 designated port 8002 forward delay timer 0.00
 designated cost 0 hold timer 0.00
 flags

The expected behavior of Netplan would be to just set the costs. However, it seems to process each interface setting twice, and then complains about the already set cost of an interface.

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.