Skip to content

Commit 7cc82db

Browse files
author
Mice Xia
committed
Fix CLOUDSTACK-2062 NPE while deleting the primary storage[Added with scope=cluster]
1 parent 167781e commit 7cc82db

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,8 +532,7 @@ public boolean deleteDataStore(DataStore store) {
532532
throw new CloudRuntimeException("Failed to delete storage pool on host");
533533
}
534534

535-
this.dataStoreHelper.deletePrimaryDataStore(store);
536-
return false;
535+
return this.dataStoreHelper.deletePrimaryDataStore(store);
537536
}
538537

539538
@Override

server/src/com/cloud/storage/StorageManagerImpl.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -963,9 +963,7 @@ public boolean deletePool(DeletePoolCmd cmd) {
963963
DataStoreLifeCycle lifeCycle = storeProvider.getDataStoreLifeCycle();
964964
DataStore store = dataStoreMgr.getDataStore(
965965
sPool.getId(), DataStoreRole.Primary);
966-
lifeCycle.deleteDataStore(store);
967-
968-
return false;
966+
return lifeCycle.deleteDataStore(store);
969967
}
970968

971969
@Override

0 commit comments

Comments
 (0)