b7bf1fbe49
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. NOTE(lyarwood): Conflicts as If1b6e5f20d2ea82d94f5f0550f13189fc9bc16c4 only merged in Rocky and the backports of Id3c74c019da29070811ffc368351e2238b3f6da5 and I217fba9138132b107e9d62895d699d238392e761 have yet to land on stable/queens from stable/rocky. Conflicts: nova/conf/workarounds.py Related-Bug: #1761062 Partial-Bug: #1414895 Change-Id: I8fd6b9f857a1c4919c3365951e2652d2d477df77 (cherry picked from commit |
||
---|---|---|
.. | ||
api | ||
CA | ||
cells | ||
cmd | ||
common | ||
compute | ||
conductor | ||
conf | ||
console | ||
consoleauth | ||
db | ||
hacking | ||
image | ||
ipv6 | ||
keymgr | ||
locale | ||
network | ||
notifications | ||
objects | ||
pci | ||
policies | ||
privsep | ||
scheduler | ||
servicegroup | ||
tests | ||
virt | ||
vnc | ||
volume | ||
__init__.py | ||
availability_zones.py | ||
baserpc.py | ||
block_device.py | ||
cache_utils.py | ||
config.py | ||
context.py | ||
crypto.py | ||
debugger.py | ||
exception_wrapper.py | ||
exception.py | ||
filters.py | ||
hooks.py | ||
i18n.py | ||
loadables.py | ||
manager.py | ||
policy.py | ||
profiler.py | ||
quota.py | ||
rpc.py | ||
safe_utils.py | ||
service_auth.py | ||
service.py | ||
test.py | ||
utils.py | ||
version.py | ||
weights.py | ||
wsgi.py |