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 protected]> 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 ** Changed in: nova Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1811235 Title: instance's vm-state becomes error when cold-migrate instance to same host failed Status in OpenStack Compute (nova): Fix Released Status in OpenStack Compute (nova) queens series: Confirmed Status in OpenStack Compute (nova) rocky series: Confirmed Status in OpenStack Compute (nova) stein series: In Progress Bug description: step 1: boot a simple instance step 2: stop the running instance which is booted in step 1 step 3: migrate the instance to same host,but the driver in the host doesn't support migrate to same host step 4: nova show uuid(instance uuid), the instance's vm-state becomes error, and the fault show {"message": "Unable to migrate instance ( instance uuid) to current host (hostname) step 5: nova instance-action-list uuid(instance uuid), you will see migrate error. To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1811235/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

