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)
Reviewed: https:/ /review. opendev. org/744916 /git.openstack. org/cgit/ openstack/ masakari/ commit/ ?id=fc3cdd7520a ea14d5d380a485d 3fd72f283c13e7
Committed: https:/
Submitter: Zuul
Branch: stable/stein
commit fc3cdd7520aea14 d5d380a485d3fd7 2f283c13e7
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: I01af664d53db20 041ac7306d2bca6 3254ffc9ede c8e478483565469 7e13db9ca2)
Partial-Bug: #1889765
(cherry picked from commit 69a9a41802edf21