-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
None
[UPDATE] Description updated because I was using incorrect bond_mode instead of mode in bonding_options.
Having the following config:
network_config:
- type: linux_bond
name: bond0
use_dhcp: false
bonding_options: mode=balance-tcp
members:
- type: interface
name: nic5
- type: interface
name: nic6
addresses:
- ip_netmask: <compute_ip_netmask>
Note that balance-tcp is not supported by linux_bond.
When we apply the config using the nmsate provider we get this error (network configuration does not finish successfully):
[root@compute-0 ~]# os-net-config -p nmstate -m /var/tmp/os-net-config_tests/mapping.yaml -c /var/tmp/os-net-config_tests/config-bond0-balance-tcp.yaml --exit-on-validation-errors -d
...
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 2850, in apply
raise os_net_config.ConfigurationError(message)
os_net_config.ConfigurationError: Failure(s) occurred when applying configuration
2025-10-13 08:38:18.568 ERROR os_net_config.main nmstate: Failed to configure network_config.
2025-10-13 08:38:18.568 WARNING os_net_config.safe_fallback fallback_config is not provided
And the bond is created (expected behavior):
[root@compute-0 ~]# ip a sh bond0 Device "bond0" does not exist.
However, when we apply the same config for the ifcfg provider, we can see the error printed in the log but os-net-config finishes successfully:
os-net-config -p ifcfg -m /var/tmp/os-net-config_tests/mapping.yaml -c /var/tmp/os-net-config_tests/config-bond0-balance-tcp.yaml --exit-on-validation-errors -d ... WARN : [ifup] It is advised to switch to 'NetworkManager' instead - it provides 'ifup/ifdown' scripts as well. ./network-functions: line 580: echo: write error: Invalid argument 2025-10-13 08:38:58.782 DEBUG os_net_config.execute stdout : ERROR : [install_bonding_driver] Failed to set value 'balance-tcp' [mode] to bond0 bonding device 2025-10-13 08:38:58.783 INFO os_net_config.execute running ifup on interface: enp130s0f3 2025-10-13 08:38:58.884 ERROR os_net_config.execute 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. 2025-10-13 08:38:58.885 INFO os_net_config.execute running ifup on interface: bond0 2025-10-13 08:39:02.148 ERROR os_net_config.execute 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. 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. 2025-10-13 08:39:02.148 INFO os_net_config.config_provider ifcfg: Successfully configured network_config 2025-10-13 08:39:02.148 INFO os_net_config.main ifcfg: Configured network_config successfully
In this case, the bond device is created with NO-CARRIER:
[root@compute-1 ~]# ip a sh bond0
95: bond0: <NO-CARRIER,BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 56:23:d1:ce:18:7e brd ff:ff:ff:ff:ff:ff
inet 172.31.0.101/24 brd 172.31.0.255 scope global bond0
valid_lft forever preferred_lft forever
inet6 fe80::faf2:1eff:fe33:4e2/64 scope link
valid_lft forever preferred_lft forever
[root@compute-1 ~]# ip a |grep bond0
95: bond0: <NO-CARRIER,BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
inet 172.31.0.101/24 brd 172.31.0.255 scope global bond0