Enable mutable config in trove
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 trove 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 Co-Authored-By: Anusree A <anusree.a04:@gmail.com> Change-Id: I02da8ce44d52b0f0dc67660c8ec76b5effb5f73c
This commit is contained in:
parent
4645f5518d
commit
fd1568f833
@ -34,5 +34,6 @@ def main(conf):
|
||||
rpc_api_version=conductor_api.API.API_LATEST_VERSION,
|
||||
secure_serializer=sz.ConductorHostSerializer)
|
||||
workers = conf.trove_conductor_workers or processutils.get_worker_count()
|
||||
launcher = openstack_service.launch(conf, server, workers=workers)
|
||||
launcher = openstack_service.launch(conf, server, workers=workers,
|
||||
restart_method='mutate')
|
||||
launcher.wait()
|
||||
|
@ -66,5 +66,5 @@ def main():
|
||||
manager=manager, host=CONF.guest_id,
|
||||
rpc_api_version=guest_api.API.API_LATEST_VERSION)
|
||||
|
||||
launcher = openstack_service.launch(CONF, server)
|
||||
launcher = openstack_service.launch(CONF, server, restart_method='mutate')
|
||||
launcher.wait()
|
||||
|
@ -38,7 +38,8 @@ def startup(conf, topic):
|
||||
server = rpc_service.RpcService(
|
||||
key=key, manager=conf.taskmanager_manager, topic=topic,
|
||||
rpc_api_version=task_api.API.API_LATEST_VERSION)
|
||||
launcher = openstack_service.launch(conf, server)
|
||||
launcher = openstack_service.launch(conf, server,
|
||||
restart_method='mutate')
|
||||
launcher.wait()
|
||||
|
||||
|
||||
|
@ -80,7 +80,7 @@ def launch(app_name, port, paste_config_file, data={},
|
||||
app = pastedeploy.paste_deploy_app(paste_config_file, app_name, data)
|
||||
server = base_wsgi.Service(app, port, host=host,
|
||||
backlog=backlog, threads=threads)
|
||||
return service.launch(CONF, server, workers)
|
||||
return service.launch(CONF, server, workers, restart_method='mutate')
|
||||
|
||||
|
||||
# Note: taken from Nova
|
||||
|
@ -48,7 +48,7 @@ class ConductorConfTests(trove_testtools.TestCase):
|
||||
super(ConductorConfTests, self).tearDown()
|
||||
|
||||
def _test_manager(self, conf, rt_mgr_name):
|
||||
def mock_launch(conf, server, workers):
|
||||
def mock_launch(conf, server, workers, restart_method):
|
||||
qualified_mgr = "%s.%s" % (server.manager_impl.__module__,
|
||||
server.manager_impl.__class__.__name__)
|
||||
self.assertEqual(rt_mgr_name, qualified_mgr, "Invalid manager")
|
||||
|
Loading…
Reference in New Issue
Block a user