diff --git a/barbican/cmd/keystone_listener.py b/barbican/cmd/keystone_listener.py index 1570ee112..e739d34b3 100644 --- a/barbican/cmd/keystone_listener.py +++ b/barbican/cmd/keystone_listener.py @@ -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...") diff --git a/barbican/cmd/retry_scheduler.py b/barbican/cmd/retry_scheduler.py index 8ec685458..fecf29eba 100644 --- a/barbican/cmd/retry_scheduler.py +++ b/barbican/cmd/retry_scheduler.py @@ -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) diff --git a/barbican/cmd/worker.py b/barbican/cmd/worker.py index 77ec256b8..9f4ed0564 100644 --- a/barbican/cmd/worker.py +++ b/barbican/cmd/worker.py @@ -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) diff --git a/barbican/tests/cmd/test_cmd.py b/barbican/tests/cmd/test_cmd.py index e71dda6fa..6ae1729be 100644 --- a/barbican/tests/cmd/test_cmd.py +++ b/barbican/tests/cmd/test_cmd.py @@ -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])