commit 1ed3f8f9e487c233fdf714edad57d126fe6b1cd7
Author: Mark Goddard <email address hidden>
Date: Fri May 17 14:58:59 2019 +0100
[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
(cherry picked from commit 060e42b7fd185bf3b827b7aa5c9ab6131f6a21d7)
(cherry picked from commit 95ace7cf8daf4ff935ff6df877554fdfddef9e4a)
Reviewed: https:/ /review. opendev. org/662584 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=1ed3f8f9e48 7c233fdf714edad 57d126fe6b1cd7
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit 1ed3f8f9e487c23 3fdf714edad57d1 26fe6b1cd7
Author: Mark Goddard <email address hidden>
Date: Fri May 17 14:58:59 2019 +0100
[ironic] Don't remove instance info twice in destroy
During teardown, at the end of the ironic virt driver's destroy method, /review. opendev. org/#/c/ 563722/ removes instance_info from the
we call _cleanup_deploy, which since
https:/
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-59bf11cffe a6 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: Iea337f73c231db 2cb9d9f639b9247 5daaede6793 3b827b7aa5c9ab6 131f6a21d7) 935ff6df877554f dfddef9e4a)
Closes-Bug: #1815799
(cherry picked from commit 060e42b7fd185bf
(cherry picked from commit 95ace7cf8daf4ff