nova-network does not start if interfaces are already configured (QuantumLinuxBridgeInterfaceDriver)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Incomplete
|
Undecided
|
Unassigned |
Bug Description
When i restart nova-network i get the following error:
2012-08-27 15:59:22 DEBUG nova.utils [req-1d408c19-
nner /usr/lib64/
2012-08-27 15:59:22 DEBUG nova.utils [req-1d408c19-
/python2.
2012-08-27 15:59:22 DEBUG nova.utils [req-1d408c19-
/lib64/
2012-08-27 15:59:22 DEBUG nova.utils [req-1d408c19-
/lib64/
2012-08-27 15:59:22 DEBUG nova.utils [req-1d408c19-
pid=15115) execute /usr/lib64/
2012-08-27 15:59:22 DEBUG nova.utils [req-1d408c19-
y:235
2012-08-27 15:59:22 CRITICAL nova [-] Unexpected error while running command.
Command: sudo ip address add 10.68.152.11/21 dev brq8240b34f-71
Exit code: 254
Stdout: ''
Stderr: 'RTNETLINK answers: File exists\n'
2012-08-27 15:59:22 TRACE nova Traceback (most recent call last):
2012-08-27 15:59:22 TRACE nova File "/usr/bin/
2012-08-27 15:59:22 TRACE nova service.wait()
2012-08-27 15:59:22 TRACE nova File "/usr/lib64/
2012-08-27 15:59:22 TRACE nova _launcher.wait()
2012-08-27 15:59:22 TRACE nova File "/usr/lib64/
2012-08-27 15:59:22 TRACE nova service.wait()
2012-08-27 15:59:22 TRACE nova File "/usr/lib64/
2012-08-27 15:59:22 TRACE nova return self._exit_
2012-08-27 15:59:22 TRACE nova File "/usr/lib64/
2012-08-27 15:59:22 TRACE nova return hubs.get_
2012-08-27 15:59:22 TRACE nova File "/usr/lib64/
2012-08-27 15:59:22 TRACE nova return self.greenlet.
2012-08-27 15:59:22 TRACE nova File "/usr/lib64/
2012-08-27 15:59:22 TRACE nova result = function(*args, **kwargs)
2012-08-27 15:59:22 TRACE nova File "/usr/lib64/
2012-08-27 15:59:22 TRACE nova server.start()
2012-08-27 15:59:22 TRACE nova File "/usr/lib64/
2012-08-27 15:59:22 TRACE nova self.manager.
2012-08-27 15:59:22 TRACE nova File "/usr/lib64/
2012-08-27 15:59:22 TRACE nova super(QuantumMa
2012-08-27 15:59:22 TRACE nova File "/usr/lib64/
2012-08-27 15:59:22 TRACE nova self._setup_
2012-08-27 15:59:22 TRACE nova File "/usr/lib64/
2012-08-27 15:59:22 TRACE nova self.l3driver.
2012-08-27 15:59:22 TRACE nova File "/usr/lib64/
2012-08-27 15:59:22 TRACE nova gateway=
2012-08-27 15:59:22 TRACE nova File "/usr/lib64/
2012-08-27 15:59:22 TRACE nova return _get_interface_
2012-08-27 15:59:22 TRACE nova File "/usr/lib64/
2012-08-27 15:59:22 TRACE nova run_as_root=True)
2012-08-27 15:59:22 TRACE nova File "/usr/lib64/
2012-08-27 15:59:22 TRACE nova cmd=' '.join(cmd))
2012-08-27 15:59:22 TRACE nova ProcessExecutio
2012-08-27 15:59:22 TRACE nova Command: sudo ip address add 10.68.152.11/21 dev brq8240b34f-71
2012-08-27 15:59:22 TRACE nova Exit code: 254
2012-08-27 15:59:22 TRACE nova Stdout: ''
2012-08-27 15:59:22 TRACE nova Stderr: 'RTNETLINK answers: File exists\n'
2012-08-27 15:59:22 TRACE nova
Stopping nova-network does not unconfigure the bridge/
This is the patch we run now in order to work around the issue:
index 1869857..70f388d 100755
--- a/nova/
+++ b/nova/
@@ -1151,8 +1151,15 @@ class QuantumLinuxBri
full_ip = '%s/%s' % (network[
- utils.execute('ip', 'address', 'add', full_ip, 'dev', bridge,
- run_as_root=True)
+ try:
+ utils.execute('ip', 'address', 'add', full_ip, 'dev', bridge,
+ run_as_root=True)
+ except exception.
+ if "RTNETLINK answers: File exists" in str(e):
+ LOG.warning(_("IP %s already configured on dev %s"), full_ip, bridge)
+ else:
+ LOG.warning(
+ raise
return dev
Thanks for the report!
So, this is with linuxnet_ interface_ driver= nova.network. linux_net. QuantumLinuxBri dgeInterfaceDri ver
I'm not sure I understand how your patch fixes the problem. The code is:
if not _device_ exists( bridge) :
utils. execute( 'brctl' , 'addbr', bridge, run_as_root=True) 'dhcp_server' ],
network[ 'cidr'] .rpartition( '/')[2] )
utils. execute( 'ip', 'address', 'add', full_ip, 'dev', bridge,
run_ as_root= True, check_exit_code=[0, 2, 254])
...
full_ip = '%s/%s' % (network[
i.e. we only assign an IP address if the bridge did not already exist. How can the IP be already assigned to a bridge we've just created?
Is the root cause actually that we _device_exists() is returning False for a bridge that does exist?
Could you post some more details of your setup too? e.g.
* nova and quantum versions
* nova and quantum config (e.g. grep -v '^#' nova.conf quantum.conf)
* what commands you used to create networks