From d2f03bc7b0edffd5397de30d4ccd6405fd2a0c52 Mon Sep 17 00:00:00 2001 From: Anusree Date: Tue, 24 Jul 2018 21:00:31 +0530 Subject: [PATCH] Enable mutable config in mistral New releases of oslo.config support a 'mutable' parameter to Opts. oslo.service provides an option here Icec3e664f3fe72614e373b2938e8dee53cf8bc5e allows services to tell oslo.service they want mutate_config_files to be called by passing a parameter. This commit is to use the same. This allows mistral to benefit from I1e7a69de169cc85f4c09954b2f46ce2da7106d90, where the 'debug' option (owned by oslo.log) is made mutable. we should be able to turn debug logging on and off by changing the config. tc goal: https://governance.openstack.org/tc/goals/rocky/enable-mutable-configuration.html Change-Id: I8ea7085b9343b07f5fe419d30a68c00caec1b745 --- mistral/cmd/launch.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mistral/cmd/launch.py b/mistral/cmd/launch.py index 994982dfb..b6b159722 100644 --- a/mistral/cmd/launch.py +++ b/mistral/cmd/launch.py @@ -64,7 +64,8 @@ def launch_thread(server, workers=1): global SERVER_THREAD_MANAGER if not SERVER_THREAD_MANAGER: - SERVER_THREAD_MANAGER = service.ServiceLauncher(CONF) + SERVER_THREAD_MANAGER = service.ServiceLauncher( + CONF, restart_method='mutate') SERVER_THREAD_MANAGER.launch_service(server, workers=workers) except Exception as e: @@ -77,7 +78,8 @@ def launch_process(server, workers=1): global SERVER_PROCESS_MANAGER if not SERVER_PROCESS_MANAGER: - SERVER_PROCESS_MANAGER = service.ProcessLauncher(CONF) + SERVER_PROCESS_MANAGER = service.ProcessLauncher( + CONF, restart_method='mutate') SERVER_PROCESS_MANAGER.launch_service(server, workers=workers) except Exception as e: