nova/nova/virt
Lee Yarwood 74b053f47a libvirt: Handle VIR_ERR_DEVICE_MISSING when detaching devices
Introduced in libvirt v4.1.0 [1] this error code replaces the previously
raised VIR_ERR_INVALID_ARG, VIR_ERR_OPERATION_FAILED and
VIR_ERR_INVALID_ARG codes [2][3].

VIR_ERR_OPERATION_FAILED was introduced and tested as an
active/live/hot unplug config device detach error code in
I131aaf28d2f5d5d964d4045e3d7d62207079cfb0.

VIR_ERR_INTERNAL_ERROR was introduced and tested as an
active/live/hot unplug config device detach error code in
I3055cd7641de92ab188de73733ca9288a9ca730a.

VIR_ERR_INVALID_ARG was introduced and tested as an
inactive/persistent/cold unplug config device detach error code in
I09230fc47b0950aa5a3db839a070613c9c817576.

This change introduces support for the new VIR_ERR_DEVICE_MISSING error
code while also retaining coverage for these codes until
MIN_LIBVIRT_VERSION is bumped past v4.1.0.

The majority of this change is test code motion with the existing tests
being modified to run against either the active or inactive versions of
the above  error codes for the time being.

test_detach_device_with_retry_operation_internal and
test_detach_device_with_retry_invalid_argument_no_live have been removed
as they duplicate the logic within the now refactored
_test_detach_device_with_retry_second_detach_failure.

[1] https://libvirt.org/git/?p=libvirt.git;a=commit;h=bb189c8e8c93f115c13fa3bfffdf64498f3f0ce1
[2] https://libvirt.org/git/?p=libvirt.git;a=commit;h=126db34a81bc9f9f9710408f88cceaa1e34bbbd7
[3] https://libvirt.org/git/?p=libvirt.git;a=commit;h=2f54eab7c7c618811de23c60a51e910274cf30de

Closes-Bug: #1887946
Change-Id: I7eb86edc130d186a66c04b229d46347ec5c0b625
(cherry picked from commit 902f09af25)
(cherry picked from commit 93058ae1b8)
(cherry picked from commit 863d6ef760)
(cherry picked from commit 76428c1a6a)
2020-09-14 10:20:11 +01:00
..
disk lxc: make use of filter python3 compatible 2019-09-17 18:48:21 +00:00
hyperv Share snapshot image membership with instance owner 2019-04-30 21:13:46 +09:00
image libvirt: virtuozzo instance resize support 2016-06-28 22:13:49 +03:00
ironic Lowercase ironic driver hash ring and ignore case in cache 2020-04-24 22:50:32 +00:00
libvirt libvirt: Handle VIR_ERR_DEVICE_MISSING when detaching devices 2020-09-14 10:20:11 +01:00
powervm Share snapshot image membership with instance owner 2019-04-30 21:13:46 +09:00
vmwareapi Share snapshot image membership with instance owner 2019-04-30 21:13:46 +09:00
xenapi xenapi/agent: Change openssl error handling 2019-04-30 08:40:53 -04:00
zvm Share snapshot image membership with instance owner 2019-04-30 21:13:46 +09:00
__init__.py Declare nova.virt namespace 2016-04-28 15:01:44 +00:00
arch.py Added ability to configure default architecture for ImagePropertiesFilter 2018-05-14 16:55:13 -04:00
block_device.py Override the 'get' method in DriverBlockDevice class 2019-03-26 12:13:56 +09:00
configdrive.py Convert configdrive to use processutils. 2018-05-02 21:42:05 +10:00
driver.py Unplug VIFs as part of cleanup of networks 2020-03-27 11:45:24 +00:00
event.py Port binding based on events during live migration 2018-07-19 09:09:55 -04:00
fake.py Remove global state from the FakeDriver 2020-03-12 18:46:18 +01:00
firewall.py Merge "Remove translation of log messages" 2017-06-20 21:16:49 +00:00
hardware.py Fix overcommit for NUMA-based instances 2019-01-25 12:57:49 +00:00
imagecache.py Rename ImageCacheManager._list_base_images to _scan_base_images 2016-05-26 14:45:42 +01:00
images.py Implement certificate_utils 2018-06-12 14:44:32 -04:00
interfaces.template
netutils.py libvirt: add vf_trusted field for network metadata 2018-05-30 15:11:59 -04:00
osinfo.py Stop sending bad values from libosinfo to libvirt 2019-10-11 09:32:54 +01:00
storage_users.py Remove translation of log messages 2017-06-13 11:20:28 +07:00
virtapi.py Remove unused provider firewall rules functionality in nova 2016-02-01 15:50:04 +01:00