Fail to start nova-network when set dmz_cidr is empty

Bug #1255029 reported by David Geng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Opinion
Wishlist
David Geng

Bug Description

I can not start the nova-network when set the dmz_cidr is empty in nova.conf:

2013-11-26 04:50:49.916 23022 ERROR nova.openstack.common.threadgroup [-] Unexpected error while running command.
Command: sudo nova-rootwrap /etc/nova/rootwrap.conf iptables-restore -c
Exit code: 2
Stdout: ''
Stderr: "iptables-restore v1.4.7: host/network `None' not found\nError occurred at line: 64\nTry `iptables-restore -h' or 'iptables-restore --help' for more information.\n"
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup Traceback (most recent call last):
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.6/site-packages/nova/openstack/common/threadgroup.py", line 117, in wait
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup x.wait()
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.6/site-packages/nova/openstack/common/threadgroup.py", line 49, in wait
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup return self.thread.wait()
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.6/site-packages/eventlet/greenthread.py", line 168, in wait
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup return self._exit_event.wait()
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.6/site-packages/eventlet/event.py", line 116, in wait
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup return hubs.get_hub().switch()
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.6/site-packages/eventlet/hubs/hub.py", line 187, in switch
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup return self.greenlet.switch()
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.6/site-packages/eventlet/greenthread.py", line 194, in main
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup result = function(*args, **kwargs)
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.6/site-packages/nova/openstack/common/service.py", line 448, in run_service
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup service.start()
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.6/site-packages/nova/service.py", line 154, in start
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup self.manager.init_host()
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.6/site-packages/nova/network/manager.py", line 1713, in init_host
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup self.l3driver.initialize(fixed_range=False, networks=networks)
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.6/site-packages/nova/network/l3.py", line 90, in initialize
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup self.initialize_network(network['cidr'])
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.6/site-packages/nova/network/l3.py", line 101, in initialize_network
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup linux_net.init_host(cidr)
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.6/site-packages/nova/network/linux_net.py", line 700, in init_host
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup iptables_manager.apply()
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.6/site-packages/nova/network/linux_net.py", line 421, in apply
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup self._apply()
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.6/site-packages/nova/openstack/common/lockutils.py", line 248, in inner
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup return f(*args, **kwargs)
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.6/site-packages/nova/network/linux_net.py", line 452, in _apply
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup attempts=5)
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.6/site-packages/nova/network/linux_net.py", line 1194, in _execute
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup return utils.execute(*cmd, **kwargs)
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.6/site-packages/nova/utils.py", line 174, in execute
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup return processutils.execute(*cmd, **kwargs)
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.6/site-packages/nova/openstack/common/processutils.py", line 178, in execute
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup cmd=' '.join(cmd))
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup ProcessExecutionError: Unexpected error while running command.
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup Command: sudo nova-rootwrap /etc/nova/rootwrap.conf iptables-restore -c
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup Exit code: 2
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup Stdout: ''
2013-11-26 04:50:49.916 23022 TRACE nova.openstack.common.threadgroup Stderr: "iptables-restore v1.4.7: host/network `None' not found\nError occurred at line: 64\nTry `iptables-restore -h' or 'iptables-restore --help' for more information.\n"

Revision history for this message
David Geng (genggjh) wrote :

The attribute like this in nova.conf:

multi_host=true
network_manager=nova.network.manager.VlanManager
public_interface=eth0.1000
fixed_range=192.168.100.0/24
dmz_cidr=[]

Changed in nova:
assignee: nobody → David Geng (genggjh)
Revision history for this message
David Geng (genggjh) wrote :

I think the root cause is the python load the dmz_cidr=[] is a list like: '['[]']' instead of an empty list:

2013-11-26 04:50:45.703 23022 DEBUG nova.network.linux_net [req-7079d0e8-7dea-44a9-8c7a-26057de8077c None None] dmz_cidr-test-['[]'] init_host /usr/lib/python2.6/site-packages/nova/network/linux_net.py:688

I tried the settings like this : 'dmz_cidr= ' in nova.conf, it still does not work:
2013-11-26 05:05:01.777 23401 DEBUG nova.network.linux_net [req-b5a7bd98-a76b-4b15-bf6e-cfa29d548c08 None None] dmz_cidr-test-[''] init_host /usr/lib/python2.6/site-packages/nova/network/linux_net.py:688

Revision history for this message
David Geng (genggjh) wrote :

So, i think we need enhance the error check when load dmz cidr at least.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/58491

Changed in nova:
status: New → In Progress
David Geng (genggjh)
summary: - Fail to start nova-network when set dmx_cidr is empty
+ Fail to start nova-network when set dmz_cidr is empty
description: updated
Revision history for this message
Joe Gordon (jogo) wrote :

The patch was abandoned, is this bug still valid?

Changed in nova:
status: In Progress → Incomplete
Sean Dague (sdague)
Changed in nova:
importance: Undecided → Wishlist
status: Incomplete → Opinion
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.