From 3b93fda114c0772675359f446b05228953a21ff3 Mon Sep 17 00:00:00 2001 From: zhipengh Date: Fri, 6 Apr 2018 17:39:03 +0800 Subject: [PATCH] Enable mutable config in Cyborg This patch makes sure Cyborg complies with the community Rocky goal for mutable config. Part of bp:mutable-config Change-Id: I6dec0492f59ee45501b1bff73453b1335aafb62b Signed-off-by: zhipengh --- cyborg/cmd/agent.py | 2 +- cyborg/cmd/api.py | 3 ++- cyborg/cmd/conductor.py | 2 +- cyborg/common/service.py | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cyborg/cmd/agent.py b/cyborg/cmd/agent.py index 8663bd13..d7f06c28 100644 --- a/cyborg/cmd/agent.py +++ b/cyborg/cmd/agent.py @@ -33,5 +33,5 @@ def main(): 'AgentManager', constants.AGENT_TOPIC) - launcher = service.launch(CONF, mgr) + launcher = service.launch(CONF, mgr, restart_method='mutate') launcher.wait() diff --git a/cyborg/cmd/api.py b/cyborg/cmd/api.py index 7199e7b6..a1001569 100644 --- a/cyborg/cmd/api.py +++ b/cyborg/cmd/api.py @@ -32,5 +32,6 @@ def main(): # Build and start the WSGI app launcher = cyborg_service.process_launcher() server = cyborg_service.WSGIService('cyborg_api', CONF.api.enable_ssl_api) - launcher.launch_service(server, workers=server.workers) + launcher.launch_service(server, workers=server.workers, + restart_method='mutate') launcher.wait() diff --git a/cyborg/cmd/conductor.py b/cyborg/cmd/conductor.py index eb04dc2f..98aaff57 100644 --- a/cyborg/cmd/conductor.py +++ b/cyborg/cmd/conductor.py @@ -35,5 +35,5 @@ def main(): 'ConductorManager', constants.CONDUCTOR_TOPIC) - launcher = service.launch(CONF, mgr) + launcher = service.launch(CONF, mgr, restart_method='mutate') launcher.wait() diff --git a/cyborg/common/service.py b/cyborg/common/service.py index 2eaeac97..159bf711 100644 --- a/cyborg/common/service.py +++ b/cyborg/common/service.py @@ -89,7 +89,7 @@ def prepare_service(argv=None): def process_launcher(): - return service.ProcessLauncher(CONF) + return service.ProcessLauncher(CONF, restart_method='mutate') class WSGIService(service.ServiceBase):