Handle shim being sigkilled while containerd is down

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
Kenfe-Mickael Laventure 2016-09-07 15:20:30 -07:00
parent b6b2fd623e
commit 3281909583
3 changed files with 122 additions and 2 deletions

View file

@ -629,6 +629,10 @@ func (c *container) waitForCreate(p *process, cmd *exec.Cmd) error {
if err != nil {
return err
}
err = p.saveStartTime()
if err != nil {
logrus.Warnf("containerd: unable to save %s:%s starttime: %v", p.container.id, p.id)
}
return nil
case <-time.After(c.timeout):
cmd.Process.Kill()