Comment 21 for bug 1811235

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

Reviewed: https://review.opendev.org/633212
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=46cb2fdfe2df333d870aca8e6afc521172b8e061
Submitter: Zuul
Branch: master

commit 46cb2fdfe2df333d870aca8e6afc521172b8e061
Author: Matt Riedemann <email address hidden>
Date: Fri Jan 25 08:58:36 2019 -0500

    Change InstanceFaultRollback handling in _error_out_instance_on_exception

    For some reason, only NotImplementedError in _error_out_instance_on_exception
    would use the $instance_state parameter which can be controlled by the
    caller of the context manager to determine the rollback vm_state. But in the
    case of InstanceFaultRollback, the caller may want to reset the vm_state
    back to something other than ACTIVE, like if the instance is actually
    STOPPED and something like prep_resize fails (you can resize a STOPPED
    instance).

    This change makes _error_out_instance_on_exception handle InstanceFaultRollback
    like NotImplementedError in that the instance_state parameter is used to reset
    the instance.vm_state. It also adds a docstring explaining how this context
    manager works along with some notes/questions about ways to improve it.

    Change-Id: Ie4f9177f4d54cbc7dbcf58bd107fd5f24c60d8bb
    Related-Bug: #1811235