Merge lp:~smoser/nova/trunk.lp851145 into lp:~hudson-openstack/nova/trunk

Proposed by Scott Moser
Status: Merged
Approved by: Vish Ishaya
Approved revision: 1579
Merged at revision: 1602
Proposed branch: lp:~smoser/nova/trunk.lp851145
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 18 lines (+6/-2)
1 file modified
nova/virt/libvirt/connection.py (+6/-2)
To merge this branch: bzr merge lp:~smoser/nova/trunk.lp851145
Reviewer Review Type Date Requested Status
Josh Kearney (community) Approve
Vish Ishaya (community) Approve
Review via email: mp+75800@code.launchpad.net

Description of the change

create disk.local the same way ephemerals are created (LP: #851145)

If the user did not specify '--block-device-mapping /dev/vdb=ephemeral0', then the first non-root device would end up being created differently then if they had. It would not have a filesystem on it.

This makes 'local_gb' in the libvirt connection created the same way that
it would be if it were named ephemeral0.

To post a comment you must log in.
Revision history for this message
Vish Ishaya (vishvananda) wrote :

lgtm

review: Approve
Revision history for this message
Josh Kearney (jk0) wrote :

LGTM.

review: Approve
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

The attempt to merge lp:~smoser/nova/trunk.lp851145 into lp:nova failed. Below is the output from the failed tests.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'nova/virt/libvirt/connection.py'
--- nova/virt/libvirt/connection.py 2011-09-16 19:12:55 +0000
+++ nova/virt/libvirt/connection.py 2011-09-16 19:42:24 +0000
@@ -868,9 +868,13 @@
868 local_gb = inst['local_gb']868 local_gb = inst['local_gb']
869 if local_gb and not self._volume_in_mapping(869 if local_gb and not self._volume_in_mapping(
870 self.default_local_device, block_device_info):870 self.default_local_device, block_device_info):
871 self._cache_image(fn=self._create_local,871 fn = functools.partial(self._create_ephemeral,
872 fs_label='ephemeral0',
873 os_type=inst.os_type)
874 self._cache_image(fn=fn,
872 target=basepath('disk.local'),875 target=basepath('disk.local'),
873 fname="local_%s" % local_gb,876 fname="ephemeral_%s_%s_%s" %
877 ("0", local_gb, inst.os_type),
874 cow=FLAGS.use_cow_images,878 cow=FLAGS.use_cow_images,
875 local_size=local_gb)879 local_size=local_gb)
876880