Skip to content

Commit

Permalink
Fix Bug with getCapacityForPool (#3979)
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Martin <chris@cmartinit.co.uk>
  • Loading branch information
d80tb7 authored Oct 2, 2024
1 parent 85e1699 commit 14b76c7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/scheduler/scheduling/scheduling_algo.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,9 @@ func (l *FairSchedulingAlgo) getCapacityForPool(pool string, executors []*schedu
totalCapacity := schedulerobjects.ResourceList{}
for _, executor := range executors {
for _, node := range executor.Nodes {
totalCapacity.Add(node.TotalResources)
if node.Pool == pool {
totalCapacity.Add(node.TotalResources)
}
}
}
totalCapacity.Add(l.floatingResourceTypes.GetTotalAvailableForPool(pool))
Expand Down

0 comments on commit 14b76c7

Please sign in to comment.