Bug 1280081

Summary: No error logging for uncaught exceptions in setup/cleanup of long-running tasks
Product: Red Hat OpenStack Reporter: Steve Baker <sbaker>
Component: openstack-heatAssignee: Zane Bitter <zbitter>
Status: CLOSED ERRATA QA Contact: Amit Ugol <augol>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0 (Kilo)CC: kbasil, mburns, mcornea, rhel-osp-director-maint, sbaker, sclewis, shardy, yeylon
Target Milestone: z3Keywords: ZStream
Target Release: 7.0 (Kilo)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-heat-2015.1.2-2.el7ost Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-21 17:03:32 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:

Description Steve Baker 2015-11-10 22:09:30 UTC
Most exceptions - even unexpected exceptions - in Heat are caught and handled. For example, any exception that occurs while processing a resource operation will cause the resource to be placed in a FAILED state and will generate a ResourceFailure exception that is caught and handled appropriately.

Most uncaught, unhandled exceptions (e.g. exceptions that occur before starting a stack operation) will bubble up to the user - the RPC handler will throw the exception, which will then be reported as the result of the RPC call by oslo.messaging.

There is one exception: code at the start and end of a long-running stack operation that is executed in a separate greenthread (so that exceptions don't bubble up to a RPC response). While any exception that occurs here is a bug, it would be very helpful if we had better error reporting of such bugs when they do occur. Currently the backtrace is printed to stderr, which in many installations means /dev/null (on systems with systemd, it appears in the journald logs, so at least it's not completely lost). We should catch and log these exceptions with a big red ERROR.

Comment 2 Steve Baker 2015-11-10 22:13:21 UTC
I'd like this to be considered for being a blocker for 7.2 since exceptions being logged to the journal instead of heat-engine.log has been hindering our rhos-director 7.0->7.x update efforts.

Comment 5 errata-xmlrpc 2015-12-21 17:03:32 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.

https://access.redhat.com/errata/RHBA-2015:2680