nova/nova/virt/libvirt
rsritesh e93bc57a73 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>

Closes-Bug: #1653953
Change-Id: If3c9d1de3ce0fe394405bd1e1f0fa08ce2baeda8
(cherry picked from commit d89e7d7857)
(cherry picked from commit e802ede4b3)
2019-06-28 10:07:59 +01:00
..
storage Merge "Revert "Re-using the code of os brick cinder"" 2018-06-19 02:08:35 +00:00
volume Fixes multi-registry config in Quobyte driver 2019-06-03 07:42:32 +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 Implement discard for file backed memory 2018-06-21 11:45:31 -05:00
designer.py add mtu to libvirt xml for ethernet and bridge types 2018-06-06 09:39:40 -04:00
driver.py libvirt: flatten rbd images when unshelving an instance 2019-06-28 10:07:59 +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-10 14:31:16 -06:00
host.py libvirt: Don't react to VIR_DOMAIN_EVENT_SUSPENDED_MIGRATED events 2018-08-23 14:44:22 -04:00
imagebackend.py libvirt: flatten rbd images when unshelving an instance 2019-06-28 10:07:59 +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: Avoid setting MTU during live migration if unset 2018-10-29 22:46:06 +01:00
utils.py Add method to get cpu traits 2018-07-24 12:37:46 +00:00
vif.py libvirt: skip setting rx/tx queue sizes for not virto interfaces 2018-09-04 07:09:27 +00:00