summaryrefslogtreecommitdiffstats
path: root/nova/cmd
diff options
context:
space:
mode:
authorBrian Elliott <bdelliott@gmail.com>2013-05-09 21:07:27 +0000
committerBrian Elliott <bdelliott@gmail.com>2013-05-13 13:28:58 +0000
commitd8e4c91ebf589583ac79291de7a5e2c3f033962b (patch)
treea444f2ae9a3082f3615c7b05a9ac18876bffea57 /nova/cmd
parentc39687edb9138c6eac675b8781a5d4bf5a51c968 (diff)
downloadnova-d8e4c91ebf589583ac79291de7a5e2c3f033962b.tar.gz
nova-d8e4c91ebf589583ac79291de7a5e2c3f033962b.tar.xz
nova-d8e4c91ebf589583ac79291de7a5e2c3f033962b.zip
Convert Nova to use Oslo service infrastructure.
Convert Nova to use the Oslo versions of: * Service * Launchers Also add Service timers to the Service ThreadGroup. blueprint use-oslo-services Change-Id: Id8ab017f4525afd69fed322311f2d5cc3b6d6f98
Diffstat (limited to 'nova/cmd')
-rw-r--r--nova/cmd/all.py10
-rw-r--r--nova/cmd/api.py4
2 files changed, 7 insertions, 7 deletions
diff --git a/nova/cmd/all.py b/nova/cmd/all.py
index f510069b6..517033d05 100644
--- a/nova/cmd/all.py
+++ b/nova/cmd/all.py
@@ -49,19 +49,19 @@ def main():
logging.setup("nova")
LOG = logging.getLogger('nova.all')
utils.monkey_patch()
- launcher = service.ProcessLauncher()
+ launcher = service.process_launcher()
# nova-api
for api in CONF.enabled_apis:
try:
server = service.WSGIService(api)
- launcher.launch_server(server, workers=server.workers or 1)
+ launcher.launch_service(server, workers=server.workers or 1)
except (Exception, SystemExit):
LOG.exception(_('Failed to load %s') % '%s-api' % api)
for mod in [s3server, xvp_proxy]:
try:
- launcher.launch_server(mod.get_wsgi_server())
+ launcher.launch_service(mod.get_wsgi_server())
except (Exception, SystemExit):
LOG.exception(_('Failed to load %s') % mod.__name__)
@@ -82,8 +82,8 @@ def main():
manager = None
try:
- launcher.launch_server(service.Service.create(binary=binary,
- topic=topic,
+ launcher.launch_service(service.Service.create(binary=binary,
+ topic=topic,
manager=manager))
except (Exception, SystemExit):
LOG.exception(_('Failed to load %s'), binary)
diff --git a/nova/cmd/api.py b/nova/cmd/api.py
index a7f6313b0..f838d988f 100644
--- a/nova/cmd/api.py
+++ b/nova/cmd/api.py
@@ -41,7 +41,7 @@ def main():
logging.setup("nova")
utils.monkey_patch()
- launcher = service.ProcessLauncher()
+ launcher = service.process_launcher()
for api in CONF.enabled_apis:
should_use_ssl = api in CONF.enabled_ssl_apis
if api == 'ec2':
@@ -49,5 +49,5 @@ def main():
max_url_len=16384)
else:
server = service.WSGIService(api, use_ssl=should_use_ssl)
- launcher.launch_server(server, workers=server.workers or 1)
+ launcher.launch_service(server, workers=server.workers or 1)
launcher.wait()