cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mlsoren...@apache.org
Subject [09/13] git commit: updated refs/heads/resize-root to dd4f6bf
Date Tue, 11 Mar 2014 19:05:48 GMT
CLOUDSTACK-6225: Check libvirt version and volume format before
adding flag VIR_STORAGE_VOL_RESIZE_ALLOCATE to resize volume
libvirt call


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c874e20c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c874e20c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c874e20c

Branch: refs/heads/resize-root
Commit: c874e20c24e8bcf7b606c55ef924606b857c1f6d
Parents: 991e1eb
Author: Marcus Sorensen <marcus@betterservers.com>
Authored: Tue Mar 11 11:13:12 2014 -0600
Committer: Marcus Sorensen <marcus@betterservers.com>
Committed: Tue Mar 11 11:13:12 2014 -0600

----------------------------------------------------------------------
 .../cloud/hypervisor/kvm/resource/LibvirtComputingResource.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c874e20c/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
index 5912dd3..f4f6c74 100755
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
@@ -1804,8 +1804,11 @@ public class LibvirtComputingResource extends ServerResourceBase implements
Serv
                 try {
                     Connect conn = LibvirtConnection.getConnection();
                     StorageVol v = conn.storageVolLookupByPath(path);
+                    int flags = 0;
 
-                    int flags = 1;
+                    if (conn.getLibVirVersion() > 1001000 && vol.getFormat() ==
PhysicalDiskFormat.RAW) {
+                        flags = 1;
+                    }
                     if (shrinkOk) {
                         flags = 4;
                     }


Mime
View raw message