nova/nova/virt
Nikola Dipanov cbeb5e5188 libvirt: Fix root disk leak in live mig
This patch makes sure that _create_images_and_backing method of the
libvirt driver (called in several places, but most problematic one is
the call in the pre_live_migration method) creates all the files the
instance needs that are not present.

Prioir to this patch - the method would only attempt to download the
image, and if it did so with the path of the ephemeral drives, it could
expose the image to other users as an ephemeral devices. See the related
bug for more detaiis.

After this patch - we properly distinguish between image, ephemeral and
swap files, and make sure that the imagebackend does the correct thing.

Closes-bug: #1251590

Co-authored-by: Loganathan Parthipan <parthipan@hp.com>

This patch also includes part of commit
65386c9191, not cherry-picked as a whole
due to the fact that it is a trivial change, and to avoud the
proliferation of patches needed to fix this bug.

(cherry picked from commit c69a619668b5f44e94a8fe1a23f3d887ba2834d7)

Conflicts:
	nova/tests/test_libvirt.py
	nova/virt/libvirt/driver.py

Change-Id: I78aa2f4243899db4f4941e77014a7e18e27fc63e
2014-01-27 12:19:47 +01:00
..
baremetal Refresh volume connections when starting instances 2013-06-26 17:26:26 -02:30
disk use 'os_type' in ephemeral filename only if mkfs defined 2013-12-18 15:24:15 +01:00
hyperv Merge "Check instance on dest once during block migration" into stable/grizzly 2013-10-15 00:16:50 +00:00
libvirt libvirt: Fix root disk leak in live mig 2014-01-27 12:19:47 +01:00
powervm Make virt drivers use a consistent hostname 2013-09-17 16:25:55 -07:00
vmwareapi Merge "VMWare: Disabling linked clone doesn't cache images" into stable/grizzly 2013-10-21 14:06:20 +00:00
xenapi Merge "xenapi: apply firewall rules in finish_migrate" into stable/grizzly 2013-10-31 09:25:29 +00:00
__init__.py In preparation for XenAPI support, refactor the interface between 2010-07-18 18:15:12 +01:00
configdrive.py Use oslo-config-2013.1b4 2013-02-19 21:16:32 -08:00
driver.py Check instance on dest once during block migration 2013-08-19 10:50:53 +02:00
event.py Add basic infrastructure for compute driver async events 2013-02-19 17:06:59 +00:00
fake.py Check instance on dest once during block migration 2013-08-19 10:50:53 +02:00
firewall.py Refresh network info cache for secgroups 2013-09-05 09:53:55 -07:00
images.py ensure we don't boot oversized images 2013-10-31 17:05:59 +01:00
interfaces.template Don't write a dns directive if there are no dns records in /etc/network/interfaces 2012-02-05 19:51:17 -08:00
netutils.py Fix launching libvirt instances with swap 2013-02-21 19:44:35 +00:00
storage_users.py Detect shared storage; handle base cleanup better. 2012-11-21 09:30:42 +11:00
virtapi.py Add instance_type_get() to virt api 2013-02-28 14:40:37 -05:00