incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mlsoren...@apache.org
Subject git commit: refs/heads/master - Summary: Disallow shrinking volume type QCOW2 to fail with better message
Date Tue, 05 Feb 2013 19:39:39 GMT
Updated Branches:
  refs/heads/master 4f274d0b8 -> 3535f88d1


Summary: Disallow shrinking volume type QCOW2 to fail with better message

Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1360093176 -0700


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

Branch: refs/heads/master
Commit: 3535f88d16fe3a10f2d4fb4aa4e5b542c7c835ba
Parents: 4f274d0
Author: Marcus Sorensen <marcus@betterservers.com>
Authored: Tue Feb 5 12:39:36 2013 -0700
Committer: Marcus Sorensen <marcus@betterservers.com>
Committed: Tue Feb 5 12:39:36 2013 -0700

----------------------------------------------------------------------
 .../kvm/resource/LibvirtComputingResource.java     |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3535f88d/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 d3a4a22..88c3aff 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
@@ -1429,6 +1429,8 @@ ServerResource {
             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);
             }
 
             s_logger.debug("got to the stage where we execute the volume resize, params:"



Mime
View raw message