[Openstack] nova-network can't startup

小盆儿 zhaopeng1988 at gmail.com
Wed Dec 19 18:29:11 UTC 2012


Hi everybody,
I try to build an all-in-one openstack env.
but i can't start up nova-network

nova-manage service list  didn't display nova-network
I check the /var/log/nova/nova-network.log
got the error like this

2012-12-20 02:04:43 TRACE nova Traceback (most recent call last):
2012-12-20 02:04:43 TRACE nova   File "/usr/bin/nova-network", line 48, in
<module>
2012-12-20 02:04:43 TRACE nova     service.wait()
2012-12-20 02:04:43 TRACE nova   File
"/usr/lib/python2.7/dist-packages/nova/service.py", line 659, in wait
2012-12-20 02:04:43 TRACE nova     _launcher.wait()
2012-12-20 02:04:43 TRACE nova   File
"/usr/lib/python2.7/dist-packages/nova/service.py", line 192, in wait
2012-12-20 02:04:43 TRACE nova     super(ServiceLauncher, self).wait()
2012-12-20 02:04:43 TRACE nova   File
"/usr/lib/python2.7/dist-packages/nova/service.py", line 162, in wait
2012-12-20 02:04:43 TRACE nova     service.wait()
2012-12-20 02:04:43 TRACE nova   File
"/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 166, in
wait
2012-12-20 02:04:43 TRACE nova     return self._exit_event.wait()
2012-12-20 02:04:43 TRACE nova   File
"/usr/lib/python2.7/dist-packages/eventlet/event.py", line 116, in wait
2012-12-20 02:04:43 TRACE nova     return hubs.get_hub().switch()
2012-12-20 02:04:43 TRACE nova   File
"/usr/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 177, in switch
2012-12-20 02:04:43 TRACE nova     return self.greenlet.switch()
2012-12-20 02:04:43 TRACE nova   File
"/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 192, in
main
2012-12-20 02:04:43 TRACE nova     result = function(*args, **kwargs)
2012-12-20 02:04:43 TRACE nova   File
"/usr/lib/python2.7/dist-packages/nova/service.py", line 132, in run_server
2012-12-20 02:04:43 TRACE nova     server.start()
2012-12-20 02:04:43 TRACE nova   File
"/usr/lib/python2.7/dist-packages/nova/service.py", line 398, in start
2012-12-20 02:04:43 TRACE nova     self.manager.init_host()
2012-12-20 02:04:43 TRACE nova   File
"/usr/lib/python2.7/dist-packages/nova/network/manager.py", line 1899, in
init_host
2012-12-20 02:04:43 TRACE nova     self.l3driver.initialize()
2012-12-20 02:04:43 TRACE nova   File
"/usr/lib/python2.7/dist-packages/nova/network/l3.py", line 82, in
initialize
2012-12-20 02:04:43 TRACE nova     linux_net.init_host()
2012-12-20 02:04:43 TRACE nova   File
"/usr/lib/python2.7/dist-packages/nova/network/linux_net.py", line 552, in
init_host
2012-12-20 02:04:43 TRACE nova     add_snat_rule(ip_range)
2012-12-20 02:04:43 TRACE nova   File
"/usr/lib/python2.7/dist-packages/nova/network/linux_net.py", line 542, in
add_snat_rule
2012-12-20 02:04:43 TRACE nova     iptables_manager.apply()
2012-12-20 02:04:43 TRACE nova   File
"/usr/lib/python2.7/dist-packages/nova/network/linux_net.py", line 345, in
apply
2012-12-20 02:04:43 TRACE nova     self._apply()
2012-12-20 02:04:43 TRACE nova   File
"/usr/lib/python2.7/dist-packages/nova/utils.py", line 744, in inner
2012-12-20 02:04:43 TRACE nova     retval = f(*args, **kwargs)
2012-12-20 02:04:43 TRACE nova   File
"/usr/lib/python2.7/dist-packages/nova/network/linux_net.py", line 365, in
_apply
2012-12-20 02:04:43 TRACE nova     attempts=5)
2012-12-20 02:04:43 TRACE nova   File
"/usr/lib/python2.7/dist-packages/nova/network/linux_net.py", line 948, in
_execute
2012-12-20 02:04:43 TRACE nova     return utils.execute(*cmd, **kwargs)
2012-12-20 02:04:43 TRACE nova   File
"/usr/lib/python2.7/dist-packages/nova/utils.py", line 198, in execute
2012-12-20 02:04:43 TRACE nova     cmd=' '.join(cmd))
2012-12-20 02:04:43 TRACE nova ProcessExecutionError: Unexpected error
while running command.
2012-12-20 02:04:43 TRACE nova Command: sudo nova-rootwrap iptables-save -c
-t filter
2012-12-20 02:04:43 TRACE nova Exit code: 1
2012-12-20 02:04:43 TRACE nova Stdout: ''
2012-12-20 02:04:43 TRACE nova Stderr: 'sudo: sorry, you must have a tty to
run sudo\n'
2012-12-20 02:04:43 TRACE nova

