mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-2510: Getting NPE while executinng listStoragePools API command.
This commit is contained in:
parent
5e579c37fc
commit
6770c5d92d
|
|
@ -364,6 +364,7 @@ public class CloudStackPrimaryDataStoreLifeCycleImpl implements PrimaryDataStore
|
|||
List<HostVO> allHosts = _resourceMgr.listAllUpAndEnabledHosts(Host.Type.Routing, primarystore.getClusterId(),
|
||||
primarystore.getPodId(), primarystore.getDataCenterId());
|
||||
if (allHosts.isEmpty()) {
|
||||
primaryDataStoreDao.expunge(primarystore.getId());
|
||||
throw new CloudRuntimeException("No host up to associate a storage pool with in cluster "
|
||||
+ primarystore.getClusterId());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue