[openstack-dev] Should RPC consume_in_thread() be more fault tolerant?
Eric Windisch
eric at cloudscaling.com
Thu Jun 6 19:54:12 UTC 2013
On June 6, 2013 at 15:49:07 , 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.
Thanks Ray.
I've caught a few ways I could easily crash consumers with ZeroMQ… I'll be following up with patches.
--
Eric Windisch
More information about the OpenStack-dev
mailing list