Comment 4 for bug 1881455

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to nova (master)

Reviewed: https://review.opendev.org/733667
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=03b00ae02fede4ee7f347001f50baab1d79ffa0a
Submitter: Zuul
Branch: master

commit 03b00ae02fede4ee7f347001f50baab1d79ffa0a
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
    end up calling 'from_exc_and_traceback' class method of the
    'ExecutionPayload' versioned notification object via the following call
    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.ExceptionPayload.from_exc_and_traceback

    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