-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
None
-
None
-
False
-
-
False
-
?
-
rhos-connectivity-nfv
-
None
-
-
-
-
Critical
To Reproduce
Apply, using the nmstate provider, a config like this:
network_config:
- type: ovs_user_bridge
name: br0
use_dhcp: false
members:
- type: interface
name: nic5
- type: vlan
vlan_id: 138
device: br0
After waiting for a while here:
2025-10-23 10:30:19.573 INFO os_net_config.impl_nmstate.__dump_key_config Applying the config with nmstate
interfaces:
- ipv4:
dhcp: false
enabled: false
ipv6:
autoconf: false
dhcp: false
enabled: false
name: br0
state: up
type: ovs-interface
- bridge:
allow-extra-patch-ports: true
options:
datapath: netdev
fail-mode: standalone
mcast-snooping-enable: false
rstp: false
stp: false
port:
- name: enp130s0f2
- name: br0
name: br0
ovs-db:
external_ids: {}
other_config:
mac-table-size: 50000
state: up
type: ovs-bridge
- ipv4:
dhcp: false
enabled: false
ipv6:
autoconf: false
dhcp: false
enabled: false
name: vlan138
state: up
type: vlan
vlan:
base-iface: br0
id: 138
Eventually this error is raised:
2025-10-23 10:32:26.856 ERROR os_net_config.impl_nmstate.nmstate_apply Error seen while applying the nmstate templates Device(MissingDependencies): vlan138 failed to create resources: cannot retrieve ifindex of interface br0 (Open vSwitch Interface)
2025-10-23 10:32:27.025 DEBUG os_net_config.impl_nmstate.__dump_config ----------------------------
2025-10-23 10:32:27.026 DEBUG os_net_config.impl_nmstate.__dump_config Present set of ip rules
[]
2025-10-23 10:32:27.026 DEBUG os_net_config.impl_nmstate.__dump_config ----------------------------
2025-10-23 10:32:27.026 DEBUG os_net_config.impl_nmstate.__dump_config Desired ip rules
[]
2025-10-23 10:32:27.027 INFO os_net_config.impl_nmstate.__dump_key_config ----------------------------
2025-10-23 10:32:27.027 INFO os_net_config.impl_nmstate.__dump_key_config Applying the config with nmstate
dns-resolver:
config:
search: []
server: []
2025-10-23 10:32:27.589 ERROR os_net_config.impl_nmstate.apply Failure(s) occurred when applying configuration
2025-10-23 10:32:27.589 ERROR os_net_config.impl_nmstate.apply Device(MissingDependencies): vlan138 failed to create resources: cannot retrieve ifindex of interface br0 (Open vSwitch Interface)
2025-10-23 10:32:27.589 INFO os_net_config.impl_nmstate.rollback_to_initial_settings Rolling back to initial settings.
2025-10-23 10:32:27.750 INFO os_net_config.impl_nmstate.__dump_key_config ----------------------------
2025-10-23 10:32:27.750 INFO os_net_config.impl_nmstate.__dump_key_config Applying the difference to go back to initial settings
interfaces: []
ovs-db:
external_ids:
hostname: compute-0
ovn-bridge-datapath-type: netdev
rundir: /var/run/openvswitch
system-id: f61ae7db-0b39-4718-8708-0e8189acc19e
other_config:
dpdk-extra: ' -n 4'
dpdk-init: 'true'
dpdk-socket-limit: 4096,4096
dpdk-socket-mem: 4096,4096
pmd-auto-lb: 'true'
pmd-auto-lb-improvement-threshold: '25'
pmd-auto-lb-load-threshold: '70'
pmd-auto-lb-rebal-interval: '2'
pmd-cpu-mask: c0000c
vhost-postcopy-support: 'true'
2025-10-23 10:32:28.259 ERROR os_net_config.config_provider nmstate: ***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_nmstate.py", line 2855, in apply
raise os_net_config.ConfigurationError(message)
os_net_config.ConfigurationError: Failure(s) occurred when applying configuration
2025-10-23 10:32:28.259 ERROR os_net_config.main nmstate: Failed to configure network_config.
2025-10-23 10:32:28.259 WARNING os_net_config.safe_fallback fallback_config is not provided
As a result the OVS user bridge is not created:
[root@compute-0 ~]# ovs-vsctl show
bf9dfa0a-663a-4af5-a860-0e08c8da34ac
ovs_version: "3.5.2-33.el9fdp"
[root@compute-0 ~]# ip a sh vlan138
Device "vlan138" does not exist.
Expected behavior
OVS user bridge and VLAN properly created as it happens with ifcfg providers (see attached log):
[root@compute-1 ~]# ovs-vsctl show
f5fae7d2-ea5d-4859-af5d-5a05a26a8f1c
Bridge br0
fail_mode: standalone
datapath_type: netdev
Port enp130s0f2
Interface enp130s0f2
Port br0
Interface br0
type: internal
ovs_version: "3.5.2-33.el9fdp"
[root@compute-1 ~]# ip a sh vlan138
74: vlan138@br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether f8:f2:1e:33:04:e2 brd ff:ff:ff:ff:ff:ff
inet6 fe80::faf2:1eff:fe33:4e2/64 scope link
valid_lft forever preferred_lft forever
Bug impact
VLAN on OVS user bridge cannot be configured.
Workaround
Configure vlan under members:
network_config:
- type: ovs_user_bridge
name: br0
use_dhcp: false
members:
- type: interface
name: nic5
- type: vlan
vlan_id: 138
use_dhcp: false
- is cloned by
-
OSPRH-21334 [Doc] [os-net-config][nmstate] Error raised when vlan is configured for ovs_user_bridge device
-
- In Progress
-