From e79b77a0bef16a12e53f92e732652050c6af8095 Mon Sep 17 00:00:00 2001 From: Seth Hoenig Date: Mon, 2 Nov 2020 08:51:18 -0600 Subject: [PATCH] wip slkjf --- scheduler/stack.go | 3 +-- scheduler/system_sched.go | 2 +- scheduler/system_sysbatch_test.go | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/scheduler/stack.go b/scheduler/stack.go index 71f65eadb457..cf01c2992afe 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 a691d02e9c81..52844142ba1d 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 a2a722184536..e5d9791b1e21 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