Enable mutable config in Heat

New releases of oslo.config support a 'mutable' parameter to Opts.
This is only respected when the new method mutate_config_files is
called instead of reload_config_files. Heat delegates making this call
to oslo.service, so how do we switch?
Icec3e664f3fe72614e373b2938e8dee53cf8bc5e allows services to tell
oslo.service they want mutate_config_files to be called by passing a
parameter, which this patch does.

This allows Heat 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 and sending SIGHUP.

Part of bp:mutable-config

Change-Id: I885f5e088440d3d8b6fb3506506598d7667e7083
This commit is contained in:
ricolin 2017-05-11 23:47:21 +08:00 committed by Rico Lin
parent e8e0a2483a
commit 3bb0b8b4e4
1 changed files with 2 additions and 1 deletions

View File

@ -72,7 +72,8 @@ def launch_engine(setup_logging=True):
if not workers:
workers = max(4, processutils.get_worker_count())
launcher = service.launch(cfg.CONF, srv, workers=workers)
launcher = service.launch(cfg.CONF, srv, workers=workers,
restart_method='mutate')
if cfg.CONF.enable_cloud_watch_lite:
# We create the periodic tasks here, which mean they are created
# only in the parent process when num_engine_workers>1 is specified