Skip to content

Commit 9e57c29

Browse files
authored
Make calculation of idealised share metrics only log warning on error (#4568)
Instead of erroring out the scheduling algo when the idealised share metrics fail to calculate, now we just log a warning The idealised share code only calculates some non-critical metrics, so we shouldn't stop scheduling just because they aren't being calculated Signed-off-by: JamesMurkin <[email protected]>
1 parent 7afdcce commit 9e57c29

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

internal/scheduler/scheduling/scheduling_algo.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ func (l *FairSchedulingAlgo) SchedulePool(
565565
if err != nil {
566566
return nil, nil, err
567567
}
568-
err = CalculateIdealisedValue(
568+
idealisedShareErr := CalculateIdealisedValue(
569569
ctx,
570570
fsctx.schedulingContext,
571571
nodes,
@@ -576,8 +576,8 @@ func (l *FairSchedulingAlgo) SchedulePool(
576576
l.resourceListFactory,
577577
resourceUnit,
578578
)
579-
if err != nil {
580-
return nil, nil, err
579+
if idealisedShareErr != nil {
580+
log.Warnf("failed to calculated idealised share for pool %s - %s", fsctx.pool, idealisedShareErr)
581581
}
582582

583583
scheduler := NewPreemptingQueueScheduler(

0 commit comments

Comments
 (0)