mirror of https://github.com/apache/cloudstack.git
Fixed the NPE at RecreateHostAllocator found when a Pod with no cluster was present in the system.
This commit is contained in:
parent
47db8c2c59
commit
8da874ca0b
|
|
@ -116,7 +116,7 @@ public class RecreateHostAllocator extends FirstFitRoutingAllocator {
|
|||
}
|
||||
|
||||
for (PodCluster p : pcs) {
|
||||
long clusterId = p.getCluster() == null ? null : p.getCluster().getId();
|
||||
Long clusterId = p.getCluster() == null ? null : p.getCluster().getId();
|
||||
DataCenterDeployment newPlan = new DataCenterDeployment(plan.getDataCenterId(), p.getPod().getId(), clusterId, null);
|
||||
hosts = super.allocateTo(vm, newPlan, type, avoid, returnUpTo);
|
||||
if (hosts != null && !hosts.isEmpty()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue