Don't call runc start when restoring a checkpoint (#302)
The create/start split left checkpoint/restore broken in that the create side was calling runc restore, which fully restores the process to operation, leaving a call to `runc start` as an error (process already started). This patch skips process.Start as it is an unnecessary (and wrong) step for a restored checkpoint. Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
This commit is contained in:
parent
edc124c8e7
commit
8508d2bec9
1 changed files with 13 additions and 9 deletions
|
@ -72,6 +72,9 @@ func (w *worker) Start() {
|
||||||
w.s.SendTask(evt)
|
w.s.SendTask(evt)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
// 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 {
|
if err := process.Start(); err != nil {
|
||||||
logrus.WithField("error", err).Error("containerd: start init process")
|
logrus.WithField("error", err).Error("containerd: start init process")
|
||||||
t.Err <- err
|
t.Err <- err
|
||||||
|
@ -83,6 +86,7 @@ func (w *worker) Start() {
|
||||||
w.s.SendTask(evt)
|
w.s.SendTask(evt)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ContainerStartTimer.UpdateSince(started)
|
ContainerStartTimer.UpdateSince(started)
|
||||||
t.Err <- nil
|
t.Err <- nil
|
||||||
t.StartResponse <- StartResponse{
|
t.StartResponse <- StartResponse{
|
||||||
|
|
Loading…
Reference in a new issue