Bridge_conf stp on ignored

I have installed OpenNebula 5.8 on:
Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic

brctl show
bridge name     bridge id               STP enabled     interfaces
br0             8000.aedd6118ccf4       no              bond0.200
                                                        one-23-0
                                                        vnet0

My bridge interfaces shows up with stp turned off even I have this in my OpenNebulaNetwork.conf

# These options will execute brctl commands with these values. For example,
# this option will execute:
#
#     brctl stp <bridge name> on
#
:bridge_conf:
    :stp: on

I am not really sure what I am missing.

Any help would be great.

Thanks

The key is :stp_state:

I would agree with you but since I am on version 5.8.5
this seems to be the case:

Actually I thought that it was the default behavior which was in the file so it would not be necessary

Agree, the key changed. Keep in mind when updating the OpenNebulaNetwork.conf file that you need to sync it to the hypervisor nodes with onehost sync.

/var/lib/one/remotes/etc/vnm/OpenNebulaNetwork.conf >> /var/tmp/one/etc/vnm/OpenNebulaNetwork.conf

What network driver are you using ?

Yeah I have run the onehost sync and also it has been noted that we need to fix it again after the upgrade.
The network settings is like this:

And some logs from a VM using it:

Wed Nov 27 15:46:08 2019 [Z0][VMM][I]: pre: Executed "sudo brctl addbr br3".
Wed Nov 27 15:46:08 2019 [Z0][VMM][I]: pre: Executed "sudo ip link set br3 up".
Wed Nov 27 15:46:08 2019 [Z0][VMM][I]: pre: Executed "sudo ip link add link bond0 name bond0.199 mtu 1500 type vlan id 199 ".
Wed Nov 27 15:46:08 2019 [Z0][VMM][I]: pre: Executed "sudo ip link set bond0.199 up".
Wed Nov 27 15:46:08 2019 [Z0][VMM][I]: pre: Executed "sudo brctl addif br3 bond0.199".
Wed Nov 27 15:46:08 2019 [Z0][VMM][I]: ExitCode: 0
Wed Nov 27 15:46:08 2019 [Z0][VMM][I]: Successfully execute network driver operation: pre.

Configuration looks good, either the config file option or VNET conf should be sufficient.

What is the :keep_empty_bridge: setting? Is the bridge recreated?

I have upgraded to 5.10 and changed the config to match the 5.10 version.
It did not make any difference.

I am not sure how to debug this ?
I have set debug level logging on oned.conf but that did not give me any hints other than the setting is clearly not being used.

Thu Nov 28 14:27:20 2019 [Z0][VMM][D]: Message received: LOG I 52 Successfully execute transfer manager driver operation: tm_context.
Thu Nov 28 14:27:22 2019 [Z0][VMM][D]: Message received: LOG I 52 pre: Executed "sudo ip link add name br3 type bridge ".
Thu Nov 28 14:27:22 2019 [Z0][VMM][D]: Message received: LOG I 52 pre: Executed "sudo ip link set br3 up".
Thu Nov 28 14:27:22 2019 [Z0][VMM][D]: Message received: LOG I 52 pre: Executed "sudo ip link add link bond0 name bond0.199 mtu 1500 type vlan id 199 ".
Thu Nov 28 14:27:22 2019 [Z0][VMM][D]: Message received: LOG I 52 pre: Executed "sudo ip link set bond0.199 up".
Thu Nov 28 14:27:22 2019 [Z0][VMM][D]: Message received: LOG I 52 pre: Executed "sudo ip link set bond0.199 master br3".
Thu Nov 28 14:27:22 2019 [Z0][VMM][D]: Message received: LOG I 52 ExitCode: 0
Thu Nov 28 14:27:22 2019 [Z0][VMM][D]: Message received: LOG I 52 Successfully execute network driver operation: pre.
Thu Nov 28 14:27:23 2019 [Z0][VMM][D]: Message received: LOG I 52 ExitCode: 0
Thu Nov 28 14:27:23 2019 [Z0][VMM][D]: Message received: LOG I 52 Successfully execute virtualization driver operation: deploy.
Thu Nov 28 14:27:24 2019 [Z0][VMM][D]: Message received: LOG I 52 ExitCode: 0
Thu Nov 28 14:27:24 2019 [Z0][VMM][D]: Message received: LOG I 52 Successfully execute network driver operation: post.
Thu Nov 28 14:27:24 2019 [Z0][VMM][D]: Message received: DEPLOY SUCCESS 52 one-52

From the host:

brctl show
bridge name     bridge id               STP enabled     interfaces
br3             8000.ca66b5599c76       no              bond0.199
                                                        one-52-0

Seems the leading space before the :bridge_conf: in the config file makes the issue.

Also, in 5.10 it`s better to use

:ip_bridge_conf:
    :stp_state: on

(but should be backward compatible)

Was the space in the config what did the trick?

Yes that seems to be the trick.

It works on new bridge interfaces but not on existing once.