ironic: Cleanup instance information when spawn fails
Instance information such as an instance_uuid set to an ironic node by
_add_driver_fields() is not cleared when spawning is aborted by an
exception raised before ironic starts deployment. Then, ironic node
stays AVAILABLE state with instance_uuid set. This information is not
cleared even if the instance is deleted. The ironic node cannot be
removed nor deployed again becuase instance_uuid remains.
This patch adds a method to remove the information. This method is
called if ironic doesn't need unprovisioning when an instance is
destroyed.
Reviewed: https:/ /review. openstack. org/341253 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=0e24e9e2ec2 54364ffe029226b 9ae5956002df54
Committed: https:/
Submitter: Jenkins
Branch: master
commit 0e24e9e2ec25436 4ffe029226b9ae5 956002df54
Author: Hironori Shiina <email address hidden>
Date: Sun Jul 10 15:32:58 2016 +0900
ironic: Cleanup instance information when spawn fails
Instance information such as an instance_uuid set to an ironic node by driver_ fields( ) is not cleared when spawning is aborted by an
_add_
exception raised before ironic starts deployment. Then, ironic node
stays AVAILABLE state with instance_uuid set. This information is not
cleared even if the instance is deleted. The ironic node cannot be
removed nor deployed again becuase instance_uuid remains.
This patch adds a method to remove the information. This method is
called if ironic doesn't need unprovisioning when an instance is
destroyed.
Change-Id: Idf5191aa1c9905 52ca2340856d5d5 b6ac03f7539
Closes-Bug: 1596922