When unprovision works via Ironic, all operations in _cleanup_deploy
have already been completed. Previous to this patch, we continue
attempting all the clean up steps, which eventually errors out with
BadRequest, or similar, and we complete the delete.
Howerver, if cleaning has started, we hit a conflict exception,
so we don't hit the expected error above.
Prior to moving to the SDK, that landed in Caracal,
we would retry on conflict errors. You can tweak the
config to keep retrying for the length of time cleaning
usually takes in your enviroment.
After this patch:
Ieda5636a5e80ea4af25db2e90be241869759e30c
We now hard fail with this error:
openstack.exceptions.ConflictException:
Failed to detach VIF xxx from bare metal node yyy
...
Node yyy is locked by host zzz,
please retry after the current operation is completed.
This change simply skips calling the operations that
will always error out, avoiding the need to wait for
cleainging to complete before getting the expected
error message.
Closes-Bug: #2019977
Related-Bug: #1815799
Change-Id: I60971b58cf1f24bdb5d40f668e380ebfee2ac495