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
b466729008
commit
f4eab352e0
|
|
@ -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