From b3b07b96266c71c1a629185e9ee00b6ac9f92d96 Mon Sep 17 00:00:00 2001 From: JamesMurkin Date: Fri, 15 Nov 2024 12:25:45 +0000 Subject: [PATCH] Fix preemption reason - fairshare preemption (#4045) We were incorrectly resetting the PreemptingJobId, which shouldn't get reset The UnschedulableReason is only reset as we try scheduling the jobs several times, during these rounds the jobs we're scheduling cannot be preempted - so it makes no sense to reset their PreemptingJobId This makes it so we now correct populate the preemption reason for fairshare preemption Signed-off-by: JamesMurkin --- internal/scheduler/nodedb/nodedb.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/scheduler/nodedb/nodedb.go b/internal/scheduler/nodedb/nodedb.go index 336ca0de314..ba74a66fc8d 100644 --- a/internal/scheduler/nodedb/nodedb.go +++ b/internal/scheduler/nodedb/nodedb.go @@ -340,7 +340,6 @@ func (nodeDb *NodeDb) ScheduleManyWithTxn(txn *memdb.Txn, gctx *context.GangSche // order to find the best fit for this gang); clear out any remnants of // previous attempts. jctx.UnschedulableReason = "" - jctx.PreemptingJobId = "" node, err := nodeDb.SelectNodeForJobWithTxn(txn, jctx) if err != nil {