OVS and rstp setup not working

tester

New Member
Aug 3, 2014
11
1
3
Hi everybody,
I try to setup an OVS ring with 3 nodes. This setup requires some kind of stp.
I've created a OVS bridge in the webui and added the option "rstp_enable=true" in the OVS options field.
After a restart I get
"
Sep 22 12:31:33 nodeA ovs-vsctl[1574]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --timeout=5 -- --may-exist add-br vmbr99 rstp_enable=true --
Sep 22 12:31:33 nodeA ovs-vsctl[1574]: ovs|00002|db_ctl_base|ERR|'add-br' command takes exactly 1 or 3 arguments
Sep 22 12:31:33 nodeA ifup[1491]: ovs-vsctl: 'add-br' command takes exactly 1 or 3 arguments
"
in the system log.
Manual retry in the CLI gets the same result (of course).
Is this a bug ?
Per the OVS documentation the rstp should be enabled with "ovs-vsctl set Bridge vmbr99 rstp_enable=true"
That works neither :(

Any one ideas?
thanks
tester
 
Hi,
I can reproduce this. Seems like the set keyword is missing and the options are not in the right order, I'll take a look at it.
As a workaround you can do
Code:
ovs-vsctl -- --may-exist add-br vmbr99
ovs-vsctl -- set Bridge vmbr99 rstp_enable=true
or as a single command
Code:
ovs-vsctl -- --may-exist add-br vmbr99 -- set Bridge vmbr99 rstp_enable=true
 
A better workaround is to use the 'ovs_extra' option in your '/etc/network/interfaces/'. Then it should work for 'ifup' and hence at startup.
Example:
Code:
allow-ovs vmbr2
iface vmbr2 inet static
        address  10.10.4.10
        netmask  24
        ovs_type OVSBridge
        ovs_extra set Bridge vmbr2 rstp_enable=true
 
A better workaround is to use the 'ovs_extra' option in your '/etc/network/interfaces/'.

Is this (ovs_extra) sufficient and recommended way of enabling RSTP now?

https://pve.proxmox.com/wiki/Open_vSwitch states that: 'In order to configure a bridge for RSTP support, you must use an "up" script as the "ovs_options" and "ovs_extras" options do not emit the proper commands'
...and also recommends adding a 10 seconds sleep in post-up to allow RSTP to settle.
Definitely nicer if you can do it without pre/post hooks.
 
Last edited:
Hi,
it should works with ifupdown2 (apt install ifupdown2)

Code:
auto vmbrtest
iface vmbrtest
        ovs_type OVSBridge
        ovs_options rstp_enable=true

generate:

Code:
"
info: executing /usr/bin/ovs-vsctl -- --may-exist add-br vmbrtest -- set bridge vmbrtest rstp_enable=true -- --if-exists clear bridge vmbrtest auto_attach controller external-ids fail_mode flood_vlans ipfix mirrors netflow other_config protocols sflow -- --if-exists clear interface vmbrtest mtu_request external-ids other_config options
"
 
  • Like
Reactions: Chumblys

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!