Merge pull request #27387 from talex5/health-restart

Reset health status to starting when a container is restarted
Upstream-commit: 7a4d286ddd78aff567c21bdd0a54d7765488ca64
Component: engine
This commit is contained in:
Vincent Demeester
2016-10-19 15:48:59 +02:00
committed by GitHub
+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