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/744914 /git.openstack. org/cgit/ openstack/ masakari/ commit/ ?id=f0434014568 bab29d5642dee48 17267b6b2ff4e7
Committed: https:/
Submitter: Zuul
Branch: stable/ussuri
commit f0434014568bab2 9d5642dee481726 7b6b2ff4e7
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