Fix premature scheduling loop exit

The loop was exiting when finding a BMH which can't be scheduled
due to anti affinity rules, which was preventing any subsequent BMHs
from being scheduled.

Signed-off-by: Sean Eagan <seaneagan1@gmail.com>
Change-Id: Ifedb144f02a035e5a94df717d48eb6f3f9ebabc5
This commit is contained in:
Sean Eagan
2021-02-25 15:24:26 -06:00
parent 68fe3686fa
commit 940a60da0c

View File

@@ -353,7 +353,7 @@ func (ml *MachineList) scheduleIt(nodeRole airshipv1.VMRole, nodeCfg airshipv1.N
// If its in the list already for the constraint , theen this bmh is disqualified. Skip it // If its in the list already for the constraint , theen this bmh is disqualified. Skip it
if scheduleSet.Exists(bmhConstraintCondition) { if scheduleSet.Exists(bmhConstraintCondition) {
logger.Info("Constraint slot is alrady taken some BMH from this constraint is already allocated, skipping it") logger.Info("Constraint slot is alrady taken some BMH from this constraint is already allocated, skipping it")
break continue
} else { } else {
scheduleSet.Add(bmhConstraintCondition) scheduleSet.Add(bmhConstraintCondition)
} }