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
1=== modified file 'nova/virt/libvirt/connection.py'
2--- nova/virt/libvirt/connection.py 2011-09-16 19:12:55 +0000
3+++ nova/virt/libvirt/connection.py 2011-09-16 19:42:24 +0000
4@@ -868,9 +868,13 @@
5 local_gb = inst['local_gb']
6 if local_gb and not self._volume_in_mapping(
7 self.default_local_device, block_device_info):
8- self._cache_image(fn=self._create_local,
9+ fn = functools.partial(self._create_ephemeral,
10+ fs_label='ephemeral0',
11+ os_type=inst.os_type)
12+ self._cache_image(fn=fn,
13 target=basepath('disk.local'),
14- fname="local_%s" % local_gb,
15+ fname="ephemeral_%s_%s_%s" %
16+ ("0", local_gb, inst.os_type),
17 cow=FLAGS.use_cow_images,
18 local_size=local_gb)
19