Merge pull request #46867 from thaJeztah/log_info

daemon: kill: use log level to "warn" if container doesn't exit in time
This commit is contained in:
Sebastiaan van Stijn 2023-11-30 14:41:32 +01:00 committed by GitHub
commit c8b9dfb25e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -171,7 +171,7 @@ func (daemon *Daemon) Kill(container *containerpkg.Container) error {
return nil return nil
} }
log.G(ctx).WithError(status.Err()).WithField("container", container.ID).Errorf("Container failed to exit within %v of kill - trying direct SIGKILL", waitTimeout) log.G(ctx).WithFields(log.Fields{"error": status.Err(), "container": container.ID}).Warnf("Container failed to exit within %v of kill - trying direct SIGKILL", waitTimeout)
if err := killProcessDirectly(container); err != nil { if err := killProcessDirectly(container); err != nil {
if errors.As(err, &errNoSuchProcess{}) { if errors.As(err, &errNoSuchProcess{}) {