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>
| ... | ... |
@@ -218,7 +218,7 @@ func (m *containerMonitor) start() error {
|
| 218 | 218 |
m.resetMonitor(err == nil && exitStatus.ExitCode == 0) |
| 219 | 219 |
|
| 220 | 220 |
if m.shouldRestart(exitStatus.ExitCode) {
|
| 221 |
- m.container.SetRestarting(&exitStatus) |
|
| 221 |
+ m.container.SetRestartingLocking(&exitStatus) |
|
| 222 | 222 |
m.logEvent("die")
|
| 223 | 223 |
m.resetContainer(true) |
| 224 | 224 |
|