nova/nova/tests/unit/virt
Lee Yarwood 5b64a19361 libvirt: Block swap volume attempts with encrypted volumes prior to Queens
Prior to Queens any attempt to swap between encrypted volumes would
result in unencrypted data being written to the new volume. This
unencrypted data would then be overwritten the next time the volume was
attached to an instance as Nova no longer identified the volume as
encrypted, resulting in the volume being reformatted.

This stable only change uses limited parts of the following changes to
block all swap_volume attempts with encrypted volumes prior to Queens
where this was resolved by Ica323b87fa85a454fca9d46ada3677f18 and also
blocked when using QEMU to decrypt LUKS volumes by
Ibfa64f18bbd2fb70db7791330ed1a64fe61c1.

Ica323b87fa85a454fca9d46ada3677f18fe50022

The request context is provided to swap_volume in order to look up the
encryption metadata of a volume.

Ibfa64f18bbd2fb70db7791330ed1a64fe61c1355

Attempts to swap from an encrypted volume are blocked with a
NotImplementedError exception raised.

I258127fdcd011ccec721d5ff62eb7f128f130336

Attempts to swap from an unencrypted volume to an encrypted volume are
also blocked with a NotImplementedError exception raised.

Ie02d298cd92d5b5ebcbbcd2b0e8be01f197bfafb

The serial of a volume is used as the id if connection_info for the
volume doesn't contain the volume_id key. Required to avoid bug #1746609.

Closes-bug: #1739593
Change-Id: If12e7860baad2899380f06144a0270784a5466b8
2018-04-17 14:29:43 +00:00
..
disk Don't launch guestfs in a thread pool if guestfs.debug is enabled 2018-01-31 14:07:25 +00:00
hyperv propagate OSError to MigrationPreCheckError 2017-10-26 09:16:55 +00:00
image Use assert(Not)Equal instead of assertTrue(A == X) 2016-06-03 16:53:15 +01:00
ironic Pick ironic nodes without VCPU set 2017-10-20 09:25:46 +00:00
libvirt libvirt: Block swap volume attempts with encrypted volumes prior to Queens 2018-04-17 14:29:43 +00:00
powervm hypervisor_hostname must match get_available_nodes 2017-06-20 16:34:38 -05:00
vmwareapi remove mox from unit/virt/vmwareapi/test_driver_api.py 2017-06-14 02:48:42 +00:00
xenapi XenAPI: Fix ValueError in test_slave_asks_master_to_add_slave_to_pool 2017-07-16 09:30:33 -04:00
__init__.py
fakelibosinfo.py Fix misuse of assertTrue in console and virt tests 2016-02-22 16:09:21 +09:00
test_block_device.py libvirt: Block swap volume attempts with encrypted volumes prior to Queens 2018-04-17 14:29:43 +00:00
test_configdrive.py
test_driver.py Remove usage of parameter enforce_type 2017-04-17 20:23:19 +08:00
test_events.py
test_fake.py
test_firewall.py remove get_nw_info_for_instance from compute.utils 2017-06-13 13:30:06 +02:00
test_hardware.py Prefer non-PCI host nodes for non-PCI instances 2017-06-08 09:44:59 +01:00
test_imagecache.py Remove mox from tests/unit/virt/test_imagecache.py 2016-06-16 23:40:01 +00:00
test_images.py Bump prlimit cpu time for qemu from 2 to 8 2016-12-08 10:41:31 -05:00
test_netutils.py Remove unnecessary code 2017-07-28 06:01:21 +00:00
test_osinfo.py Do not attempt to load osinfo if we do not have os_distro 2017-03-23 22:07:03 -04:00
test_virt.py Remove mox from nova/tests/unit/virt/test_virt.py 2016-11-28 08:49:51 +00:00
test_virt_drivers.py libvirt: Block swap volume attempts with encrypted volumes prior to Queens 2018-04-17 14:29:43 +00:00
test_volumeutils.py