nova/nova/tests/unit/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
fake_imagebackend.py libvirt: update logic to configure device for scsi controller 2017-07-03 03:23:53 -04:00
fake_libvirt_utils.py Add method to get cpu traits 2018-07-24 12:37:46 +00:00
fake_os_brick_connector.py
fakelibvirt.py Merge "Improve NeutronFixture and remove unncessary stubbing" 2018-08-02 17:44:55 +00:00
test_blockinfo.py Modify the test case of get_disk_mapping_rescue_with_config 2018-01-12 14:08:51 +08:00
test_compat.py
test_config.py conf: libvirt: Make `/dev/urandom` the default for 'rng_dev_path' 2018-06-26 17:55:11 +02:00
test_designer.py add mtu to libvirt xml for ethernet and bridge types 2018-06-06 09:39:40 -04:00
test_driver.py libvirt: flatten rbd images when unshelving an instance 2019-06-28 10:07:59 +01:00
test_fakelibvirt.py conf: Deprecate 'keymap' options 2018-03-07 10:18:23 +00:00
test_firewall.py Don't modify objects directly 2018-01-30 16:35:02 +00:00
test_guest.py Add missing libvirt exception during device detach 2019-04-10 14:31:16 -06:00
test_host.py libvirt: Don't react to VIR_DOMAIN_EVENT_SUSPENDED_MIGRATED events 2018-08-23 14:44:22 -04:00
test_imagebackend.py libvirt: flatten rbd images when unshelving an instance 2019-06-28 10:07:59 +01:00
test_imagecache.py Move the dac_admin privsep code to a new location. 2017-09-18 23:14:11 +10:00
test_migration.py libvirt: Avoid setting MTU during live migration if unset 2018-10-29 22:46:06 +01:00
test_utils.py Plumb trusted_certs through the compute service 2018-06-12 16:58:25 -04:00
test_vif.py libvirt: skip setting rx/tx queue sizes for not virto interfaces 2018-09-04 07:09:27 +00:00