mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-7752: Fixed deployment planner stuck in infinite loop. If we create VM with shared service offering and attach disk with local disk offering, and one of storage pool is full(cannot be allocated) and other is not full then we are not putting the cluster in avoid list which is causing this infinite loop.
Fixed by putting the cluster in avoid list even if one of the storage pool is full(cannot be allocated) Signed-off-by: Daan Hoogland <daan@onecht.net>
This commit is contained in:
parent
e6d00bcc66
commit
14e048dada
|
|
@ -950,7 +950,10 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements Deploy
|
|||
|
||||
// if all hosts or all pools in the cluster are in avoid set after this
|
||||
// pass, then put the cluster in avoid set.
|
||||
boolean avoidAllHosts = true, avoidAllPools = true;
|
||||
boolean avoidAllHosts = true;
|
||||
boolean avoidAllPools = true;
|
||||
boolean avoidAllLocalPools = true;
|
||||
boolean avoidAllSharedPools = true;
|
||||
|
||||
List<HostVO> allhostsInCluster = _hostDao.listAllUpAndEnabledNonHAHosts(Host.Type.Routing, clusterVO.getId(),
|
||||
clusterVO.getPodId(), clusterVO.getDataCenterId(), null);
|
||||
|
|
@ -985,7 +988,7 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements Deploy
|
|||
for (StoragePoolVO pool : allPoolsInCluster) {
|
||||
if (!allocatorAvoidOutput.shouldAvoid(pool)) {
|
||||
// there's some pool in the cluster that is not yet in avoid set
|
||||
avoidAllPools = false;
|
||||
avoidAllSharedPools = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -999,11 +1002,19 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements Deploy
|
|||
if (!allocatorAvoidOutput.shouldAvoid(pool)) {
|
||||
// there's some pool in the cluster that is not yet
|
||||
// in avoid set
|
||||
avoidAllPools = false;
|
||||
avoidAllLocalPools = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (vmRequiresSharedStorage && vmRequiresLocalStorege) {
|
||||
avoidAllPools = (avoidAllLocalPools || avoidAllSharedPools) ? true : false;
|
||||
} else if (vmRequiresSharedStorage) {
|
||||
avoidAllPools = avoidAllSharedPools;
|
||||
} else if (vmRequiresLocalStorege) {
|
||||
avoidAllPools = avoidAllLocalPools;
|
||||
}
|
||||
}
|
||||
|
||||
if (avoidAllHosts || avoidAllPools) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue