From ab6dd28c1bfe9676f212ef0dd9a7441728d5d9da Mon Sep 17 00:00:00 2001 From: Alexandr Morozov Date: Thu, 10 Jul 2014 13:19:18 +0400 Subject: [PATCH] Set state running before dumping to disk Fixes #4766 Docker-DCO-1.1-Signed-off-by: Alexandr Morozov (github: LK4D4) Conflicts: daemon/container.go Docker-DCO-1.1-Signed-off-by: Alexandr Morozov (github: vieux) Upstream-commit: 699bc47137ab78b7d88ec7623ad10e04f7b67f33 Component: engine --- components/engine/daemon/container.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/engine/daemon/container.go b/components/engine/daemon/container.go index 5b41438680..41a2d390e0 100644 --- a/components/engine/daemon/container.go +++ b/components/engine/daemon/container.go @@ -1080,10 +1080,10 @@ func (container *Container) waitForStart() error { c.Close() } } + container.State.SetRunning(command.Pid()) if err := container.ToDisk(); err != nil { utils.Debugf("%s", err) } - container.State.SetRunning(command.Pid()) } // We use a callback here instead of a goroutine and an chan for