mirror of https://github.com/apache/cloudstack.git
Fix a NPE in AbstractStoragePoolAllocator.java when creating standalone volume
This commit is contained in:
parent
72e8b767fe
commit
2337a9d99f
|
|
@ -146,9 +146,11 @@ public abstract class AbstractStoragePoolAllocator extends AdapterBase implement
|
|||
}
|
||||
|
||||
/*hypervisor type is correct*/
|
||||
// TODO : when creating a standalone volume, offering is passed as NULL, need to
|
||||
// refine the logic of checking hypervisorType based on offering info
|
||||
Long clusterId = pool.getClusterId();
|
||||
ClusterVO cluster = _clusterDao.findById(clusterId);
|
||||
if (!cluster.getHypervisorType().equalsIgnoreCase(offering.gethypervisorType())) {
|
||||
if (offering != null && !cluster.getHypervisorType().equalsIgnoreCase(offering.gethypervisorType())) {
|
||||
return false;
|
||||
}
|
||||
// check the used size against the total size, skip this host if it's greater than the configured
|
||||
|
|
|
|||
Loading…
Reference in New Issue