nova/nova/virt
Lee Yarwood 0225a61fc4 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.

Conflicts:
        nova/tests/unit/compute/test_compute_mgr.py
        nova/tests/unit/virt/libvirt/test_driver.py

NOTE(lyarwood): Conflict due to cinderv3 support for swap_volume not
being present in stable/ocata via
I4b8bd01f1ffe2640fe7313213bf853d2e1bef9dd.

Closes-bug: #1739593
Change-Id: If12e7860baad2899380f06144a0270784a5466b8
(cherry picked from commit 5b64a19361)
2018-04-18 19:57:30 +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 libvirt: Block swap volume attempts with encrypted volumes prior to Queens 2018-04-18 19:57:30 +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 libvirt: Block swap volume attempts with encrypted volumes prior to Queens 2018-04-18 19:57:30 +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 libvirt: Block swap volume attempts with encrypted volumes prior to Queens 2018-04-18 19:57:30 +00:00
event.py Add 'suspended' lifecycle event 2015-04-03 03:59:20 +03:00
fake.py libvirt: Block swap volume attempts with encrypted volumes prior to Queens 2018-04-18 19:57:30 +00: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 Fixes interfaces template identification issue 2014-12-07 17:52:34 +02:00
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 Use oslo.log 2015-02-22 07:56:40 -05:00
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