From 155714c59650a7b9b8f890f4d20c83ea9b80206b Mon Sep 17 00:00:00 2001 From: Zhang Wei <zhangwei555@huawei.com> Date: Tue, 2 Feb 2016 19:50:06 +0800 Subject: [PATCH] Lock container when set state to restarting After exec driver run, container lock is lost, so we should lock container when changing its state to `restarting` Signed-off-by: Zhang Wei <zhangwei555@huawei.com> --- container/monitor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container/monitor.go b/container/monitor.go index 09b447d947..a292d8ce3f 100644 --- a/container/monitor.go +++ b/container/monitor.go @@ -218,7 +218,7 @@ func (m *containerMonitor) start() error { m.resetMonitor(err == nil && exitStatus.ExitCode == 0) if m.shouldRestart(exitStatus.ExitCode) { - m.container.SetRestarting(&exitStatus) + m.container.SetRestartingLocking(&exitStatus) m.logEvent("die") m.resetContainer(true)