Skip to content

Commit

Permalink
wip slkjf
Browse files Browse the repository at this point in the history
  • Loading branch information
shoenig committed Nov 2, 2020
1 parent 356a1dd commit e79b77a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions scheduler/stack.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package scheduler

import (
"fmt"
"math"
"time"

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scheduler/system_sched.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions scheduler/system_sysbatch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e79b77a

Please sign in to comment.