cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sanjaytripa...@apache.org
Subject [1/2] git commit: updated refs/heads/4.3 to 1ee3612
Date Fri, 27 Dec 2013 10:52:06 GMT
Updated Branches:
  refs/heads/4.3 029f4e36a -> 1ee3612ad


CLOUDSTACK-4402: [deleteStoragePool] There is no way to delete Primary storage if the last
host with which it was associated is already removed.


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

Branch: refs/heads/4.3
Commit: 1ee3612adad8e10a6dd089fda1f07256b813c211
Parents: 526043b
Author: Sanjay Tripathi <sanjay.tripathi@citrix.com>
Authored: Thu Dec 19 17:34:26 2013 +0530
Committer: Sanjay Tripathi <sanjay.tripathi@citrix.com>
Committed: Fri Dec 27 16:15:00 2013 +0530

----------------------------------------------------------------------
 .../lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java       | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1ee3612a/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java
----------------------------------------------------------------------
diff --git a/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java
b/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java
index b304a00..3933915 100644
--- a/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java
+++ b/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java
@@ -473,8 +473,6 @@ public class CloudStackPrimaryDataStoreLifeCycleImpl implements PrimaryDataStore
         HypervisorType hType = null;
         if(hostPoolRecords.size() > 0 ){
             hType = getHypervisorType(hostPoolRecords.get(0).getHostId());
-        } else {
-            return false;
         }
 
         // Remove the SR associated with the Xenserver
@@ -495,7 +493,7 @@ public class CloudStackPrimaryDataStoreLifeCycleImpl implements PrimaryDataStore
             }
         }
 
-        if (!deleteFlag) {
+        if (!hostPoolRecords.isEmpty() && !deleteFlag) {
             throw new CloudRuntimeException("Failed to delete storage pool on host");
         }
 


Mime
View raw message