nova/nova/virt/libvirt
Matt Riedemann cafe3d066e libvirt: fix native luks encryption failure to find volume_id
Not all volume types put a 'volume_id' entry in the
connection_info['data'] dict. This change uses a new
utility method to look up the volume_id in the connection_info
data dict and if not found there, uses the 'serial' value
from the connection_info, which we know at least gets set
when the DriverVolumeBlockDevice code attaches the volume.

This also has to update pre_live_migration since the connection_info
dict doesn't have a 'volume_id' key in it. It's unclear what
this code was expecting, or if it ever really worked, but since
an attached volume represented by a BlockDeviceMapping here has
a volume_id attribute, we can just use that. As that code path
was never tested, this updates related unit tests and refactors
the tests to actually use the type of DriverVolumeBlockDevice
objects that the ComputeManager would be sending down to the
driver pre_live_migration method. The hard-to-read squashed
dicts in the tests are also re-formatted so a human can actually
read them.

Change-Id: Ie02d298cd92d5b5ebcbbcd2b0e8be01f197bfafb
Closes-Bug: #1746609
2018-02-02 15:00:30 -05:00
..
storage Move shred to privsep. 2017-10-23 09:36:28 +11:00
volume libvirt: fix native luks encryption failure to find volume_id 2018-02-02 15:00:30 -05:00
__init__.py Remove vi modelines 2014-02-03 14:19:44 +00:00
blockinfo.py Rename block_device_info_get_root 2018-01-11 20:46:13 +00:00
compat.py Remove translation of log messages 2017-06-13 11:20:28 +07:00
config.py Merge "libvirt: Introduce disk encryption config classes" 2018-01-22 22:21:44 +00:00
designer.py libvirt: conditionally set script path for ethernet vif types 2017-03-21 14:12:39 -04:00
driver.py libvirt: fix native luks encryption failure to find volume_id 2018-02-02 15:00:30 -05:00
firewall.py Replaces uuid.uuid4 with uuidutils.generate_uuid() 2017-07-25 10:45:03 +05:30
guest.py Remove unnecessary execute permissions in files 2018-01-15 23:53:01 +09:00
host.py libvirt: Provide VGPU inventory for a single GPU type 2018-01-08 14:49:55 +01:00
imagebackend.py Move ploop commands to privsep. 2017-09-28 07:29:51 +10:00
imagecache.py Move the dac_admin privsep code to a new location. 2017-09-18 23:14:11 +10:00
instancejobtracker.py Remove translation of log messages 2017-06-13 11:20:28 +07:00
migration.py libvirt: QEMU native LUKS decryption for encrypted volumes 2018-01-23 10:47:05 +00:00
utils.py Move the idmapshift binary into privsep. 2017-10-24 18:50:23 +11:00
vif.py Move contrail vif plugging to privsep. 2017-11-02 12:09:27 +11:00