daemon: kill: use log level to "warn" if container doesn't exit in time
I noticed this log being logged as an error, but the kill logic actually proceeds after this (doing a "direct" kill instead). While usually containers are expected to be exiting within the given timeout, I don't think this needs to be logged as an error (an error is returned after we fail to kill the container). Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
5dde37c846
commit
61d8f57f2a
1 changed files with 1 additions and 1 deletions
|
@ -171,7 +171,7 @@ func (daemon *Daemon) Kill(container *containerpkg.Container) error {
|
|||
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 errors.As(err, &errNoSuchProcess{}) {
|
||||
|
|
Loading…
Add table
Reference in a new issue