You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2015/05/26 23:13:13 UTC

[1/2] git commit: updated refs/heads/4.4 to 4e03bdc

Repository: cloudstack
Updated Branches:
  refs/heads/4.4 3b5e5a343 -> 4e03bdccb


CLOUDSTACK-6181: Allow RBD volumes to be resized

We don't need an external script to investigate the format of the RBD volume,
we only have to ask Libvirt to resize the volume and that will ask librbd to
do so.

Backport for 4.4, original commit: 173909e99d85cfcc85b017bc426950f9f16fddf0


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

Branch: refs/heads/4.4
Commit: a26bbc2ce2f99e706895f9c0bbc6bdb5a522c37f
Parents: 66e3f30
Author: Remi Bergsma <gi...@remi.nl>
Authored: Thu May 21 22:57:12 2015 +0200
Committer: Remi Bergsma <gi...@remi.nl>
Committed: Thu May 21 22:57:12 2015 +0200

----------------------------------------------------------------------
 .../kvm/resource/LibvirtComputingResource.java          | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a26bbc2c/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 c3fc8ee..fc00ddd 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
@@ -1847,10 +1847,14 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
             String path = vol.getPath();
             String type = getResizeScriptType(pool, vol);
 
-            if (type == null) {
-                return new ResizeVolumeAnswer(cmd, false, "Unsupported volume format: pool type '" + pool.getType() + "' and volume format '" + vol.getFormat() + "'");
-            } else if (type.equals("QCOW2") && shrinkOk) {
-                return new ResizeVolumeAnswer(cmd, false, "Unable to shrink volumes of type " + type);
+            if (pool.getType() != StoragePoolType.RBD) {
+                if (type == null) {
+                    return new ResizeVolumeAnswer(cmd, false, "Unsupported volume format: pool type '" + pool.getType() + "' and volume format '" + vol.getFormat() + "'");
+                } else if (type.equals("QCOW2") && shrinkOk) {
+                    return new ResizeVolumeAnswer(cmd, false, "Unable to shrink volumes of type " + type);
+                }
+            } else {
+                s_logger.debug("Volume " + path + " is on a RBD storage pool. No need to query for additional information.");
             }
 
             s_logger.debug("Resizing volume: " + path + "," + currentSize + "," + newSize + "," + type + "," + vmInstanceName + "," + shrinkOk);


[2/2] git commit: updated refs/heads/4.4 to 4e03bdc

Posted by da...@apache.org.
Merge branch '4.4_cepth_resize_backport' of https://github.com/remibergsma/cloudstack into 4.4


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

Branch: refs/heads/4.4
Commit: 4e03bdccb50183bf3f19fc3a099a432efe330ae2
Parents: 3b5e5a3 a26bbc2
Author: Daan Hoogland <da...@onecht.net>
Authored: Tue May 26 23:12:39 2015 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Tue May 26 23:12:39 2015 +0200

----------------------------------------------------------------------
 .../kvm/resource/LibvirtComputingResource.java          | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------