From d8e4c91ebf589583ac79291de7a5e2c3f033962b Mon Sep 17 00:00:00 2001 From: Brian Elliott Date: Thu, 9 May 2013 21:07:27 +0000 Subject: 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 --- nova/cmd/all.py | 10 +++++----- nova/cmd/api.py | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'nova/cmd') 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() -- cgit