nova/nova/virt
melanie witt aa0e4ebd2c 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

NOTE(melwitt): The assert in test_swap_volume_block_old_libvirt had to
be modified to account for the additional XMLDesc call from the bug
fix. The test_swap_volume_block_old_libvirt doesn't exist in Pike, so
that's why we didn't hit this in the master patch.

Change-Id: I166cde5ad8b00699e4ec02609f0d7b69236d855d
(cherry picked from commit 5b008c6540)
2017-11-29 21:54:52 +00:00
..
disk Fix a typo in documents 2017-01-06 22:10:27 +08:00
hyperv hyperv: Fixes Generation 2 VMs volume boot order 2017-08-11 17:13:16 +00:00
image libvirt: virtuozzo instance resize support 2016-06-28 22:13:49 +03:00
ironic Handle ironicclient failures in Ironic driver 2017-08-08 11:14:53 -04:00
libvirt Save updated libvirt domain XML after swapping volume 2017-11-29 21:54:52 +00:00
vmwareapi [2/3]Replace six.iteritems() with .items() 2017-01-09 09:11:00 +00:00
xenapi Merge "XenAPI: Create linux bridge in dest host during live migration" into stable/ocata 2017-08-11 18:24:12 +00:00
__init__.py Declare nova.virt namespace 2016-04-28 15:01:44 +00:00
block_device.py [2/3]Replace six.iteritems() with .items() 2017-01-09 09:11:00 +00:00
configdrive.py Fixes python 3 unit tests 2016-09-23 20:10:24 +00:00
diagnostics.py [2/3]Replace six.iteritems() with .items() 2017-01-09 09:11:00 +00:00
driver.py Support Ironic interface attach/detach in nova virt 2017-01-19 22:13:16 -05:00
event.py Add 'suspended' lifecycle event 2015-04-03 03:59:20 +03:00
fake.py Fixes to get all functional tests working on py35 2017-01-14 13:06:56 -05:00
firewall.py Fix spelling mistake 2016-06-28 08:41:09 +02:00
hardware.py objects: add new field cpuset_reserved in NUMACell 2017-01-24 19:37:55 +00:00
imagecache.py Rename ImageCacheManager._list_base_images to _scan_base_images 2016-05-26 14:45:42 +01:00
images.py Bump prlimit cpu time for qemu from 2 to 8 2016-12-08 10:41:31 -05:00
interfaces.template
netutils.py Limit exposure of network device types to the guest. 2017-06-21 15:56:16 +00:00
osinfo.py Do not attempt to load osinfo if we do not have os_distro 2017-03-30 05:11:40 +00:00
storage_users.py
virtapi.py Remove unused provider firewall rules functionality in nova 2016-02-01 15:50:04 +01:00
volumeutils.py nova.utils._get_root_helper() should be public 2015-08-19 04:00:50 +00:00