nova/nova
Lee Yarwood ec43a1348d libvirt: Avoid using os-brick encryptors when device_path isn't provided
When disconnecting an encrypted volume the Libvirt driver uses the
presence of a Libvirt secret associated with the volume to determine if
the new style native QEMU LUKS decryption or original decryption method
using os-brick encrytors is used.

While this works well in most deployments some issues have been observed
in Kolla based environments where the Libvirt secrets are not fully
persisted between host reboots or container upgrades. This can lead to
_detach_encryptor attempting to build an encryptor which will fail if
the associated connection_info for the volume does not contain a
device_path, such as in the case for encrypted rbd volumes.

This change adds a simple conditional to _detach_encryptor to ensure we
return when device_path is not present in connection_info and native
QEMU LUKS decryption is available. This handles the specific use
case where we are certain that the encrypted volume was never decrypted
using the os-brick encryptors, as these require a local block device on
the compute host and have thus never supported rbd.

It is still safe to build an encryptor and call detach_volume when a
device_path is present however as change I9f52f89b8466d036 made such
calls idempotent within os-brick.

Change-Id: Id670f13a7f197e71c77dc91276fc2fba2fc5f314
Closes-bug: #1821696
(cherry picked from commit 56ca4d32dd)
(cherry picked from commit c6432ac021)
(cherry picked from commit 2c6e59e835)
2019-04-30 09:27:57 +01:00
..
CA
api Merge "Provide a useful error message when trying to update non-compute services" into stable/queens 2019-03-15 15:49:53 +00:00
cells Add instance action record for snapshot instances 2017-12-11 17:46:38 +08:00
cmd nova-manage - fix online_data_migrations counts 2018-09-27 14:57:09 -04:00
common
compute Merge "Update instance.availability_zone on revertResize" into stable/queens 2019-04-19 00:47:39 +00:00
conductor Merge "Fix incomplete instance data returned after build failure" into stable/queens 2019-04-22 05:25:33 +00:00
conf Document unset/reset wrinkle for *_allocation_ratio options 2019-03-25 05:35:21 +00:00
console Fix accumulated nits 2018-01-16 14:54:04 +00:00
consoleauth Fix stacktraces with redis caching backend 2018-10-01 07:52:08 +00:00
db Delete instance_id_mappings record in instance_destroy 2019-04-05 15:38:05 +01:00
hacking trivial: Rename 'policy_check' -> 'policy' 2017-10-25 17:56:40 +01:00
image Fix regression in glance client call 2019-04-23 15:28:37 +00:00
ipv6
keymgr Remove deprecated keymgr code 2017-09-11 15:48:30 -04:00
locale Imported Translations from Zanata 2018-03-01 06:16:22 +00:00
network Merge "Handle IndexError in _populate_neutron_binding_profile" into stable/queens 2019-02-11 21:53:20 +00:00
notifications Merge "Remove noisy DEBUG log" into stable/queens 2018-09-21 12:01:58 +00:00
objects Do not persist RequestSpec.ignore_hosts 2019-04-02 11:07:52 -04:00
pci PCI: do not force remove allocated devices 2019-02-05 23:29:54 +00:00
policies Add policy rule to block image-backed servers with 0 root disk flavor 2018-06-18 13:51:41 -04:00
privsep stable-only: fix typo in IVS related privsep method 2018-10-03 19:28:30 +00:00
scheduler Merge "Fix WeighedHost logging regression" into stable/queens 2019-03-15 02:52:50 +00:00
servicegroup Fix service list for disabled compute using MC driver 2018-09-16 19:12:55 +00:00
tests libvirt: Avoid using os-brick encryptors when device_path isn't provided 2019-04-30 09:27:57 +01:00
virt libvirt: Avoid using os-brick encryptors when device_path isn't provided 2019-04-30 09:27:57 +01:00
vnc
volume Avoid BadRequest error log on volume attachment 2019-02-28 12:13:26 -05:00
__init__.py
availability_zones.py Avoid lazy-load error when getting instance AZ 2017-05-25 15:46:22 -04:00
baserpc.py
block_device.py Add uuid column to BlockDeviceMapping 2017-12-17 14:28:35 +00:00
cache_utils.py remove log translation tags from nova.cells 2017-04-10 14:48:07 +00:00
config.py Set default of oslo.privsep.daemon logging to INFO level 2018-09-15 02:21:10 +00:00
context.py Allow cinderv2 endpoints within the request context catalog 2018-06-05 10:04:06 +01:00
crypto.py
debugger.py
exception.py Explicitly fail if trying to attach SR-IOV port 2018-10-03 18:05:00 -04:00
exception_wrapper.py rename binary to source in versioned notifications 2017-07-25 17:36:04 +02:00
filters.py
hooks.py
i18n.py correct referenced url in comments 2018-01-18 09:16:37 +08:00
loadables.py
manager.py
policy.py Add policy granularity to the Flavors API 2017-07-19 15:56:47 -04:00
profiler.py
quota.py Fix server_group_members quota check 2018-07-11 15:04:34 -04:00
rpc.py Remove dead code of api.fault notification sending 2017-10-09 17:29:40 +02:00
safe_utils.py Allow wrapping of closures 2017-07-20 10:07:52 +01:00
service.py Move conductor wait_until_ready() delay before manager init 2018-09-01 17:25:02 -04:00
service_auth.py Fix NoneType error when [service_user] is misconfigured 2017-11-28 12:22:30 -06:00
test.py Fix the request context in ServiceFixture 2018-09-04 19:36:26 +00:00
utils.py Make supports_direct_io work on 4096b sector size 2018-11-21 10:47:30 +00:00
version.py
weights.py
wsgi.py