My nova.conf
[DEFAULT]

# LOGS/STATE
verbose=True
logdir=/var/log/nova
state_path=/var/lib/nova
lock_path=/run/lock/nova

# AUTHENTICATION
auth_strategy=keystone

# SCHEDULER
scheduler_driver=nova.scheduler.multi.MultiScheduler
compute_scheduler_driver=nova.scheduler.filter_scheduler.FilterScheduler

# CINDER
volume_api_class=nova.volume.cinder.API

# DATABASE
sql_connection=mysql://nova:ops.cntv.cn@10.64.0.1/nova

# COMPUTE
libvirt_type=kvm
libvirt_use_virtio_for_bridges=True
start_guests_on_host_boot=True
resume_guests_state_on_host_boot=True
api_paste_config=/etc/nova/api-paste.ini
allow_admin_api=True
use_deprecated_auth=False
nova_url=http://10.64.0.1:8774/v1.1/
#root_helper=sudo nova-rootwrap /etc/nova/rootwrap.conf
root_helper=sudo nova-rootwrap

# APIS:
ec2_host=10.64.0.1
ec2_url=http://10.64.0.1:8773/services/Cloud
keystone_ec2_url=http://10.64.0.1:5000/v2.0/ec2tokens
s3_host=10.64.0.1
cc_host=10.64.0.1
metadata_host=10.64.0.1
#metadata_listen=0.0.0.0
enabled_apis=ec2,osapi_compute,metadata

# RABBITMQ
rabbit_host=10.64.0.1
rabbit_password=ops.cntv.cn

# GLANCE
image_service=nova.image.glance.GlanceImageService
glance_api_servers=10.64.0.1:9292

# NETWORK
network_manager=nova.network.manager.FlatDHCPManager
force_dhcp_release=True
dhcpbridge_flagfile=/etc/nova/nova.conf
dhcpbridge=/usr/bin/nova-dhcpbridge
firewall_driver=nova.virt.libvirt.firewall.IptablesFirewallDriver
public_interface=eth1
flat_interface=eth0
flat_network_bridge=br100
fixed_range=50.50.1.129/25
network_size=128
flat_network_dhcp_start=50.50.1.129
flat_injected=False
connection_type=libvirt
multi_host=True

# NOVNC CONSOLE
novnc_enabled=True
novncproxy_base_url=http://10.64.0.1:6080/vnc_auto.html
vncserver_proxyclient_address=10.64.0.1
vncserver_listen=10.64.0.1

and I have add this line to the sudoers file:
nova ALL=(ALL) NOPASSWD:ALL

In the nova.conf I try to config like:
root_helper=sudo nova-rootwrap /etc/nova/rootwrap.conf
or
#root_helper=sudo nova-rootwrap /etc/nova/rootwrap.conf
root_helper=sudo nova-rootwrap

these configs all didn't work

how can I fix this problem ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20121220/0936ac3c/attachment.html>


More information about the Openstack mailing list