nova/nova/tests/unit/virt
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
..
disk Remove utils.execute() from virt.disk.api. 2018-12-12 09:38:20 +11:00
hyperv Share snapshot image membership with instance owner 2019-02-08 18:06:27 -05:00
image Use assert(Not)Equal instead of assertTrue(A == X) 2016-06-03 16:53:15 +01:00
ironic [ironic] Don't remove instance info twice in destroy 2019-05-17 15:22:29 +01:00
libvirt Merge "Make libvirt expose supported image types" 2019-05-10 13:46:51 +00:00
powervm trivial: Remove unused constants, functions 2019-04-03 13:37:29 +00:00
vmwareapi Merge "Allow driver to specify switch&port for faster lookup" 2019-04-29 04:21:12 +00:00
xenapi xenapi/agent: Change openssl error handling 2019-04-05 12:48:59 -04:00
zvm Share snapshot image membership with instance owner 2019-02-08 18:06:27 -05:00
__init__.py
fakelibosinfo.py Fix misuse of assertTrue in console and virt tests 2016-02-22 16:09:21 +09:00
test_block_device.py Override the 'get' method in DriverBlockDevice class 2019-03-21 13:49:55 +00:00
test_configdrive.py
test_driver.py Remove usage of parameter enforce_type 2017-04-17 20:23:19 +08:00
test_events.py
test_fake.py
test_firewall.py remove get_nw_info_for_instance from compute.utils 2017-06-13 13:30:06 +02:00
test_hardware.py Improve existing flavor and image metadata validation 2019-03-04 14:29:37 -06:00
test_imagecache.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_images.py qemu: Make disk image conversion dramatically faster 2019-03-18 14:53:39 -05:00
test_netutils.py Remove unnecessary code 2017-07-28 06:01:21 +00:00
test_osinfo.py Do not attempt to load osinfo if we do not have os_distro 2017-03-23 22:07:03 -04:00
test_virt.py Rename block_device_info_get_root 2018-01-11 20:46:13 +00:00
test_virt_drivers.py Switch to using os-resource-classes 2019-02-07 11:11:09 +00:00