mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
fn: reduce logging for evicted containers (#1276)
Let's not log evicted containers which would be context canceled.
This commit is contained in:
@@ -399,7 +399,7 @@ func (a *agent) hotLauncher(ctx context.Context, call *call) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
logger := common.Logger(ctx)
|
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
|
// IMPORTANT: get a context that has a child span / logger but NO timeout
|
||||||
// TODO this is a 'FollowsFrom'
|
// TODO this is a 'FollowsFrom'
|
||||||
@@ -421,7 +421,7 @@ func (a *agent) hotLauncher(ctx context.Context, call *call) {
|
|||||||
case <-ctx.Done(): // timed out
|
case <-ctx.Done(): // timed out
|
||||||
cancel()
|
cancel()
|
||||||
if a.slotMgr.deleteSlotQueue(call.slots) {
|
if a.slotMgr.deleteSlotQueue(call.slots) {
|
||||||
logger.Info("Hot function launcher timed out")
|
logger.Debug("Hot function launcher timed out")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
case notifyChan = <-call.slots.signaller:
|
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 {
|
if res.Error() != nil {
|
||||||
errC <- res.Error() // TODO: race condition, no guaranteed delivery fix this...
|
errC <- res.Error() // TODO: race condition, no guaranteed delivery fix this...
|
||||||
}
|
}
|
||||||
|
if res.Error() != context.Canceled {
|
||||||
logger.WithError(res.Error()).Info("hot function terminated")
|
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
|
//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
|
||||||
|
|||||||
Reference in New Issue
Block a user