1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #42488 from sparrc/log-fix-wait-timeout

Fix log statement 'failed to exit' timeout accuracy
This commit is contained in:
Tianon Gravi 2021-06-08 15:14:07 -07:00 committed by GitHub
commit adb26d3fbe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -83,7 +83,7 @@ func (daemon *Daemon) containerStop(container *containerpkg.Container, seconds i
return err 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. // Stop either failed or container didnt exit, so fallback to kill.
if err := daemon.Kill(container); err != nil { if err := daemon.Kill(container); err != nil {
// got a kill error, but give container 2 more seconds to exit just in case // got a kill error, but give container 2 more seconds to exit just in case