Enable mutable config in Barbican

Task: 6360
Story: 2001545

Change-Id: Ib6b54effa52c4c6b4b30abf5eb7b54c453b1d008
This commit is contained in:
Jeremy Liu 2018-03-23 15:06:05 +08:00
parent a9acdc3398
commit a0dc790ed9
4 changed files with 7 additions and 4 deletions

View File

@ -73,7 +73,8 @@ def main():
if getattr(getattr(CONF, queue.KS_NOTIFICATIONS_GRP_NAME), 'enable'):
service.launch(
CONF,
keystone_listener.MessageServer(CONF)
keystone_listener.MessageServer(CONF),
restart_method='mutate'
).wait()
else:
LOG.info("Exiting as Barbican Keystone listener is not enabled...")

View File

@ -66,7 +66,8 @@ def main():
service.launch(
CONF,
retry_scheduler.PeriodicServer()
retry_scheduler.PeriodicServer(),
restart_method='mutate'
).wait()
except RuntimeError as e:
fail(1, e)

View File

@ -67,7 +67,8 @@ def main():
service.launch(
CONF,
server.TaskServer(),
workers=CONF.queue.asynchronous_workers
workers=CONF.queue.asynchronous_workers,
restart_method='mutate'
).wait()
except RuntimeError as e:
fail(1, e)

View File

@ -81,5 +81,5 @@ class WhenInvokingWorkerCommand(test_keystone_listener.UtilMixin,
self.assertEqual(1, mock_queue_init.call_count)
self.assertEqual(1, mock_service_launch.call_count)
# check keyword argument for number of worker matches
workers_kwarg = {'workers': 3}
workers_kwarg = {'restart_method': 'mutate', 'workers': 3}
self.assertEqual(workers_kwarg, mock_service_launch.call_args[1])