nova-network unable to run normally due to Command: sudo nova-rootwrap iptables-save -t filter

Asked by Vincent Hou

Does anyone knows what this error is about?
/var/log/nova/nova-network.log gives me the error like this:

2012-05-24 13:43:05 DEBUG nova.utils [-] Result was 1 from (pid=7270) execute /opt/stack/nova/nova/utils.py:194
2012-05-24 13:43:05 DEBUG nova.utils [-] ['sudo', 'nova-rootwrap', 'iptables-save', '-t', 'filter'] failed. Retrying. from (pid=7270) execute /opt/stack/nova/nova/utils.py:207
2012-05-24 13:43:06 DEBUG nova.utils [-] Running cmd (subprocess): sudo nova-rootwrap iptables-save -t filter from (pid=7270) execute /opt/stack/nova/nova/utils.py:178
2012-05-24 13:43:06 DEBUG nova.utils [-] Result was 1 from (pid=7270) execute /opt/stack/nova/nova/utils.py:194
2012-05-24 13:43:06 CRITICAL nova [-] Unexpected error while running command.
Command: sudo nova-rootwrap iptables-save -t filter
Exit code: 1
Stdout: ''
Stderr: 'sudo\xef\xbc\x9a \xe6\xb2\xa1\xe6\x9c\x89\xe7\xbb\x88\xe7\xab\xaf\xe5\xad\x98\xe5\x9c\xa8\xef\xbc\x8c\xe4\xb8\x94\xe6\x9c\xaa\xe6\x8c\x87\xe5\xae\x9a askpass \xe7\xa8\x8b\xe5\xba\x8f\nSorry, try again.\nsudo\xef\xbc\x9a \xe6\xb2\xa1\xe6\x9c\x89\xe7\xbb\x88\xe7\xab\xaf\xe5\xad\x98\xe5\x9c\xa8\xef\xbc\x8c\xe4\xb8\x94\xe6\x9c\xaa\xe6\x8c\x87\xe5\xae\x9a askpass \xe7\xa8\x8b\xe5\xba\x8f\nSorry, try again.\nsudo\xef\xbc\x9a \xe6\xb2\xa1\xe6\x9c\x89\xe7\xbb\x88\xe7\xab\xaf\xe5\xad\x98\xe5\x9c\xa8\xef\xbc\x8c\xe4\xb8\x94\xe6\x9c\xaa\xe6\x8c\x87\xe5\xae\x9a askpass \xe7\xa8\x8b\xe5\xba\x8f\nSorry, try again.\nsudo\xef\xbc\x9a 3 \xe6\xac\xa1\xe9\x94\x99\xe8\xaf\xaf\xe5\xaf\x86\xe7\xa0\x81\xe5\xb0\x9d\xe8\xaf\x95\n'
2012-05-24 13:43:06 TRACE nova Traceback (most recent call last):
2012-05-24 13:43:06 TRACE nova File "/usr/local/bin/nova-network", line 7, in <module>
2012-05-24 13:43:06 TRACE nova execfile(__file__)
2012-05-24 13:43:06 TRACE nova File "/opt/stack/nova/bin/nova-network", line 49, in <module>
2012-05-24 13:43:06 TRACE nova service.wait()
2012-05-24 13:43:06 TRACE nova File "/opt/stack/nova/nova/service.py", line 448, in wait
2012-05-24 13:43:06 TRACE nova _launcher.wait()
2012-05-24 13:43:06 TRACE nova File "/opt/stack/nova/nova/service.py", line 148, in wait
2012-05-24 13:43:06 TRACE nova service.wait()
2012-05-24 13:43:06 TRACE nova File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 166, in wait
2012-05-24 13:43:06 TRACE nova return self._exit_event.wait()
2012-05-24 13:43:06 TRACE nova File "/usr/lib/python2.7/dist-packages/eventlet/event.py", line 116, in wait
2012-05-24 13:43:06 TRACE nova return hubs.get_hub().switch()
2012-05-24 13:43:06 TRACE nova File "/usr/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 177, in switch
2012-05-24 13:43:06 TRACE nova return self.greenlet.switch()
2012-05-24 13:43:06 TRACE nova File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 192, in main
2012-05-24 13:43:06 TRACE nova result = function(*args, **kwargs)
2012-05-24 13:43:06 TRACE nova File "/opt/stack/nova/nova/service.py", line 109, in run_server
2012-05-24 13:43:06 TRACE nova server.start()
2012-05-24 13:43:06 TRACE nova File "/opt/stack/nova/nova/service.py", line 182, in start
2012-05-24 13:43:06 TRACE nova self.manager.init_host()
2012-05-24 13:43:06 TRACE nova File "/opt/stack/nova/nova/network/manager.py", line 1727, in init_host
2012-05-24 13:43:06 TRACE nova self.l3driver.initialize()
2012-05-24 13:43:06 TRACE nova File "/opt/stack/nova/nova/network/l3.py", line 84, in initialize
2012-05-24 13:43:06 TRACE nova linux_net.init_host()
2012-05-24 13:43:06 TRACE nova File "/opt/stack/nova/nova/network/linux_net.py", line 443, in init_host
2012-05-24 13:43:06 TRACE nova add_snat_rule(ip_range)
2012-05-24 13:43:06 TRACE nova File "/opt/stack/nova/nova/network/linux_net.py", line 433, in add_snat_rule
2012-05-24 13:43:06 TRACE nova iptables_manager.apply()
2012-05-24 13:43:06 TRACE nova File "/opt/stack/nova/nova/utils.py", line 878, in inner
2012-05-24 13:43:06 TRACE nova retval = f(*args, **kwargs)
2012-05-24 13:43:06 TRACE nova File "/opt/stack/nova/nova/network/linux_net.py", line 329, in apply
2012-05-24 13:43:06 TRACE nova attempts=5)
2012-05-24 13:43:06 TRACE nova File "/opt/stack/nova/nova/network/linux_net.py", line 816, in _execute
2012-05-24 13:43:06 TRACE nova return utils.execute(*cmd, **kwargs)
2012-05-24 13:43:06 TRACE nova File "/opt/stack/nova/nova/utils.py", line 201, in execute
2012-05-24 13:43:06 TRACE nova cmd=' '.join(cmd))
2012-05-24 13:43:06 TRACE nova ProcessExecutionError: Unexpected error while running command.
2012-05-24 13:43:06 TRACE nova Command: sudo nova-rootwrap iptables-save -t filter
2012-05-24 13:43:06 TRACE nova Exit code: 1
2012-05-24 13:43:06 TRACE nova Stdout: ''
2012-05-24 13:43:06 TRACE nova Stderr: 'sudo\xef\xbc\x9a \xe6\xb2\xa1\xe6\x9c\x89\xe7\xbb\x88\xe7\xab\xaf\xe5\xad\x98\xe5\x9c\xa8\xef\xbc\x8c\xe4\xb8\x94\xe6\x9c\xaa\xe6\x8c\x87\xe5\xae\x9a askpass \xe7\xa8\x8b\xe5\xba\x8f\nSorry, try again.\nsudo\xef\xbc\x9a \xe6\xb2\xa1\xe6\x9c\x89\xe7\xbb\x88\xe7\xab\xaf\xe5\xad\x98\xe5\x9c\xa8\xef\xbc\x8c\xe4\xb8\x94\xe6\x9c\xaa\xe6\x8c\x87\xe5\xae\x9a askpass \xe7\xa8\x8b\xe5\xba\x8f\nSorry, try again.\nsudo\xef\xbc\x9a \xe6\xb2\xa1\xe6\x9c\x89\xe7\xbb\x88\xe7\xab\xaf\xe5\xad\x98\xe5\x9c\xa8\xef\xbc\x8c\xe4\xb8\x94\xe6\x9c\xaa\xe6\x8c\x87\xe5\xae\x9a askpass \xe7\xa8\x8b\xe5\xba\x8f\nSorry, try again.\nsudo\xef\xbc\x9a 3 \xe6\xac\xa1\xe9\x94\x99\xe8\xaf\xaf\xe5\xaf\x86\xe7\xa0\x81\xe5\xb0\x9d\xe8\xaf\x95\n'
2012-05-24 13:43:06 TRACE nova

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
Vincent Hou
Solved:
Last query:
Last reply:
Revision history for this message
Max Schilling (mx-chilly) said :
#1

Looks like nova trys to use 'sudo'. Did you allow root-wrap: http://wiki.openstack.org/Packager/Rootwrap?

Revision history for this message
Vincent Hou (houshengbo) said :
#2

Thank you, Max.