The 'nova.compute.manager._reschedule_resize_or_reraise' function can
end up calling 'from_exc_and_traceback' class method of the
'ExecutionPayload' versioned notification object via the following call
stack:
The 'from_exc_and_traceback' class method uses 'inspect.trace()' to get
more information about the provided execution in order to report
information such as module and function name of the function raising the
exception in the notification. 'inspect.trace()' must be called inside
the context of an exception handler otherwise it returns an empty list.
However, we are using '_reschedule_resize_or_reraise' to re-raise a
previously raised and captured exception, which means we're not
executing from such a context. This results in the following warning:
IndexError: list index out of range
A future change will resolve this but for now, prove the issue.
Change-Id: I5baaa698c2627a3438eb1d9990eb8091f37253ca
Signed-off-by: Stephen Finucane <email address hidden>
Related-Bug: #1881455
Reviewed: https:/ /review. opendev. org/733667 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=03b00ae02fe de4ee7f347001f5 0baab1d79ffa0a
Committed: https:/
Submitter: Zuul
Branch: master
commit 03b00ae02fede4e e7f347001f50baa b1d79ffa0a
Author: Stephen Finucane <email address hidden>
Date: Thu Jun 4 12:10:09 2020 +0100
Add reproducer for bug #1881455
The 'nova.compute. manager. _reschedule_ resize_ or_reraise' function can and_traceback' class method of the ayload' versioned notification object via the following call
end up calling 'from_exc_
'ExecutionP
stack:
nova. compute. manager. _reschedule_ resize_ or_reraise
nova.compute. utils.notify_ about_instance_ action
nova. compute. _get_fault_ and_priority_ from_exc_ and_tb
nova. notification. objects. exception. ExceptionPayloa d.from_ exc_and_ traceback
The 'from_exc_ and_traceback' class method uses 'inspect.trace()' to get resize_ or_reraise' to re-raise a
more information about the provided execution in order to report
information such as module and function name of the function raising the
exception in the notification. 'inspect.trace()' must be called inside
the context of an exception handler otherwise it returns an empty list.
However, we are using '_reschedule_
previously raised and captured exception, which means we're not
executing from such a context. This results in the following warning:
IndexError: list index out of range
A future change will resolve this but for now, prove the issue.
Change-Id: I5baaa698c2627a 3438eb1d9990eb8 091f37253ca
Signed-off-by: Stephen Finucane <email address hidden>
Related-Bug: #1881455