Save updated libvirt domain XML after swapping volume
When a user calls the volume-update API, we swap_volume in the libvirt
driver from the old volume attachment to the new volume attachment.
Currently, we're saving the domain XML with the old configuration prior
to updating the volume and upon a soft-reboot request, it results in an
error:
Reviewed: https:/ /review. openstack. org/523910 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=3dbcf9d5be0 f631f4d963117a2 42006df3649b8d
Committed: https:/
Submitter: Zuul
Branch: stable/pike
commit 3dbcf9d5be0f631 f4d963117a24200 6df3649b8d
Author: melanie witt <email address hidden>
Date: Tue Aug 29 22:53:44 2017 +0000
Save updated libvirt domain XML after swapping volume
When a user calls the volume-update API, we swap_volume in the libvirt
driver from the old volume attachment to the new volume attachment.
Currently, we're saving the domain XML with the old configuration prior
to updating the volume and upon a soft-reboot request, it results in an
error:
Instance soft reboot failed: Cannot access storage file <old path>
and falls back to a hard reboot, which is like pulling the power cord,
possibly resulting in file system inconsistencies.
This changes to saving the new, updated domain XML after the volume
swap.
Closes-Bug: #1713857
Change-Id: I166cde5ad8b006 99e4ec02609f0d7 b69236d855d 28dc50a0ef84095 ebd96d198d)
(cherry picked from commit 5b008c6540f948d