diff options
| author | Scott Moser <smoser@ubuntu.com> | 2011-09-20 08:41:51 +0000 |
|---|---|---|
| committer | Tarmac <> | 2011-09-20 08:41:51 +0000 |
| commit | 0e0a2e7fc8f98c7ef9c85e466dae985e5a529238 (patch) | |
| tree | 6726371c88c42116ef0b623535bb8c0bd5eb82c1 /nova | |
| parent | dcd646e6610e2a5cc6da78220ab0c8acde48d401 (diff) | |
| parent | a3ccd0f8454a0c381debf180b589d5837ef6674d (diff) | |
| download | nova-0e0a2e7fc8f98c7ef9c85e466dae985e5a529238.tar.gz nova-0e0a2e7fc8f98c7ef9c85e466dae985e5a529238.tar.xz nova-0e0a2e7fc8f98c7ef9c85e466dae985e5a529238.zip | |
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.
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/virt/libvirt/connection.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py index b3c8ebf6e..f3fd25214 100644 --- a/nova/virt/libvirt/connection.py +++ b/nova/virt/libvirt/connection.py @@ -874,9 +874,13 @@ class LibvirtConnection(driver.ComputeDriver): local_gb = inst['local_gb'] if local_gb and not self._volume_in_mapping( self.default_local_device, block_device_info): - self._cache_image(fn=self._create_local, + fn = functools.partial(self._create_ephemeral, + fs_label='ephemeral0', + os_type=inst.os_type) + self._cache_image(fn=fn, target=basepath('disk.local'), - fname="local_%s" % local_gb, + fname="ephemeral_%s_%s_%s" % + ("0", local_gb, inst.os_type), cow=FLAGS.use_cow_images, local_size=local_gb) |
