[openstack-dev] Should RPC consume_in_thread() be more fault tolerant?

Chris Behrens cbehrens at codestud.com
Thu Jun 6 20:22:34 UTC 2013


On Jun 6, 2013, at 12:44 PM, Ray Pekowski <pekowski at gmail.com> wrote:

> On Thu, Jun 6, 2013 at 12:03 PM, Ray Pekowski <pekowski at gmail.com> wrote:
> I looked into consume_in_thread() and realize that the base thread it creates does not in fact do the equivalent of a catch all (except Exception).
> 
> To be a little more fair on this, both impl_kombu.py and impl_qpid.py use the _ensure() method inside of their iterconsume() method and that seems to be the place for catch all type work.  impl_kombu.py has everything but the call to reconnect() covered in the catch all.  reconnect() is used to recover from some exceptions, but reconnect() itself could raise and exception, so there is a hole to be filled.   It might just be best to fill that hole closest to the base of the thread simply to catch any coding errors or some future change by someone not aware that everything needs to be caught.  impl_qpid.py simply doesn't catch everything in the _ensure() method.

?  There's a try/except in reconnect() in impl_kombu around the piece that can raise… unless we want to think something like LOG.* calls could fail.

- Chris

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130606/d1afafa3/attachment.html>


More information about the OpenStack-dev mailing list