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.
Reviewed: https:/ /review. opendev. org/741561 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=902f09af251 d2b2e56fb2f2900 a3510baf38a508
Committed: https:/
Submitter: Zuul
Branch: master
commit 902f09af251d2b2 e56fb2f2900a351 0baf38a508
Author: Lee Yarwood <email address hidden>
Date: Fri Jul 17 00:45:10 2020 +0100
libvirt: Handle VIR_ERR_ DEVICE_ MISSING when detaching devices
Introduced in libvirt v4.1.0 [1] this error code replaces the previously INVALID_ ARG, VIR_ERR_ OPERATION_ FAILED and ERR_INVALID_ ARG codes [2][3].
raised VIR_ERR_
VIR_
VIR_ ERR_OPERATION_ FAILED was introduced and tested as an f5d5d964d4045e3 d7d62207079cfb0 .
active/live/hot unplug config device detach error code in
I131aaf28d2
VIR_ ERR_INTERNAL_ ERROR was introduced and tested as an de92ab188de7373 3ca9288a9ca730a .
active/live/hot unplug config device detach error code in
I3055cd7641
VIR_ ERR_INVALID_ ARG was introduced and tested as an persistent/ cold unplug config device detach error code in 0950aa5a3db839a 070613c9c817576 .
inactive/
I09230fc47b
This change introduces support for the new VIR_ERR_ DEVICE_ MISSING error LIBVIRT_ VERSION is bumped past v4.1.0.
code while also retaining coverage for these codes until
MIN_
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 detach_ device_ with_retry_ invalid_ argument_ no_live have been removed detach_ device_ with_retry_ second_ detach_ failure.
test_
as they duplicate the logic within the now refactored
_test_
[1] https:/ /libvirt. org/git/ ?p=libvirt. git;a=commit; h=bb189c8e8c93f 115c13fa3bfffdf 64498f3f0ce1 /libvirt. org/git/ ?p=libvirt. git;a=commit; h=126db34a81bc9 f9f9710408f88cc eaa1e34bbbd7 /libvirt. org/git/ ?p=libvirt. git;a=commit; h=2f54eab7c7c61 8811de23c60a51e 910274cf30de
[2] https:/
[3] https:/
Closes-Bug: #1887946 6a66c04b229d463 47ec5c0b625
Change-Id: I7eb86edc130d18