From 08d926a9b3316c41d7836530128093f36793193e Mon Sep 17 00:00:00 2001 From: Tim Gross Date: Wed, 20 May 2020 10:28:30 -0400 Subject: [PATCH] stats_hook: log normal shutdown condition as debug, not error (#8028) 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. --- client/allocrunner/taskrunner/stats_hook.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/allocrunner/taskrunner/stats_hook.go b/client/allocrunner/taskrunner/stats_hook.go index 4dee3315cf8..72f422ea2e8 100644 --- a/client/allocrunner/taskrunner/stats_hook.go +++ b/client/allocrunner/taskrunner/stats_hook.go @@ -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 }