summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-02-17 20:40:15 +0000
committerGerrit Code Review <review@openstack.org>2012-02-17 20:40:15 +0000
commit18a8eae4bfa6f022ea97155596dfb80ae7401ed6 (patch)
tree481196edd84b962f9f712e5d4313ebafb03a87ae
parentee541f0a7e447adb000d7a4f5e9f98e2dce33362 (diff)
parentd1bc92fdbd3aa42b15beeb5eaf2987365247cfa2 (diff)
Merge "Fix bug 929427"
-rw-r--r--nova/virt/libvirt/connection.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py
index 88343b7ce..8312764b4 100644
--- a/nova/virt/libvirt/connection.py
+++ b/nova/virt/libvirt/connection.py
@@ -1997,11 +1997,7 @@ class LibvirtConnection(driver.ComputeDriver):
continue
disk_type = driver_nodes[cnt].get('type')
- if disk_type == 'raw':
- dk_size = int(os.path.getsize(path))
- backing_file = ""
- virt_size = 0
- else:
+ if disk_type == "qcow2":
out, err = utils.execute('qemu-img', 'info', path)
# virtual size:
@@ -2014,6 +2010,10 @@ class LibvirtConnection(driver.ComputeDriver):
# backing file:(actual path:)
backing_file = libvirt_utils.get_disk_backing_file(path)
+ else:
+ dk_size = int(os.path.getsize(path))
+ backing_file = ""
+ virt_size = 0
disk_info.append({'type': disk_type,
'path': path,