From 5ddda4b09acad28f5657bb401d9d5f6475932c3e 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) Upstream-commit: 97a38079010bddfe6316c4087c13825fd8df64b7 Component: engine --- components/engine/daemon/container.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/engine/daemon/container.go b/components/engine/daemon/container.go index aacd90a449..b050fe571a 100644 --- a/components/engine/daemon/container.go +++ b/components/engine/daemon/container.go @@ -1102,10 +1102,10 @@ func (container *Container) waitForStart() error { c.Close() } } - if err := container.toDisk(); err != nil { + 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