running nova-api-wsgi from the command line fails in python3.6

Bug #1795502 reported by Chris Dent
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Triaged
Low
Unassigned

Bug Description

The nova-api-wsgi script provides a quick and easy way to run the nova-api from the command line. In at least python3.6 it fails with:

ERROR nova Traceback (most recent call last):
ERROR nova File "/usr/local/bin/nova-api-wsgi", line 50, in <module>
ERROR nova server.serve_forever()
ERROR nova File "/usr/lib/python3.6/socketserver.py", line 232, in serve_forever
ERROR nova with _ServerSelector() as selector:
ERROR nova File "/usr/lib/python3.6/selectors.py", line 348, in __init__
ERROR nova self._poll = select.poll()
ERROR nova AttributeError: module 'select' has no attribute 'poll'
ERROR nova

this is because eventlet is being monkey patched too late, see https://stackoverflow.com/questions/51524589/attributeerror-module-select-has-no-attribute-poll

importing eventlet at the top of the script fixes it.

It's not clear this is necessarily worth fixing, as running nova-api this way is not really a thing. I only did because I was trying to confirm that a problem was not the result of uwsgi.

But report it for sake of discussion.

Tags: api
Matt Riedemann (mriedem)
Changed in nova:
status: New → Confirmed
importance: Undecided → Low
status: Confirmed → Triaged
Revision history for this message
Matt Riedemann (mriedem) wrote :

Was this fixed with https://review.opendev.org/#/c/626952/ ?

If not, I'm willing to bet we should just invalidate this since the answer for Stein at least would be "use extracted placement" since we won't fix this in train (there is no placement-in-nova in train) nor stein (use extracted).

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.