From 094138de8b5c61b93e103c06ece3a77327851026 Mon Sep 17 00:00:00 2001 From: Anusree Date: Wed, 25 Jul 2018 16:27:38 +0530 Subject: [PATCH] Enable mutable config in sahara 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 sahara 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: I11d31a80afb326fa3416726c6f68b4930346264a --- .../enable-mutable-configuration-2dd6b7a0e0fe4437.yaml | 6 ++++++ sahara/main.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/enable-mutable-configuration-2dd6b7a0e0fe4437.yaml diff --git a/releasenotes/notes/enable-mutable-configuration-2dd6b7a0e0fe4437.yaml b/releasenotes/notes/enable-mutable-configuration-2dd6b7a0e0fe4437.yaml new file mode 100644 index 0000000000..99c56b87a6 --- /dev/null +++ b/releasenotes/notes/enable-mutable-configuration-2dd6b7a0e0fe4437.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + Operators can now update the running configuration of Sahara processes by + sending the parent process a "HUP" signal. + Note: The configuration option must support mutation. diff --git a/sahara/main.py b/sahara/main.py index 6f11f60832..9f23e62816 100644 --- a/sahara/main.py +++ b/sahara/main.py @@ -155,7 +155,7 @@ def _get_ops_driver(driver_name): def get_process_launcher(): - return oslo_service.ProcessLauncher(CONF) + return oslo_service.ProcessLauncher(CONF, restart_method='mutate') def launch_api_service(launcher, service):