nova/nova/virt/libvirt
rsritesh d2f91755ab libvirt: flatten rbd images when unshelving an instance
Previously attempts to remove the shelved snapshot of an unshelved
instance when using the rbd backends for both Nova and Glance would
fail. This was due to the instance disk being cloned from and still
referencing the shelved snapshot image in Glance, blocking any attempt
to remove this image later in the unshelve process.

After much debate this change attempts to fix this issue by flattening
the instance disk while the instance is being spawned as part of an
unshelve. For the rbd imagebackend this removes any reference to the
shelved snapshot in Glance allowing this image to be removed. For all
other imagebackends the call to flatten the image is currently a no-op.

Co-Authored-By: Lee Yarwood <lyarwood@redhat.com>
Co-Authored-By: Vladyslav Drok <vdrok@mirantis.com>

NOTE(lyarwood): Test conflicts due to Ie3130e104d7ca80289f1bd9f0fee9a7a198c263c
and I407034374fe17c4795762aa32575ba72d3a46fe8 not being present in
stable/queens. Note that the latter was backported but then reverted via
Ibf2b5eeafd962e93ae4ab6290015d58c33024132 resulting in this conflict.

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

Closes-Bug: #1653953
Change-Id: If3c9d1de3ce0fe394405bd1e1f0fa08ce2baeda8
(cherry picked from commit d89e7d7857)
(cherry picked from commit e802ede4b3)
(cherry picked from commit e93bc57a73)
2019-07-29 09:06:47 +01:00
..
storage Move shred to privsep. 2017-10-23 09:36:28 +11:00
volume libvirt: set device address tag only if setting disk unit 2019-04-18 16:03:48 +00:00
__init__.py Remove vi modelines 2014-02-03 14:19:44 +00:00
blockinfo.py Rename block_device_info_get_root 2018-01-11 20:46:13 +00:00
compat.py Remove translation of log messages 2017-06-13 11:20:28 +07:00
config.py add mtu to libvirt xml for ethernet and bridge types 2018-07-04 17:33:26 +01:00
designer.py add mtu to libvirt xml for ethernet and bridge types 2018-07-04 17:33:26 +01:00
driver.py libvirt: flatten rbd images when unshelving an instance 2019-07-29 09:06:47 +01:00
firewall.py Replaces uuid.uuid4 with uuidutils.generate_uuid() 2017-07-25 10:45:03 +05:30
guest.py Add missing libvirt exception during device detach 2019-04-16 13:43:28 +00:00
host.py Encode libvirt domain XML in UTF-8 2018-02-08 15:45:59 -05:00
imagebackend.py libvirt: flatten rbd images when unshelving an instance 2019-07-29 09:06:47 +01:00
imagecache.py Move the dac_admin privsep code to a new location. 2017-09-18 23:14:11 +10:00
instancejobtracker.py Remove translation of log messages 2017-06-13 11:20:28 +07:00
migration.py libvirt: QEMU native LUKS decryption for encrypted volumes 2018-01-23 10:47:05 +00:00
utils.py Move the idmapshift binary into privsep. 2017-10-24 18:50:23 +11:00
vif.py libvirt: add qemu version check when configuring mtu for network 2018-07-05 11:20:11 +01:00