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
(cherry picked from commit 018522f4d0566bf9f22fe0264eaedffa12f245e9)
Reviewed: https:/ /review. openstack. org/603340 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=78712049881 3c9928cb40ce4ad 27f73d506e3721
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit 787120498813c99 28cb40ce4ad27f7 3d506e3721
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: /github. com/openstack/ nova/blob/ 8e052c7/ nova/compute/ manager. py#L3911
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:/
Fix steps: task_state to back to SOFT_DELETING after confirm_resize is
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.
executed, so the rest workflow should finish as normal situations.
Co-Authored-By: Chen <email address hidden>
Change-Id: Ia4592adc939606 25148ffa6e9f7d1 cfa0c6046aa 9f22fe0264eaedf fa12f245e9)
Closes-Bug: #1712480
(cherry picked from commit 018522f4d0566bf