mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Reset health status to starting when a container is restarted
Signed-off-by: Thomas Leonard <thomas.leonard@docker.com>
(cherry picked from commit b8793cff48)
Signed-off-by: Victor Vieux <vieux@docker.com>
This commit is contained in:
committed by
Victor Vieux
parent
72875b0d01
commit
351799f4f0
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user