Reset health status to starting when a container is restarted

Signed-off-by: Thomas Leonard <thomas.leonard@docker.com>
Upstream-commit: b8793cff48fc4c1b702917ebc528ca0c60fb3397
Component: engine
This commit is contained in:
Thomas Leonard
2016-10-14 15:49:12 +01:00
parent a5bfdba8fe
commit ad4741351f
+4 -1
View File
@@ -251,7 +251,10 @@ func (d *Daemon) initHealthMonitor(c *container.Container) {
// This is needed in case we're auto-restarting
d.stopHealthchecks(c)
if c.State.Health == nil {
if h := c.State.Health; h != nil {
h.Status = types.Starting
h.FailingStreak = 0
} else {
h := &container.Health{}
h.Status = types.Starting
c.State.Health = h