diff --git a/scheduler/stack.go b/scheduler/stack.go index 71f65eadb45..cf01c2992af 100644 --- a/scheduler/stack.go +++ b/scheduler/stack.go @@ -1,7 +1,6 @@ package scheduler import ( - "fmt" "math" "time" @@ -271,8 +270,8 @@ func NewSystemStack(sysbatch bool, ctx Context) *SystemStack { enablePreemption = schedConfig.PreemptionConfig.SystemSchedulerEnabled } } - fmt.Println("enable Preemption:", enablePreemption) + // Create binpack iterator s.binPack = NewBinPackIterator(ctx, rankSource, enablePreemption, 0, schedulerAlgorithm) // Apply score normalization diff --git a/scheduler/system_sched.go b/scheduler/system_sched.go index a691d02e9c8..52844142ba1 100644 --- a/scheduler/system_sched.go +++ b/scheduler/system_sched.go @@ -23,7 +23,7 @@ const ( // SystemScheduler is used for 'system' and 'sysbatch' jobs. This scheduler is // designed for jobs that should be run on every client. The 'system' mode // will ensure those jobs continuously run regardless of successful task exits, -// whereas 'sysbatch' marks the task complete on success. +// whereas 'sysbatch' considers the task complete on success. type SystemScheduler struct { logger log.Logger state State diff --git a/scheduler/system_sysbatch_test.go b/scheduler/system_sysbatch_test.go index a2a72218453..e5d9791b1e2 100644 --- a/scheduler/system_sysbatch_test.go +++ b/scheduler/system_sysbatch_test.go @@ -1186,12 +1186,12 @@ func TestSysBatch_PlanWithDrainedNode(t *testing.T) { node := mock.Node() node.NodeClass = "green" node.Drain = true - node.ComputeClass() + require.NoError(t, node.ComputeClass()) require.NoError(t, h.State.UpsertNode(structs.MsgTypeTestSetup, h.NextIndex(), node)) node2 := mock.Node() node2.NodeClass = "blue" - node2.ComputeClass() + require.NoError(t, node2.ComputeClass()) require.NoError(t, h.State.UpsertNode(structs.MsgTypeTestSetup, h.NextIndex(), node2)) // Create a sysbatch job with two task groups, each constrained on node class