Skip to content

fix double counting when AWs dont have any pods running #415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Jun 28, 2023
Merged
5 changes: 4 additions & 1 deletion pkg/controller/queuejob/queuejob_controller_ex.go
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,10 @@ func (qjm *XController) getAggregatedAvailableResourcesPriority(unallocatedClust
}
for _, genericItem := range value.Spec.AggrResources.GenericItems {
qjv, _ := genericresource.GetResources(&genericItem)
preemptable = preemptable.Add(qjv)
//only add resources when AWs are truly running
if value.Status.State == arbv1.AppWrapperStateActive && value.Status.QueueJobState == arbv1.AppWrapperConditionType(arbv1.AppWrapperStateActive) {
preemptable = preemptable.Add(qjv)
}
}

continue
Expand Down