Comment 3 for bug 1712480

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

Reviewed: https://review.openstack.org/546920
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=018522f4d0566bf9f22fe0264eaedffa12f245e9
Submitter: Zuul
Branch: master

commit 018522f4d0566bf9f22fe0264eaedffa12f245e9
Author: Neha Alhat <email address hidden>
Date: Mon Sep 18 17:57:44 2017 +0530

    Fix soft deleting vm fails after "nova resize" vm

    Problem description:
    When trying to soft-delete an instance that is just resized but the resize
    action is not yet confirmed, the soft-delete call will first attempt to
    confirm_resize the instance, then an error will occur since confirm_resize
    method does not expect a SOFT_DELETING task_state currently.
    https://github.com/openstack/nova/blob/8e052c7/nova/compute/manager.py#L3911

    Fix steps:
    1 Add SOFT_DELETING to the expected_task_state of confirm_resize method.
    2 Since confirm_resize method sets instance.task_state to None, set
      instance.task_state to back to SOFT_DELETING after confirm_resize is
      executed, so the rest workflow should finish as normal situations.

    Co-Authored-By: Chen <email address hidden>

    Change-Id: Ia4592adc93960625148ffa6e9f7d1cfa0c6046aa
    Closes-Bug: #1712480