nova/nova
Lee Yarwood 8c678ae572 libvirt: Add workaround to cleanup instance dir when using rbd
At present all virt drivers provide a cleanup method that takes a single
destroy_disks boolean to indicate when the underlying storage of an
instance should be destroyed.

When cleaning up after an evacuation or revert resize the value of
destroy_disks is determined by the compute layer calling down both into
the check_instance_shared_storage_local method of the local virt driver
and remote check_instance_shared_storage method of the virt driver on
the host now running the instance.

For the Libvirt driver the initial local call will return None when
using the shared block RBD imagebackend as it is assumed all instance
storage is shared resulting in destroy_disks always being False when
cleaning up. This behaviour is wrong as the instance disks are stored
separately to the instance directory that still needs to be cleaned up
on the host. Additionally this directory could also be shared
independently of the disks on a NFS share for example and would need to
also be checked before removal.

This change introduces a backportable workaround configurable for the
Libvirt driver with which operators can ensure that the instance
directory is always removed during cleanup when using the RBD
imagebackend. When enabling this workaround operators will need to
ensure that the instance directories are not shared between computes.

Future work will allow for the removal of this workaround by separating
the shared storage checks from the compute to virt layers between the
actual instance disks and any additional storage required by the
specific virt backend.

Related-Bug: #1761062
Partial-Bug: #1414895
Change-Id: I8fd6b9f857a1c4919c3365951e2652d2d477df77
(cherry picked from commit d6c1f6a103)
2019-01-15 15:53:48 +00:00
..
api Fail to live migration if instance has a NUMA topology 2018-12-18 11:13:14 +00:00
cells
cmd Merge "Validate transport_url in nova-manage cell_v2 commands" into stable/rocky 2018-12-09 17:15:49 +00:00
common
compute Merge "Make compute rpcapi version calculation check all cells" into stable/rocky 2019-01-08 16:55:07 +00:00
conductor Fail to live migration if instance has a NUMA topology 2018-12-18 11:13:14 +00:00
conf libvirt: Add workaround to cleanup instance dir when using rbd 2019-01-15 15:53:48 +00:00
console Use nova-consoleauth only if workaround enabled 2018-10-15 17:38:39 +00:00
consoleauth Fix stacktraces with redis caching backend 2018-10-01 07:50:53 +00:00
db Replace usage of get_legacy_facade() with get_engine() 2018-10-10 13:54:07 +01:00
hacking Use nova.db.api directly 2018-07-10 14:56:27 +00:00
image Implement certificate_utils 2018-06-12 14:44:32 -04:00
ipv6
keymgr
locale Imported Translations from Zanata 2019-01-06 07:42:59 +00:00
network Merge "Handle unbound vif plug errors on compute restart" into stable/rocky 2018-12-20 04:20:00 +00:00
notifications Remove noisy DEBUG log 2018-08-24 11:19:14 +02:00
objects Exclude build request marker from server listing 2018-12-20 21:06:23 +03:00
pci network: update pci request spec to handle trusted tags 2018-05-31 13:55:40 -04:00
policies Remove support for /os-floating-ip-dns REST API 2018-07-18 22:23:45 -04:00
privsep Make supports_direct_io work on 4096b sector size 2018-11-21 14:14:22 +00:00
scheduler Use long_rpc_timeout in select_destinations RPC call 2018-11-26 12:52:39 -05:00
servicegroup Fix service list for disabled compute using MC driver 2018-09-14 02:25:10 +00:00
tests libvirt: Add workaround to cleanup instance dir when using rbd 2019-01-15 15:53:48 +00:00
virt libvirt: Add workaround to cleanup instance dir when using rbd 2019-01-15 15:53:48 +00:00
vnc
volume Remove unnecessary parameters from create volume API 2018-06-12 12:06:41 +05:30
__init__.py
availability_zones.py
baserpc.py
block_device.py Add uuid column to BlockDeviceMapping 2017-12-17 14:28:35 +00:00
cache_utils.py
config.py Configure placement DB context manager for nova-manage/status 2018-09-06 10:47:55 -04:00
context.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
crypto.py Convert certificate generation to processutils. 2018-05-02 19:18:41 +10:00
debugger.py
exception.py Explicitly fail if trying to attach SR-IOV port 2018-09-25 16:22:19 +00:00
exception_wrapper.py Add full traceback to ExceptionPayload in versioned notifications 2018-06-19 16:46:46 +08:00
filters.py
hooks.py
i18n.py correct referenced url in comments 2018-01-18 09:16:37 +08:00
loadables.py
manager.py conf: Remove 'db_driver' config opt 2018-03-16 17:23:16 +00:00
policy.py
profiler.py
quota.py Merge "Avoid joins in _server_group_count_members_by_user" 2018-08-07 23:16:06 +00:00
rc_fields.py Nix unused raise_if_custom_resource_class_pre_v1_1 2018-06-18 19:52:45 +00:00
rpc.py Use oslo.messaging per-call monitoring 2018-06-11 14:44:10 -07:00
safe_utils.py
service.py Move conductor wait_until_ready() delay before manager init 2018-08-31 16:21:52 -04:00
service_auth.py
test.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
utils.py Harden placement init under wsgi 2018-11-12 11:30:32 +00:00
version.py
weights.py
wsgi.py Refactor WSGI apps and utils to limit imports 2018-03-06 22:05:12 +00:00