Comment 10 for bug 1889765

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

Reviewed: https://review.opendev.org/744915
Committed: https://git.openstack.org/cgit/openstack/masakari/commit/?id=087f2658915fdbe46b5124d681ae18000fb90015
Submitter: Zuul
Branch: stable/train

commit 087f2658915fdbe46b5124d681ae18000fb90015
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)