Browse Source

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
tags/7.0.0.0b3
Anusree 11 months ago
parent
commit
d2f03bc7b0
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      mistral/cmd/launch.py

+ 4
- 2
mistral/cmd/launch.py View File

@@ -64,7 +64,8 @@ def launch_thread(server, workers=1):
64 64
         global SERVER_THREAD_MANAGER
65 65
 
66 66
         if not SERVER_THREAD_MANAGER:
67
-            SERVER_THREAD_MANAGER = service.ServiceLauncher(CONF)
67
+            SERVER_THREAD_MANAGER = service.ServiceLauncher(
68
+                CONF, restart_method='mutate')
68 69
 
69 70
         SERVER_THREAD_MANAGER.launch_service(server, workers=workers)
70 71
     except Exception as e:
@@ -77,7 +78,8 @@ def launch_process(server, workers=1):
77 78
         global SERVER_PROCESS_MANAGER
78 79
 
79 80
         if not SERVER_PROCESS_MANAGER:
80
-            SERVER_PROCESS_MANAGER = service.ProcessLauncher(CONF)
81
+            SERVER_PROCESS_MANAGER = service.ProcessLauncher(
82
+                CONF, restart_method='mutate')
81 83
 
82 84
         SERVER_PROCESS_MANAGER.launch_service(server, workers=workers)
83 85
     except Exception as e:

Loading…
Cancel
Save