nova/nova/virt/ironic
Mark Goddard 060e42b7fd [ironic] Don't remove instance info twice in destroy
During teardown, at the end of the ironic virt driver's destroy method,
we call _cleanup_deploy, which since
https://review.opendev.org/#/c/563722/ removes instance_info from the
ironic node. Given that we're destroying the node, the instance_info
will have been cleared from the node anyway, so we don't need to do
this.

Further, it can cause tear down to fail if automated cleaning is
enabled in ironic. This happens because ironic prevents updates to nodes
that are undergoing a state transition, as is the case during cleaning.
The virt driver will retry this request by default every 2 seconds with
60 attempts. Typically this is not long enough for cleaning to complete,
so tear down fails with the following error:

  Conflict: Node a00696d5-32ba-475e-9528-59bf11cffea6 can not be updated
  while a state transition is in progress. (HTTP 409)

This change skips the instance info update in _cleanup_deploy in the
case of tear down.

Change-Id: Iea337f73c231db2cb9d9f639b92475daaede6793
Closes-Bug: #1815799
2019-05-17 15:22:29 +01:00
..
__init__.py Import Ironic Driver & supporting files - part 1 2014-09-05 19:00:12 -04:00
client_wrapper.py Remove [ironic]api_endpoint option 2019-04-26 12:02:02 -05:00
driver.py [ironic] Don't remove instance info twice in destroy 2019-05-17 15:22:29 +01:00
ironic_states.py virt/ironic: Implement rescue and unrescue 2018-07-13 01:56:13 +00:00
patcher.py Pushing image traits to ironic node 2018-05-18 18:05:25 -07:00