From 940a60da0c5ea38abaf74559effcf7aa53e19df3 Mon Sep 17 00:00:00 2001 From: Sean Eagan Date: Thu, 25 Feb 2021 15:24:26 -0600 Subject: [PATCH] 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 Change-Id: Ifedb144f02a035e5a94df717d48eb6f3f9ebabc5 --- pkg/vbmh/machines.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/vbmh/machines.go b/pkg/vbmh/machines.go index 53d3c47..51b56f4 100644 --- a/pkg/vbmh/machines.go +++ b/pkg/vbmh/machines.go @@ -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 scheduleSet.Exists(bmhConstraintCondition) { logger.Info("Constraint slot is alrady taken some BMH from this constraint is already allocated, skipping it") - break + continue } else { scheduleSet.Add(bmhConstraintCondition) }