From d3c084f23448d1890bfda4a06de246f2be3c1279 Mon Sep 17 00:00:00 2001 From: Chris Dent Date: Mon, 17 Apr 2017 16:38:49 +0000 Subject: Register osapi_compute when nova-api is wsgi 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. Change-Id: I7c4acfaa6c50ac0e4d6de69eb62ec5bbad72ff85 Closes-Bug: #1661360 --- setup.cfg | 1 + 1 file changed, 1 insertion(+) (limited to 'setup.cfg') diff --git a/setup.cfg b/setup.cfg index ee57afd104..3e2c3b200f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -69,6 +69,7 @@ console_scripts = nova-xvpvncproxy = nova.cmd.xvpvncproxy:main wsgi_scripts = nova-placement-api = nova.api.openstack.placement.wsgi:init_application + nova-api-wsgi = nova.api.openstack.compute.wsgi:init_application nova.api.v21.extensions = admin_actions = nova.api.openstack.compute.admin_actions:AdminActions -- cgit v1.2.1