When the nova-api services starts from its own standalone binary it
registers itself in the services table. The original wsgi script in
nova/wsgi/nova-api.py did not, leading to the bug referenced below.
The new wsgi script at nova.api.openstack.compute.wsgi, modelled on
a similar thing used for the placement API, provides the necessary
service registration.
If a ServiceTooOld exception happens while trying to register the
service then a very simple (currently very stubby) application is
loaded instead of the compute api. This application returns a 500
and a message.
Some caveats/todos:
* wsgi apps managed under mod-wsgi (and presumably other containers)
are not imported/compiled/run until the first request is made. In
this case that means the service handling does not happen until
that first request, somewhat defeating the purpose if the api is a
bit idle.
Reviewed: https:/ /review. openstack. org/457283 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=d3c084f2344 8d1890bfda4a06d e246f2be3c1279
Committed: https:/
Submitter: Jenkins
Branch: master
commit d3c084f23448d18 90bfda4a06de246 f2be3c1279
Author: Chris Dent <email address hidden>
Date: Mon Apr 17 16:38:49 2017 +0000
Register osapi_compute when nova-api is wsgi
When the nova-api services starts from its own standalone binary it wsgi/nova- api.py did not, leading to the bug referenced below.
registers itself in the services table. The original wsgi script in
nova/
The new wsgi script at nova.api. openstack. compute. wsgi, modelled on
a similar thing used for the placement API, provides the necessary
service registration.
If a ServiceTooOld exception happens while trying to register the
service then a very simple (currently very stubby) application is
loaded instead of the compute api. This application returns a 500
and a message.
Some caveats/todos:
* wsgi apps managed under mod-wsgi (and presumably other containers) compiled/ run until the first request is made. In
are not imported/
this case that means the service handling does not happen until
that first request, somewhat defeating the purpose if the api is a
bit idle.
Change-Id: I7c4acfaa6c50ac 0e4d6de69eb62ec 5bbad72ff85
Closes-Bug: #1661360