Fix rebuild of baremetal instance when vm_state is ERROR
Nova allows rebuild of instance when vm_state is ERROR. [1]
The vm_state is restored to ACTIVE only after a successful build.
This means rebuilding a baremetal instance using the Ironic driver
is impossible because wait_for_active fails if vm_state=ERROR is found.
This is a regression introduced in a previous change which added
the ability to delete an instance in spawning state. [2]
This present change will skip the abort installation logic
if task_state is REBUILD_SPAWNING while preserving the previous logic.
Reviewed: https:/ /review. opendev. org/680873 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=81056d1293e f47ae47cd5f89a7 b7937dedf43c3c
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit 81056d1293ef47a e47cd5f89a7b793 7dedf43c3c
Author: Mathieu Gagné <email address hidden>
Date: Mon Nov 27 17:33:50 2017 -0500
Fix rebuild of baremetal instance when vm_state is ERROR
Nova allows rebuild of instance when vm_state is ERROR. [1]
The vm_state is restored to ACTIVE only after a successful build.
This means rebuilding a baremetal instance using the Ironic driver
is impossible because wait_for_active fails if vm_state=ERROR is found.
This is a regression introduced in a previous change which added
the ability to delete an instance in spawning state. [2]
This present change will skip the abort installation logic
if task_state is REBUILD_SPAWNING while preserving the previous logic.
[1] https:/ /bugs.launchpad .net/nova/ +bug/1183946 /bugs.launchpad .net/nova/ +bug/1455000
[2] https:/
Change-Id: I857ad7264f1a7e f1263d8a9d4eca4 91d6c8dce0f 4644391badc3beb 40c181ac39) 04cc995d5d17ed1 64ae8562c5) 319e28d6a1eac04 71a0a9cee8)
Closes-bug: #1735009
(cherry picked from commit 1819718e798fb90
(cherry picked from commit c21cbf296495b06
(cherry picked from commit e8f418909eb0f6c