-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
linux_bond member in a ovs_bridge does not support ovs_extra so:
ovs-vsctl set <port_name> <port_config>
cannot be provided.
This issue happens for both providers: ifcfg and nmstate.
Reproduction procedure
Loading a config like this:
network_config:
- type: ovs_bridge
name: br0
use_dhcp: false
use_dhcpv6: false
ovs_extra:
- "set bridge br0 stp_enable=true"
- "set bridge br0 other_config:stp-priority=4096"
- "set port bond0 other_config:stp-path-cost=2"
members:
- type: linux_bond
name: bond0
mtu: 9000
bonding_options: "mode=active-backup"
members:
- type: interface
name: nic5
primary: true
- type: vlan
vlan_id: 137
mtu: 9000
device: bond0
addresses:
- ip_netmask: "172.31.0.101/24"
It raises an error like this:
2025-10-16 14:49:03.002 ERROR os_net_config.impl_ifcfg.apply Failure(s) occurred when applying configuration
2025-10-16 14:49:03.002 ERROR os_net_config.impl_ifcfg.apply stdout: ERROR : [/etc/sysconfig/network-scripts/ifup-eth] Device br0 does not seem to be present, delaying initialization.
ERROR : [/etc/sysconfig/network-scripts/ifup-eth] Device vlan137 does not seem to be present, delaying initialization.
, stderr: WARN : [ifup] You are using 'ifup' script provided by 'network-scripts', which are now deprecated.
WARN : [ifup] 'network-scripts' will be removed from distribution in near future.
WARN : [ifup] It is advised to switch to 'NetworkManager' instead - it provides 'ifup/ifdown' scripts as well.
WARN : [ifup] You are using 'ifup' script provided by 'network-scripts', which are now deprecated.
WARN : [ifup] 'network-scripts' will be removed from distribution in near future.
WARN : [ifup] It is advised to switch to 'NetworkManager' instead - it provides 'ifup/ifdown' scripts as well.
ovs-vsctl: no row "bond0" in table Port
ovs-vsctl: no bridge named br0
2025-10-16 14:49:03.002 ERROR os_net_config.impl_ifcfg.apply stdout: ERROR : [/etc/sysconfig/network-scripts/ifup-eth] Device br0 does not seem to be present, delaying initialization.
ERROR : [/etc/sysconfig/network-scripts/ifup-eth] Device vlan137 does not seem to be present, delaying initialization.
, stderr: WARN : [ifup] You are using 'ifup' script provided by 'network-scripts', which are now deprecated.
WARN : [ifup] 'network-scripts' will be removed from distribution in near future.
WARN : [ifup] It is advised to switch to 'NetworkManager' instead - it provides 'ifup/ifdown' scripts as well.
WARN : [ifup] You are using 'ifup' script provided by 'network-scripts', which are now deprecated.
WARN : [ifup] 'network-scripts' will be removed from distribution in near future.
WARN : [ifup] It is advised to switch to 'NetworkManager' instead - it provides 'ifup/ifdown' scripts as well.
ovs-vsctl: no row "bond0" in table Port
ovs-vsctl: no bridge named br0
2025-10-16 14:49:03.003 ERROR os_net_config.config_provider ifcfg: ***Failed to configure network_config ***
Failure(s) occurred when applying configuration
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/os_net_config/cli.py", line 648, in config_provider
files_changed = provider.apply(cleanup=cleanup,
File "/usr/lib/python3.9/site-packages/os_net_config/impl_ifcfg.py", line 2435, in apply
raise os_net_config.ConfigurationError(message)
os_net_config.ConfigurationError: Failure(s) occurred when applying configuration
2025-10-16 14:49:03.004 ERROR os_net_config.main ifcfg: Failed to configure network_config.
Because the set port bond0 other_config:stp-path-cost=2 is added to bridge configuration:
# This file is autogenerated by os-net-config DEVICE=br0 ONBOOT=yes HOTPLUG=no NM_CONTROLLED=no PEERDNS=no DEVICETYPE=ovs TYPE=OVSBridge OVS_EXTRA="set bridge br0 other-config:mac-table-size=50000 -- set bridge br0 stp_enable=true -- set bridge br0 other_config:stp-priority=4096 -- set port bond0 other_config:stp-path-cost=2 -- set bridge br0 fail_mode=standalone -- del-controller br0 -- set bridge br0 fail_mode=standalone -- del-controller br0"
Providing ovs_extra in a linux_bond member raises this expected validation error (no supported by the schema):
2025-10-16 14:52:50.382 ERROR os_net_config.main Schema validation failed for network_config with error:
Config file failed schema validation at network_config/0:
{'type': 'ovs_bridge', 'name': 'br0', 'use_dhcp': False, 'use_dhcpv6': False, 'ovs_extra': ['set bridge br0 stp_enable=true', 'set bridge br0 other_config:stp-priority=4096'], 'members': [{'type': 'linux_bond', 'name': 'bond0', 'mtu': 9000, 'bonding_options': 'mode=active-backup', 'ovs_extra': ['set port bond0 other_config:stp-path-cost=2'], 'members': [{'type': 'interface', 'name': 'nic5', 'primary': True}]}, {'type': 'vlan', 'vlan_id': 137, 'mtu': 9000, 'device': 'bond0', 'addresses': [{'ip_netmask': '172.31.0.101/24'}]}]} is not valid under any of the given schemas
Sub-schemas tested and not matching:
- items/oneOf/ovs_bridge/members/items/oneOf: {'type': 'linux_bond', 'name': 'bond0', 'mtu': 9000, 'bonding_options': 'mode=active-backup', 'ovs_extra': ['set port bond0 other_config:stp-path-cost=2'], 'members': [{'type': 'interface', 'name': 'nic5', 'primary': True}]} is not valid under any of the given schemas
-- items/oneOf/ovs_bridge/members/items/oneOf/linux_bond/additionalProperties: Additional properties are not allowed ('ovs_extra' was unexpected)
Expected behavior
Providing a config like this:
network_config:
- type: ovs_bridge
name: br0
use_dhcp: false
use_dhcpv6: false
ovs_extra:
- "set bridge br0 stp_enable=true"
- "set bridge br0 other_config:stp-priority=4096"
members:
- type: linux_bond
name: bond0
mtu: 9000
bonding_options: "mode=active-backup"
ovs_extra:
- "set port bond0 other_config:stp-path-cost=10"
members:
- type: interface
name: nic5
primary: true
- type: vlan
vlan_id: 137
mtu: 9000
device: bond0
addresses:
- ip_netmask: "172.31.0.101/24"
It should generate a config like this:
[root@compute-1 ~]# # add OVS_EXTRA with set port bond0 other_config:stp-path-cost=10 to ifcfg-bond0 [root@compute-1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-bond0 # This file is autogenerated by os-net-config DEVICE=bond0 ONBOOT=yes HOTPLUG=no NM_CONTROLLED=no PEERDNS=no DEVICETYPE=ovs TYPE=OVSPort OVS_BRIDGE=br0 MACADDR="f8:f2:1e:33:04:e2" BONDING_OPTS="mode=active-backup" MTU=9000 OVS_EXTRA="set port bond0 other_config:stp-path-cost=10" # restart service [root@compute-1 ~]# systemctl restart network
Resulting in a ovs-vsctl set <port_name> <port_config> effectively applied:
[root@compute-1 ~]# ovs-appctl stp/show ---- br0 ---- Root ID: stp-priority 4096 stp-system-id f8:f2:1e:33:04:e2 stp-hello-time 2s stp-max-age 20s stp-fwd-delay 15s This bridge is the root Bridge ID: stp-priority 4096 stp-system-id f8:f2:1e:33:04:e2 stp-hello-time 2s stp-max-age 20s stp-fwd-delay 15s Interface Role State Cost Pri.Nbr ---------- ---------- ---------- ----- ------- bond0 designated forwarding 10 128.1 <---