From 8fe1c9a07c26654e438fb132bc85214043ceb910 Mon Sep 17 00:00:00 2001 From: Tolga Ceylan Date: Thu, 18 Oct 2018 15:10:15 -0700 Subject: [PATCH] fn: reduce logging for evicted containers (#1276) Let's not log evicted containers which would be context canceled. --- api/agent/agent.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/api/agent/agent.go b/api/agent/agent.go index cb52f7ded..c644abe9a 100644 --- a/api/agent/agent.go +++ b/api/agent/agent.go @@ -399,7 +399,7 @@ func (a *agent) hotLauncher(ctx context.Context, call *call) { } logger := common.Logger(ctx) - logger.WithField("launcher_timeout", timeout).Info("Hot function launcher starting") + logger.WithField("launcher_timeout", timeout).Debug("Hot function launcher starting") // IMPORTANT: get a context that has a child span / logger but NO timeout // TODO this is a 'FollowsFrom' @@ -421,7 +421,7 @@ func (a *agent) hotLauncher(ctx context.Context, call *call) { case <-ctx.Done(): // timed out cancel() if a.slotMgr.deleteSlotQueue(call.slots) { - logger.Info("Hot function launcher timed out") + logger.Debug("Hot function launcher timed out") return } case notifyChan = <-call.slots.signaller: @@ -1084,8 +1084,9 @@ func (a *agent) runHot(ctx context.Context, call *call, tok ResourceToken, state if res.Error() != nil { errC <- res.Error() // TODO: race condition, no guaranteed delivery fix this... } - - logger.WithError(res.Error()).Info("hot function terminated") + if res.Error() != context.Canceled { + logger.WithError(res.Error()).Info("hot function terminated") + } } //checkSocketDestination verifies that the socket file created by the FDK is valid and permitted - notably verifying that any symlinks are relative to the socket dir