diff --git a/supervisor/worker.go b/supervisor/worker.go index ac7735d..250d396 100644 --- a/supervisor/worker.go +++ b/supervisor/worker.go @@ -72,16 +72,20 @@ func (w *worker) Start() { w.s.SendTask(evt) continue } - if err := process.Start(); err != nil { - logrus.WithField("error", err).Error("containerd: start init process") - t.Err <- err - evt := &DeleteTask{ - ID: t.Container.ID(), - NoEvent: true, - Process: process, + // only call process start if we aren't restoring from a checkpoint + // if we have restored from a checkpoint then the process is already started + if t.CheckpointPath == "" { + if err := process.Start(); err != nil { + logrus.WithField("error", err).Error("containerd: start init process") + t.Err <- err + evt := &DeleteTask{ + ID: t.Container.ID(), + NoEvent: true, + Process: process, + } + w.s.SendTask(evt) + continue } - w.s.SendTask(evt) - continue } ContainerStartTimer.UpdateSince(started) t.Err <- nil