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.
Reviewed: https:/ /review. openstack. org/546920 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=018522f4d05 66bf9f22fe0264e aedffa12f245e9
Committed: https:/
Submitter: Zuul
Branch: master
commit 018522f4d0566bf 9f22fe0264eaedf fa12f245e9
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
Closes-Bug: #1712480