Bug 1050214

Summary: Thread consuming qpid messages can die silently
Product: Red Hat OpenStack Reporter: Russell Bryant <rbryant>
Component: openstack-quantumAssignee: Miguel Angel Ajo <mangelajo>
Status: CLOSED ERRATA QA Contact: Lon Hohberger <lhh>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 3.0CC: chrisw, lpeer, majopela, ndipanov, sclewis, yeylon
Target Milestone: z5Keywords: OtherQA, Rebase, ZStream
Target Release: 3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-quantum-2013.1.5-1.el6ost Doc Type: Bug Fix
Doc Text:
Cause: The thread loop processing RPC could die because of an unexpected exception in the code. Consequence: When an unexpected exception happened, the agent / server processing those handling any more RPC calls. Fix: The RPC look captures and logs unexpected exceptions without crashing. Result: Exceptions will be logged, RPC won't stop working when that occurs.
Story Points: ---
Clone Of: 1050213
: 1054249 (view as bug list) Environment:
Last Closed: 2014-04-03 18:17:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1050213, 1050215, 1050216, 1050217, 1054246    
Bug Blocks:    

Description Russell Bryant 2014-01-08 21:04:12 UTC
+++ This bug was initially created as a clone of Bug #1050213 +++

The code for receiving and processing qpid messages runs in its own greenthread.  Unfortunately, there is a code path that if it raises an exception, the greenthread will die silently, without any entry in the log file.

In particular, the code in question is:

https://git.openstack.org/cgit/openstack/nova/tree/nova/openstack/common/rpc/impl_qpid.py?h=stable/grizzly#n468

if self.session.next_receiver() raises an exception other than qpid's Empty or ConnectionError exceptions, the thread will die and no more messages will be received.

The fix is to backport the portion of the following change that applies to impl_qpid.  That includes the new decorator in excutils and the change to impl_qpid.py.

Comment 1 Russell Bryant 2014-01-08 21:12:17 UTC
The change that needs to be backported is: https://review.openstack.org/#/c/32235/13

I also attached a version of the backport for nova to bug 1050213

Comment 5 Miguel Angel Ajo 2014-02-18 12:59:06 UTC
This was backported to grizzly here:

https://review.openstack.org/#/c/68880/

Comment 6 Alan Pevec 2014-03-28 02:26:30 UTC
> https://review.openstack.org/#/c/68880/

This was included in 2013.1.5

Comment 9 Lon Hohberger 2014-04-01 14:18:18 UTC
I verified that the patch was incorporated in the 2013.1.5 rebase and that the openstack-quantum package passed basic sanity checks by running various administrative commands and booting a virtual machine which utilized it for network services.

Comment 11 errata-xmlrpc 2014-04-03 18:17:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-0363.html