[openstack-dev] [oslo][barbican][sahara] start RPC service before launcher wait?
aspiers at suse.com
Mon Jul 31 14:01:50 UTC 2017
I recently discovered a bug where barbican-worker would hang on
shutdown if queue.asynchronous_workers was changed from 1 to 2:
resulting in a warning like this:
WARNING oslo_messaging.server [-] Possible hang: stop is waiting for start to complete
I found a similar bug in Sahara:
where the fix was to call start() on the RPC service before making the
launcher wait() on it, so I ported the fix to Barbican, and it seems
to work fine:
I noticed that both projects use ProcessLauncher; barbican uses
oslo_service.service.launch() which has:
if workers is None or workers == 1:
launcher = ServiceLauncher(conf, restart_method=restart_method)
launcher = ProcessLauncher(conf, restart_method=restart_method)
However, I'm not an expert in oslo.service or oslo.messaging, and one
of Barbican's core reviewers (thanks Kaitlin!) noted that not many
other projects start the task before calling wait() on the launcher,
so I thought I'd check here whether that is the correct fix, or
whether there's something else odd going on.
Any oslo gurus able to shed light on this?
More information about the OpenStack-dev