cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mlsoren...@apache.org
Subject git commit: updated refs/heads/resize-root to 9feb867
Date Tue, 11 Mar 2014 17:14:38 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/resize-root d4d338217 -> 9feb867fa


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/9feb867f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9feb867f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9feb867f

Branch: refs/heads/resize-root
Commit: 9feb867fa3714190a6ba0496d2733a229775cc1f
Parents: d4d3382
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:14:27 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/9feb867f/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 ff5035d..7d02f80 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
@@ -1810,8 +1810,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