cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edi...@apache.org
Subject [24/28] git commit: updated refs/heads/4.4 to 392dc81
Date Fri, 28 Mar 2014 00:39:33 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/b2f49394
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b2f49394
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b2f49394

Branch: refs/heads/4.4
Commit: b2f4939402b8c657a0b6d890b275f8bc97e4b15b
Parents: 36efe4d
Author: edison <sudison@gmail.com>
Authored: Mon Jan 13 14:55:47 2014 -0800
Committer: Edison Su <sudison@gmail.com>
Committed: Thu Mar 27 17:38:40 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/b2f49394/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/b2f49394/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 5de8bd2..b6d527d 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
@@ -612,7 +612,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/b2f49394/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