From d15ce134efadeb7cc3b370de6acfbb7accfb691b Mon Sep 17 00:00:00 2001 From: Cam Date: Tue, 8 Jun 2021 13:29:57 -0700 Subject: [PATCH] Fix log statement 'failed to exit' timeout accuracy log statement should reflect how long it actually waited, not how long it theoretically could wait based on the 'seconds' integer passed in. Signed-off-by: Cam --- daemon/stop.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/stop.go b/daemon/stop.go index ce0ff08e7d..5d4c214004 100644 --- a/daemon/stop.go +++ b/daemon/stop.go @@ -83,7 +83,7 @@ func (daemon *Daemon) containerStop(container *containerpkg.Container, seconds i return err } - logrus.WithField("container", container.ID).Infof("Container failed to exit within %d seconds of signal %d - using the force", seconds, stopSignal) + logrus.WithField("container", container.ID).Infof("Container failed to exit within %s of signal %d - using the force", wait, stopSignal) // Stop either failed or container didnt exit, so fallback to kill. if err := daemon.Kill(container); err != nil { // got a kill error, but give container 2 more seconds to exit just in case