nova/nova/tests/unit/virt
Lee Yarwood 55e2c851f1 libvirt: Check if domain is persistent before detaching devices
Previously the libvirt driver would always assume that it was only
detaching devices (volumes or virtual interfaces) from a persistent
domain however that is not always the case.

For example when rolling back from a live migration an attempt is made
to detach volumes from the transient destination domain that is being
cleaned up. This attempt would fail with the previous assumption of the
domain being persistent in place.

This change introduces a simple call to has_persistent_configuration
within detach_device_with_retry to confirm the state of the domain
before attempting to detach.

Closes-Bug: #1669857
Closes-Bug: #1696125
Change-Id: I95948721a0119f5f54dbe50d4455fd47d422164b
(cherry picked from commit 563c0927d1)
2017-08-08 11:42:30 -04:00
..
disk Merge "Guestfs handle no passwd or group in image" 2016-12-12 06:27:16 +00:00
hyperv [Trivial] Hyper-V: accept Glance vhdx images 2017-06-08 14:30:53 +00:00
image Use assert(Not)Equal instead of assertTrue(A == X) 2016-06-03 16:53:15 +01:00
ironic Merge "ironic: Add trigger crash dump support to ironic driver" 2017-01-31 19:10:18 +00:00
libvirt libvirt: Check if domain is persistent before detaching devices 2017-08-08 11:42:30 -04:00
vmwareapi Port virt vmwareapi tests to Python 3 2016-12-13 15:32:04 +08:00
xenapi Use physical utilisation for cached images 2017-06-30 02:50:00 +00: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 block_device: Make refresh_conn_infos py3 compatible 2016-10-11 13:53:00 +01:00
test_configdrive.py force_config_drive: StrOpt -> BoolOpt 2015-11-11 19:59:22 +00:00
test_diagnostics.py
test_driver.py Move driver_dict_from_config to libvirt driver 2016-11-09 11:48:20 -05:00
test_events.py
test_fake.py fake: fix public API signatures to match virt driver 2015-02-19 11:44:00 +00:00
test_firewall.py Use more specific asserts in tests 2016-10-12 11:12:08 +01:00
test_hardware.py Mark sibling CPUs as 'used' for cpu_thread_policy = 'isolated' 2016-12-13 11:23:07 +04:00
test_imagecache.py Remove mox from tests/unit/virt/test_imagecache.py 2016-06-16 23:40:01 +00:00
test_images.py Bump prlimit cpu time for qemu from 2 to 8 2016-12-08 10:41:31 -05:00
test_netutils.py libvirt: expose virtual interfaces with vlans to metadata 2017-01-26 17:06:56 -05:00
test_osinfo.py Do not attempt to load osinfo if we do not have os_distro 2017-03-30 05:11:40 +00:00
test_virt.py Remove mox from nova/tests/unit/virt/test_virt.py 2016-11-28 08:49:51 +00:00
test_virt_drivers.py libvirt: Check if domain is persistent before detaching devices 2017-08-08 11:42:30 -04:00
test_volumeutils.py Switch to using os-brick 2015-07-27 10:47:22 -07:00