Merge pull request #4425 from liubin/fix/4376-change-log-level-of-getoomevent

shim: change the log level for GetOOMEvent call failures
This commit is contained in:
Bin Liu 2022-06-13 17:53:11 +08:00 committed by GitHub
commit 81acfc1286
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -158,10 +158,10 @@ func watchOOMEvents(ctx context.Context, s *service) {
containerID, err := s.sandbox.GetOOMEvent(ctx)
if err != nil {
if err.Error() == "ttrpc: closed" || err.Error() == "Dead agent" {
shimLog.WithError(err).Warn("agent has shutdown, return from watching of OOM events")
shimLog.WithError(err).Info("agent has shutdown, return from watching of OOM events")
return
}
shimLog.WithError(err).Warn("failed to get OOM event from sandbox")
shimLog.WithError(err).Info("failed to get OOM event from sandbox")
time.Sleep(defaultCheckInterval)
continue
}