$ 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.
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.