diff --git a/pkg/scheduler/core/instancegroup_select.go b/pkg/scheduler/core/instancegroup_select.go index 82337a23ad..8df94e1393 100644 --- a/pkg/scheduler/core/instancegroup_select.go +++ b/pkg/scheduler/core/instancegroup_select.go @@ -107,7 +107,8 @@ func sortHosts(hosts []*sSchedResultItem, guestInfo *sGuestInfo, isBackup *bool) } sortIndexi[1], sortIndexj[1] = hosts[i].Count, hosts[j].Count sortIndexi[2], sortIndexj[2] = -(hosts[i].minInstanceGroupCapacity(guestInfo.instanceGroupsDetail)), -(hosts[j].minInstanceGroupCapacity(guestInfo.instanceGroupsDetail)) - sortIndexi[3], sortIndexj[3] = scoreNormalization(hosts[i].Score, hosts[j].Score) + iScore, jScore := scoreNormalization(hosts[i].Score, hosts[j].Score) + sortIndexi[3], sortIndexj[3] = -iScore, -jScore sortIndexi[4], sortIndexj[4] = -(hosts[i].Capacity), -(hosts[j].Capacity) for i := 0; i < 5; i++ { if sortIndexi[i] == sortIndexj[i] {