libvirt: removing lxc specific disk mapping

Currently, LXC specific disk mapping is being created, preventing
the attached volumes from being added to the LXC disk mapping.
Removing this part, to allow volumes to be included in mapping.

Related-Bug: #1269990
Change-Id: I97bcff558b6d8876a10adb36c19ab3f4c972a708
This commit is contained in:
Vladik Romanovsky
2014-06-26 17:46:43 -04:00
parent 099aad2c3f
commit 54afa0683f
2 changed files with 1 additions and 17 deletions

View File

@@ -205,6 +205,7 @@ class LibvirtBlockInfoTest(test.TestCase):
# A simple disk mapping setup, but for lxc
user_context = context.RequestContext(self.user_id, self.project_id)
self.test_instance['ephemeral_gb'] = 0
instance_ref = db.instance_create(user_context, self.test_instance)
mapping = blockinfo.get_disk_mapping("lxc", instance_ref,

View File

@@ -501,23 +501,6 @@ def get_disk_mapping(virt_type, instance,
driver.block_device_info_get_mapping(block_device_info))
if get_device_name(bdm)]
if virt_type == "lxc":
# NOTE(zul): This information is not used by the libvirt driver
# however we need to populate mapping so the image can be
# created when the instance is started. This can
# be removed when we convert LXC to use block devices.
root_disk_bus = disk_bus
root_device_type = 'disk'
root_info = get_next_disk_info(mapping,
root_disk_bus,
root_device_type,
boot_index=1)
mapping['root'] = root_info
mapping['disk'] = root_info
return mapping
if rescue:
rescue_info = get_next_disk_info(mapping,
disk_bus, boot_index=1)