nova/nova/virt
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
..
disk libvirt: Reduce calls to qemu-img during update_available_resource 2018-08-08 15:22:44 +01:00
hyperv hyperv: Cleans up live migration Planned VM 2018-09-14 11:49:17 -06:00
image libvirt: virtuozzo instance resize support 2016-06-28 22:13:49 +03:00
ironic [stable-only] Add report_ironic_standard_resource_class_inventory option 2018-10-09 12:04:09 -04:00
libvirt libvirt: Add workaround to cleanup instance dir when using rbd 2019-01-15 15:53:48 +00:00
powervm Merge "Rename recreate to evacuate in driver signatures" 2018-07-21 23:19:40 +00:00
vmwareapi Merge "Rename recreate to evacuate in driver signatures" 2018-07-21 23:19:40 +00:00
xenapi XenAPI/Stops the migration of volume backed VHDS 2018-09-20 19:57:37 +00:00
zvm Fix missing print format error 2018-07-20 16:29:53 +08:00
__init__.py Declare nova.virt namespace 2016-04-28 15:01:44 +00:00
arch.py Added ability to configure default architecture for ImagePropertiesFilter 2018-05-14 16:55:13 -04:00
block_device.py block_device: Rollback volumes to in-use on DeviceDetachFailed 2018-08-10 15:37:26 +00:00
configdrive.py Convert configdrive to use processutils. 2018-05-02 21:42:05 +10:00
driver.py Merge "Provide allocation_ratio/reserved amounts from update_provider_tree()" into stable/rocky 2018-12-07 18:11:02 +00:00
event.py Port binding based on events during live migration 2018-07-19 09:09:55 -04:00
fake.py Provide allocation_ratio/reserved amounts from update_provider_tree() 2018-10-31 11:49:46 -04:00
firewall.py Merge "Remove translation of log messages" 2017-06-20 21:16:49 +00:00
hardware.py hardware: fix memory check usage for small/large pages 2018-09-03 14:45:26 +00:00
imagecache.py Rename ImageCacheManager._list_base_images to _scan_base_images 2016-05-26 14:45:42 +01:00
images.py Implement certificate_utils 2018-06-12 14:44:32 -04:00
interfaces.template
netutils.py libvirt: add vf_trusted field for network metadata 2018-05-30 15:11:59 -04:00
osinfo.py Remove translation of log messages 2017-06-13 11:20:28 +07:00
storage_users.py Remove translation of log messages 2017-06-13 11:20:28 +07:00
virtapi.py Remove unused provider firewall rules functionality in nova 2016-02-01 15:50:04 +01:00