cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anthon...@apache.org
Subject [19/27] git commit: updated refs/heads/master to d4d5cab
Date Fri, 28 Mar 2014 23:35:26 GMT
CLOUDSTACK-5857: for some reasons, delete secondary pool failed during copy template from secondary
storage to primary storage, but the volume is already copied to primary storage, we didn't
clean up the volume on primary storage, then all the following copy the same template to primary
storage failed, as we are always using the same uuid when creating a new volume, libvirt complaining
that the volume already exists.
Current fix is ignoring "the delete secondary storage error".


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

Branch: refs/heads/master
Commit: d1d855fef475816c68972debeea0fda0dc33734c
Parents: d4c7574
Author: edison <sudison@gmail.com>
Authored: Mon Jan 13 14:55:47 2014 -0800
Committer: Anthony Xu <anthony.xu@citrix.com>
Committed: Fri Mar 28 16:23:34 2014 -0700

----------------------------------------------------------------------
 .../cloud/hypervisor/kvm/storage/KVMStorageProcessor.java    | 8 ++++++--
 .../cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java  | 2 +-
 .../com/cloud/hypervisor/kvm/storage/LibvirtStoragePool.java | 7 ++++++-
 3 files changed, 13 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d1d855fe/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
index a47b2ca..604bdae 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
@@ -242,8 +242,12 @@ public class KVMStorageProcessor implements StorageProcessor {
         } catch (CloudRuntimeException e) {
             return new CopyCmdAnswer(e.toString());
         } finally {
-            if (secondaryPool != null) {
-                secondaryPool.delete();
+            try {
+                if (secondaryPool != null) {
+                    secondaryPool.delete();
+                }
+            } catch(Exception e) {
+                s_logger.debug("Failed to clean up secondary storage", e);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d1d855fe/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 c1a5043..a85a64f 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
@@ -609,7 +609,7 @@ public class LibvirtStorageAdaptor implements StorageAdaptor {
                 }
                 s_logger.error("failed in umount retry");
             }
-            throw new CloudRuntimeException(e.toString());
+            throw new CloudRuntimeException(e.toString(), e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d1d855fe/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStoragePool.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStoragePool.java
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStoragePool.java
index 54edffc..936ccf7 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStoragePool.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStoragePool.java
@@ -249,7 +249,12 @@ public class LibvirtStoragePool implements KVMStoragePool {
 
     @Override
     public boolean delete() {
-        return this._storageAdaptor.deleteStoragePool(this);
+        try {
+            return this._storageAdaptor.deleteStoragePool(this);
+        } catch (Exception e) {
+            s_logger.debug("Failed to delete storage pool", e);
+        }
+        return false;
     }
 
     @Override


Mime
View raw message