Comment 9 for bug 1889765

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to masakari (stable/stein)

Reviewed: https://review.opendev.org/744916
Committed: https://git.openstack.org/cgit/openstack/masakari/commit/?id=fc3cdd7520aea14d5d380a485d3fd72f283c13e7
Submitter: Zuul
Branch: stable/stein

commit fc3cdd7520aea14d5d380a485d3fd72f283c13e7
Author: Mark Goddard <email address hidden>
Date: Fri Jul 31 12:26:16 2020 +0100

    Fix exception notification with no trace

    The Exception notification code calls inspect.trace(), which returns an
    empty list if called outside of an except clause. The returned list is
    then indexed, causing an IndexError. In fact, every use of this
    exception in the engine is from outside of an except clause.

    This can affect notification processing, causing notifications to get
    stuck in a running state, requiring manual DB deletion.

    This change addresses the issue by checking whether the list returned by
    inspect.trace() is empty.

    A more complete solution would involve checking every call path to the
    exception notification, and ensuring that it is made from an except
    clause.

    Change-Id: I01af664d53db20041ac7306d2bca63254ffc9ede
    Partial-Bug: #1889765
    (cherry picked from commit 69a9a41802edf21c8e4784835654697e13db9ca2)