commit b2bafd09c3cde8cfd782a69aa8aa5dd53809d5bc
Author: Lee Yarwood <email address hidden>
Date: Tue Jun 6 14:08:37 2017 -0400
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 563c0927d14d052e3f1fad80df95fe4a7c48d38b)
(cherry picked from commit 00b7b714b37dbbaac8a3570541ecc6b75ce3a77f)
Reviewed: https:/ /review. openstack. org/472345 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=b2bafd09c3c de8cfd782a69aa8 aa5dd53809d5bc
Committed: https:/
Submitter: Jenkins
Branch: stable/newton
commit b2bafd09c3cde8c fd782a69aa8aa5d d53809d5bc
Author: Lee Yarwood <email address hidden>
Date: Tue Jun 6 14:08:37 2017 -0400
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 device_ with_retry to confirm the state of the domain
within detach_
before attempting to detach.
Closes-Bug: #1669857 5f54dbe50d4455f d47d422164b e3f1fad80df95fe 4a7c48d38b) ac8a3570541ecc6 b75ce3a77f)
Closes-Bug: #1696125
Change-Id: I95948721a0119f
(cherry picked from commit 563c0927d14d052
(cherry picked from commit 00b7b714b37dbba