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

Proposed by Scott Moser
Status: Merged
Approved by: Vish Ishaya
Approved revision: 1176
Merged at revision: 1183
Proposed branch: lp:~smoser/nova/milestone-proposed.lp851145
Merge into: lp:~hudson-openstack/nova/milestone-proposed
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/milestone-proposed.lp851145
Reviewer Review Type Date Requested Status
OpenStack release team Pending
Review via email: mp+75746@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
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.

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 15:53:56 +0000
3+++ nova/virt/libvirt/connection.py 2011-09-16 19:38:25 +0000
4@@ -865,9 +865,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

Subscribers

People subscribed via source and target branches