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/523559 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=1819718e798 fb904644391badc 3beb40c181ac39
Committed: https:/
Submitter: Zuul
Branch: master
commit 1819718e798fb90 4644391badc3beb 40c181ac39
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
Closes-bug: #1735009