You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by de...@apache.org on 2013/07/29 14:05:20 UTC

git commit: updated refs/heads/master to d06a5bc

Updated Branches:
  refs/heads/master 97424e295 -> d06a5bc5f


CLOUDSTACK-3890. Delting the storage pool is not getting from xenserver. The
storage pool entry was removed from the db but the pool wasn't unmounted from
the host. There was a check that if the pool is not in UP state then the entry
can just be removed. That is wrong. A pool can only be removed if it is in
maintenance state. So after putting the pool in maintenance state if admin
tries to delete the pool we just remove the db entry without un-mounting the
storage pool from the host. Removed the incorrect check.


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

Branch: refs/heads/master
Commit: d06a5bc5f0ad2f7aa564b96f11bd29c542081a74
Parents: 97424e2
Author: Devdeep Singh <de...@gmail.com>
Authored: Mon Jul 29 17:20:56 2013 +0530
Committer: Devdeep Singh <de...@gmail.com>
Committed: Mon Jul 29 17:26:55 2013 +0530

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d06a5bc5/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 17e80b8..2c8c871 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
@@ -439,10 +439,7 @@ public class CloudStackPrimaryDataStoreLifeCycleImpl implements PrimaryDataStore
         List<StoragePoolHostVO> hostPoolRecords = this._storagePoolHostDao.listByPoolId(store.getId());
         StoragePool pool = (StoragePool) store;
         boolean deleteFlag = false;
-        // If datastore is not in ready state, simply delete its db entry.
-        if (pool.getStatus() != StoragePoolStatus.Up) {
-            return this.dataStoreHelper.deletePrimaryDataStore(store);
-        }
+
         // Remove the SR associated with the Xenserver
         for (StoragePoolHostVO host : hostPoolRecords) {
             DeleteStoragePoolCommand deleteCmd = new DeleteStoragePoolCommand(pool);