os-net-config 0.2.4 fails to enable Linux bonds
Bug #1611471 reported by
Dan Sneddon
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
os-net-config |
Fix Released
|
High
|
Dan Sneddon |
Bug Description
os-net-config 0.2.4 contains a bug in the handling of bond/interface handling where it tries to bring up the bond before the slave interfaces are up. This results in an error, since the Linux bonding kernel module is not yet loaded. The correct order is to bring up the slave interfaces first, then the bond. This is how older versions of os-net-config handled Linux bonds. This behavior was probably introduced accidentally as a result of a recent patch.
The logic in impl_ifcfg.apply() will have to be refactored to bring slave interfaces up before Linux bonds.
To post a comment you must log in.
### config.yaml ###
network_config:
-
type: linux_bond
name: bond1
members:
-
type: interface
name: p2p1
primary: true
-
type: interface
name: p2p2
0.2.4 output:
[root@host06 ~]# os-net-config --debug -c config.yaml -m mapping.yaml network- scripts/ ifcfg-p2p1 network- scripts/ route-p2p2 network- scripts/ route-bond1 network- scripts/ route6- bond1 os-net- config" , line 10, in <module> exit(main( )) python2. 7/site- packages/ os_net_ config/ cli.py" , line 187, in main python2. 7/site- packages/ os_net_ config/ impl_ifcfg. py", line 601, in apply ifup(linux_ bond) python2. 7/site- packages/ os_net_ config/ __init_ _.py", line 182, in ifup execute( msg, '/sbin/ifup', interface) python2. 7/site- packages/ os_net_ config/ __init_ _.py", line 162, in execute s.execute( cmd, *args, **kwargs) python2. 7/site- packages/ oslo_concurrenc y/processutils. py", line 389, in execute sanitized_ cmd) y.processutils. ProcessExecutio nError: Unexpected error while running command. /network- scripts/ ifup-eth] Device bond1 does not seem to be present, delaying initialization.\n'
[...snip...]
[2016/08/09 03:22:05 PM] [INFO] Writing config /etc/sysconfig/
[2016/08/09 03:22:05 PM] [INFO] Writing config /etc/sysconfig/
[2016/08/09 03:22:05 PM] [INFO] Writing config /etc/sysconfig/
[2016/08/09 03:22:05 PM] [INFO] Writing config /etc/sysconfig/
[2016/08/09 03:22:05 PM] [INFO] running ifup on interface: bond1
[2016/08/09 03:22:05 PM] [DEBUG] Running cmd (subprocess): /sbin/ifup bond1
[2016/08/09 03:22:05 PM] [DEBUG] CMD "/sbin/ifup bond1" returned: 1 in 0.199s
[2016/08/09 03:22:05 PM] [DEBUG] u'/sbin/ifup bond1' failed. Not Retrying.
Traceback (most recent call last):
File "/usr/bin/
sys.
File "/usr/lib/
activate=not opts.no_activate)
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
processutil
File "/usr/lib/
cmd=
oslo_concurrenc
Command: /sbin/ifup bond1
Exit code: 1
Stdout: u'ERROR : [/etc/sysconfig
Stderr: u''