Przeglądaj źródła

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>
Zhang Wei 9 lat temu
rodzic
commit
155714c596
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      container/monitor.go

+ 1 - 1
container/monitor.go

@@ -218,7 +218,7 @@ func (m *containerMonitor) start() error {
 		m.resetMonitor(err == nil && exitStatus.ExitCode == 0)
 		m.resetMonitor(err == nil && exitStatus.ExitCode == 0)
 
 
 		if m.shouldRestart(exitStatus.ExitCode) {
 		if m.shouldRestart(exitStatus.ExitCode) {
-			m.container.SetRestarting(&exitStatus)
+			m.container.SetRestartingLocking(&exitStatus)
 			m.logEvent("die")
 			m.logEvent("die")
 			m.resetContainer(true)
 			m.resetContainer(true)