Skip to content

Commit

Permalink
Merge pull request #6849 from hashicorp/b-debug-preemption
Browse files Browse the repository at this point in the history
Use debug logging for scheduler internals
  • Loading branch information
preetapan committed Dec 12, 2019
2 parents ba1e66c + be897ca commit 37d421e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions scheduler/rank.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ OUTER:

netPreemptions := preemptor.PreemptForNetwork(ask, netIdx)
if netPreemptions == nil {
iter.ctx.Logger().Named("binpack").Error("preemption not possible ", "network_resource", ask)
iter.ctx.Logger().Named("binpack").Debug("preemption not possible ", "network_resource", ask)
netIdx.Release()
continue OUTER
}
Expand All @@ -260,7 +260,7 @@ OUTER:

offer, err = netIdx.AssignNetwork(ask)
if offer == nil {
iter.ctx.Logger().Named("binpack").Error("unexpected error, unable to create network offer after considering preemption", "error", err)
iter.ctx.Logger().Named("binpack").Debug("unexpected error, unable to create network offer after considering preemption", "error", err)
netIdx.Release()
continue OUTER
}
Expand Down Expand Up @@ -307,7 +307,7 @@ OUTER:

netPreemptions := preemptor.PreemptForNetwork(ask, netIdx)
if netPreemptions == nil {
iter.ctx.Logger().Named("binpack").Error("preemption not possible ", "network_resource", ask)
iter.ctx.Logger().Named("binpack").Debug("preemption not possible ", "network_resource", ask)
netIdx.Release()
continue OUTER
}
Expand All @@ -324,7 +324,7 @@ OUTER:

offer, err = netIdx.AssignNetwork(ask)
if offer == nil {
iter.ctx.Logger().Named("binpack").Error("unexpected error, unable to create network offer after considering preemption", "error", err)
iter.ctx.Logger().Named("binpack").Debug("unexpected error, unable to create network offer after considering preemption", "error", err)
netIdx.Release()
continue OUTER
}
Expand Down Expand Up @@ -352,7 +352,7 @@ OUTER:
devicePreemptions := preemptor.PreemptForDevice(req, devAllocator)

if devicePreemptions == nil {
iter.ctx.Logger().Named("binpack").Error("preemption not possible", "requested_device", req)
iter.ctx.Logger().Named("binpack").Debug("preemption not possible", "requested_device", req)
netIdx.Release()
continue OUTER
}
Expand All @@ -368,7 +368,7 @@ OUTER:
// Try offer again
offer, sumAffinities, err = devAllocator.AssignDevice(req)
if offer == nil {
iter.ctx.Logger().Named("binpack").Error("unexpected error, unable to create device offer after considering preemption", "error", err)
iter.ctx.Logger().Named("binpack").Debug("unexpected error, unable to create device offer after considering preemption", "error", err)
continue OUTER
}
}
Expand Down
2 changes: 1 addition & 1 deletion scheduler/spread.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func (iter *SpreadIterator) Next() *RankedNode {
usedCount += 1
// Set score to -1 if there were errors in building this attribute
if errorMsg != "" {
iter.ctx.Logger().Named("spread").Warn("error building spread attributes for task group", "task_group", tgName, "error", errorMsg)
iter.ctx.Logger().Named("spread").Debug("error building spread attributes for task group", "task_group", tgName, "error", errorMsg)
totalSpreadScore -= 1.0
continue
}
Expand Down

0 comments on commit 37d421e

Please sign in to comment.