Skip to content

Commit

Permalink
stats_hook: log normal shutdown condition as debug, not error (#8028)
Browse files Browse the repository at this point in the history
The `stats_hook` writes an Error log every time an allocation becomes
terminal. This is a normal condition, not an error. A real error
condition like a failure to collect the stats is logged later. It just
creates log noise, and this is a particularly bad operator experience
for heavy batch workloads.
  • Loading branch information
tgross committed May 27, 2020
1 parent 72f500a commit 08d926a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/allocrunner/taskrunner/stats_hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ MAIN:
// check if the error is terminal otherwise it's likely a
// transport error and we should retry
if re, ok := err.(*structs.RecoverableError); ok && re.IsUnrecoverable() {
h.logger.Error("failed to start stats collection for task with unrecoverable error", "error", err)
h.logger.Debug("failed to start stats collection for task with unrecoverable error", "error", err)
return nil, err
}

Expand Down

0 comments on commit 08d926a

Please sign in to comment.