cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wid...@apache.org
Subject [2/2] git commit: updated refs/heads/rbd-snap-clone to 76eca22
Date Wed, 15 May 2013 11:01:26 GMT
rbd: Add more debugging log lines to show what is happening


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

Branch: refs/heads/rbd-snap-clone
Commit: 76eca22f551a2c71fa382a63ee21c52ac9576aa4
Parents: 5b1a3f2
Author: Wido den Hollander <wido@widodh.nl>
Authored: Wed May 15 13:00:27 2013 +0200
Committer: Wido den Hollander <wido@widodh.nl>
Committed: Wed May 15 13:00:27 2013 +0200

----------------------------------------------------------------------
 .../kvm/storage/LibvirtStorageAdaptor.java         |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/76eca22f/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 58c6ea6..b18e6a4 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
@@ -731,11 +731,10 @@ public class LibvirtStorageAdaptor implements StorageAdaptor {
                             s_logger.debug("Trying to perform a RBD clone (layering) since
we are operating in the same storage pool");
    
                             Rados r = new Rados(srcPool.getAuthUserName());
-                            String mon_host = srcPool.getSourceHost() + ":" + srcPool.getSourcePort();
-                            r.confSet("mon_host", mon_host);
+                            r.confSet("mon_host", srcPool.getSourceHost() + ":" + srcPool.getSourcePort());
                             r.confSet("key", srcPool.getAuthSecret());
                             r.connect();
-                            s_logger.debug("Succesfully connected to Ceph cluster at " +
mon_host);
+                            s_logger.debug("Succesfully connected to Ceph cluster at " +
r.confGet("mon_host"));
 
                             IoCTX io = r.ioCtxCreate(srcPool.getSourceDir());
                             Rbd rbd = new Rbd(io);
@@ -743,18 +742,21 @@ public class LibvirtStorageAdaptor implements StorageAdaptor {
 
                             if (srcImage.isOldFormat()) {
                                 /* The source image is RBD format 1, we have to do a regular
copy */
-                                s_logger.debug("The source image " + template.getName() +
" is RBD format 1. We have to perform a regular copy");
+                                s_logger.debug("The source image " + srcPool.getSourceDir()
+ "/" + template.getName()
+                                               + " is RBD format 1. We have to perform a
regular copy (" + template.getVirtualSize() + " bytes)");
 
                                 rbd.create(disk.getName(), template.getVirtualSize(), rbdFeatures,
rbdOrder);
                                 RbdImage destImage = rbd.open(disk.getName());
 
                                 s_logger.debug("Starting to copy " + srcImage.getName() +
 " to " + destImage.getName() + " in Ceph pool " + srcPool.getSourceDir());
                                 rbd.copy(srcImage, destImage);
+
                                 s_logger.debug("Finished copying " + srcImage.getName() +
 " to " + destImage.getName() + " in Ceph pool " + srcPool.getSourceDir());
                                 rbd.close(destImage);
                             } else {
-                                s_logger.debug("The source image " + template.getName() +
" is RBD format 2. We will perform a RBD clone using snapshot "
-                                                + this.rbdTemplateSnapName);
+                                s_logger.debug("The source image " + srcPool.getSourceDir()
+ "/" + template.getName()
+                                               + " is RBD format 2. We will perform a RBD
clone using snapshot "
+                                               + this.rbdTemplateSnapName);
                                 /* The source image is format 2, we can do a RBD snapshot+clone
(layering) */
                                 rbd.clone(template.getName(), this.rbdTemplateSnapName, io,
disk.getName(), rbdFeatures, rbdOrder);
                                 s_logger.debug("Succesfully cloned " + template.getName()
+ "@" + this.rbdTemplateSnapName + " to " + disk.getName());


Mime
View raw message