nova api failed to start with USE_VENV=True

Bug #1461826 reported by yong sheng gong
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
devstack
Invalid
Undecided
Unassigned

Bug Description

with USE_VENV=True, the nova-api does not start, it has the following error:
/opt/stack/nova.venv/bin/nova-api
...
may be removed in M. It will not be superseded.
2015-06-04 03:58:47.798 5387 INFO nova.wsgi [-] osapi_compute listening on 0.0.0.0:8774
2015-06-04 03:58:47.798 5387 INFO nova.openstack.common.service [-] Starting 12 workers
2015-06-04 03:58:47.801 5387 INFO nova.openstack.common.service [-] Started child 5404
2015-06-04 03:58:47.804 5387 INFO nova.openstack.common.service [-] Started child 5405
2015-06-04 03:58:47.806 5387 INFO nova.openstack.common.service [-] Started child 5406
2015-06-04 03:58:47.807 5404 INFO nova.osapi_compute.wsgi.server [-] (5404) wsgi starting up on http://0.0.0.0:8774/
2015-06-04 03:58:47.809 5405 INFO nova.osapi_compute.wsgi.server [-] (5405) wsgi starting up on http://0.0.0.0:8774/
2015-06-04 03:58:47.809 5406 INFO nova.osapi_compute.wsgi.server [-] (5406) wsgi starting up on http://0.0.0.0:8774/
2015-06-04 03:58:47.809 5387 INFO nova.openstack.common.service [-] Started child 5407
2015-06-04 03:58:47.812 5387 INFO nova.openstack.common.service [-] Started child 5408
2015-06-04 03:58:47.814 5407 INFO nova.osapi_compute.wsgi.server [-] (5407) wsgi starting up on http://0.0.0.0:8774/
2015-06-04 03:58:47.814 5387 INFO nova.openstack.common.service [-] Started child 5409
2015-06-04 03:58:47.816 5408 INFO nova.osapi_compute.wsgi.server [-] (5408) wsgi starting up on http://0.0.0.0:8774/
2015-06-04 03:58:47.817 5409 INFO nova.osapi_compute.wsgi.server [-] (5409) wsgi starting up on http://0.0.0.0:8774/
2015-06-04 03:58:47.817 5387 INFO nova.openstack.common.service [-] Started child 5410
2015-06-04 03:58:47.819 5410 INFO nova.osapi_compute.wsgi.server [-] (5410) wsgi starting up on http://0.0.0.0:8774/
2015-06-04 03:58:47.820 5387 INFO nova.openstack.common.service [-] Started child 5411
2015-06-04 03:58:47.822 5387 INFO nova.openstack.common.service [-] Started child 5412
2015-06-04 03:58:47.824 5411 INFO nova.osapi_compute.wsgi.server [-] (5411) wsgi starting up on http://0.0.0.0:8774/
2015-06-04 03:58:47.825 5387 INFO nova.openstack.common.service [-] Started child 5413
2015-06-04 03:58:47.826 5412 INFO nova.osapi_compute.wsgi.server [-] (5412) wsgi starting up on http://0.0.0.0:8774/
2015-06-04 03:58:47.827 5413 INFO nova.osapi_compute.wsgi.server [-] (5413) wsgi starting up on http://0.0.0.0:8774/
2015-06-04 03:58:47.827 5387 INFO nova.openstack.common.service [-] Started child 5414
2015-06-04 03:58:47.830 5387 INFO nova.openstack.common.service [-] Started child 5415
2015-06-04 03:58:47.831 5414 INFO nova.osapi_compute.wsgi.server [-] (5414) wsgi starting up on http://0.0.0.0:8774/
2015-06-04 03:58:47.832 5387 INFO nova.network.driver [-] Loading network driver 'nova.network.linux_net'
2015-06-04 03:58:47.834 5415 INFO nova.osapi_compute.wsgi.server [-] (5415) wsgi starting up on http://0.0.0.0:8774/
2015-06-04 03:58:50.062 5387 CRITICAL nova [-] ProcessExecutionError: Unexpected error while running command.
Command: sudo nova-rootwrap /etc/nova/rootwrap.conf iptables-save -c
Exit code: 1
Stdout: u''
Stderr: u'sudo: nova-rootwrap: command not found\n'
2015-06-04 03:58:50.062 5387 ERROR nova Traceback (most recent call last):
2015-06-04 03:58:50.062 5387 ERROR nova File "/opt/stack/nova.venv/bin/nova-api", line 10, in <module>
2015-06-04 03:58:50.062 5387 ERROR nova sys.exit(main())
2015-06-04 03:58:50.062 5387 ERROR nova File "/opt/stack/nova/nova/cmd/api.py", line 55, in main
2015-06-04 03:58:50.062 5387 ERROR nova server = service.WSGIService(api, use_ssl=should_use_ssl)
2015-06-04 03:58:50.062 5387 ERROR nova File "/opt/stack/nova/nova/service.py", line 320, in __init__
2015-06-04 03:58:50.062 5387 ERROR nova self.manager = self._get_manager()
2015-06-04 03:58:50.062 5387 ERROR nova File "/opt/stack/nova/nova/service.py", line 377, in _get_manager
2015-06-04 03:58:50.062 5387 ERROR nova return manager_class()
2015-06-04 03:58:50.062 5387 ERROR nova File "/opt/stack/nova/nova/api/manager.py", line 30, in __init__
2015-06-04 03:58:50.062 5387 ERROR nova self.network_driver.metadata_accept()
2015-06-04 03:58:50.062 5387 ERROR nova File "/opt/stack/nova/nova/network/linux_net.py", line 700, in metadata_accept
2015-06-04 03:58:50.062 5387 ERROR nova iptables_manager.apply()
2015-06-04 03:58:50.062 5387 ERROR nova File "/opt/stack/nova/nova/network/linux_net.py", line 442, in apply
2015-06-04 03:58:50.062 5387 ERROR nova self._apply()
2015-06-04 03:58:50.062 5387 ERROR nova File "/opt/stack/nova.venv/lib/python2.7/site-packages/oslo_concurrency/lockutils.py", line 445, in inner
2015-06-04 03:58:50.062 5387 ERROR nova return f(*args, **kwargs)
2015-06-04 03:58:50.062 5387 ERROR nova File "/opt/stack/nova/nova/network/linux_net.py", line 462, in _apply
2015-06-04 03:58:50.062 5387 ERROR nova attempts=5)
2015-06-04 03:58:50.062 5387 ERROR nova File "/opt/stack/nova/nova/network/linux_net.py", line 1266, in _execute
2015-06-04 03:58:50.062 5387 ERROR nova return utils.execute(*cmd, **kwargs)
2015-06-04 03:58:50.062 5387 ERROR nova File "/opt/stack/nova/nova/utils.py", line 228, in execute
2015-06-04 03:58:50.062 5387 ERROR nova return processutils.execute(*cmd, **kwargs)
2015-06-04 03:58:50.062 5387 ERROR nova File "/opt/stack/nova.venv/lib/python2.7/site-packages/oslo_concurrency/processutils.py", line 240, in execute
2015-06-04 03:58:50.062 5387 ERROR nova cmd=sanitized_cmd)
2015-06-04 03:58:50.062 5387 ERROR nova ProcessExecutionError: Unexpected error while running command.
2015-06-04 03:58:50.062 5387 ERROR nova Command: sudo nova-rootwrap /etc/nova/rootwrap.conf iptables-save -c
2015-06-04 03:58:50.062 5387 ERROR nova Exit code: 1
2015-06-04 03:58:50.062 5387 ERROR nova Stdout: u''
2015-06-04 03:58:50.062 5387 ERROR nova Stderr: u'sudo: nova-rootwrap: command not found\n'
2015-06-04 03:58:50.062 5387 ERROR nova

Revision history for this message
yong sheng gong (gongysh) wrote :

It seem the nova-api's env does not pass on to its sub process 'sudo'?

Changed in devstack:
status: New → Confirmed
Revision history for this message
Ethan Lynn (ethanlynn) wrote :

Any update for it?

Revision history for this message
fujioka yuuichi (fujioka-yuuichi-d) wrote :

Is this a devstack bug?

"sudo nova-rootwrap" is hardcoded at https://github.com/openstack/nova/blob/279c2b0a015b67c5195ab028eeab15b00a94e5ee/nova/utils.py#L254.

I feel this is a nova bug.

Revision history for this message
Sean Dague (sdague) wrote :

This devstack bug was last updated over 180 days ago, as devstack
is a fast moving project and we'd like to get the tracker down to
currently actionable bugs, this is getting marked as Invalid. If the
issue still exists, please feel free to reopen it.

Changed in devstack:
status: Confirmed → Invalid
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.