cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject git commit: updated refs/heads/4.5 to 3a36681
Date Mon, 01 Dec 2014 20:27:26 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.5 bf9e1ae7e -> 3a36681b6


Fixed root disk resize on deploy for RBD.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
(cherry picked from commit 3a52a83faeaa72a8488b2db1253fef6d3308d708)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java


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

Branch: refs/heads/4.5
Commit: 3a36681b6edbf317ef75ca96acb24522ca341556
Parents: bf9e1ae
Author: Logan Barfield <lbarfield@tqhosting.com>
Authored: Thu Oct 30 16:18:52 2014 -0400
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Tue Dec 2 01:56:37 2014 +0530

----------------------------------------------------------------------
 .../cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java   | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3a36681b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
index ea3e1d6..86176d2 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
@@ -1080,6 +1080,13 @@ public class LibvirtStorageAdaptor implements StorageAdaptor {
 
                         rbd.clone(template.getName(), this.rbdTemplateSnapName, io, disk.getName(),
this.rbdFeatures, this.rbdOrder);
                         s_logger.debug("Succesfully cloned " + template.getName() + "@" +
this.rbdTemplateSnapName + " to " + disk.getName());
+                        /* We also need to resize the image if the VM was deployed with a
larger root disk size */
+                        if (disk.getVirtualSize() > template.getVirtualSize()) {
+                            RbdImage diskImage = rbd.open(disk.getName());
+                            diskImage.resize(disk.getVirtualSize());
+                            rbd.close(diskImage);
+                            s_logger.debug("Resized " + disk.getName() + " to " + disk.getVirtualSize());
+                        }
                     }
 
                     rbd.close(srcImage);


Mime
View raw message