mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-3488: listStoragePools throws NPE if any of the storage pools are not in the right state.
This issue is reporducible if user adds a primary storage and quickly fires listStoragePool API command without waiting for the responce of previous createStoragePool API command. So during this period (before receiving createStoragePool API resonce), the primary srorage is in initialized status and the "scope" of storage is not set.
This commit is contained in:
parent
c0ea76a77e
commit
13fc4690fc
|
|
@ -75,7 +75,9 @@ public class StoragePoolJoinDaoImpl extends GenericDaoBase<StoragePoolJoinVO, Lo
|
|||
poolResponse.setPodId(pool.getPodUuid());
|
||||
poolResponse.setPodName(pool.getPodName());
|
||||
poolResponse.setCreated(pool.getCreated());
|
||||
poolResponse.setScope(pool.getScope().toString());
|
||||
if (pool.getScope() != null) {
|
||||
poolResponse.setScope(pool.getScope().toString());
|
||||
}
|
||||
if (pool.getHypervisor() != null) {
|
||||
poolResponse.setHypervisor(pool.getHypervisor().toString());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue