Add restart recovery logic.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2017-09-04 02:47:58 +00:00
parent 5dbba596e6
commit cc1b0b6709
14 changed files with 543 additions and 34 deletions

View File

@@ -159,6 +159,11 @@ func (c *criContainerdService) CreateContainer(ctx context.Context, r *runtime.C
}
meta.ImageRef = image.ID
// Get container log path.
if config.GetLogPath() != "" {
meta.LogPath = filepath.Join(sandbox.Config.GetLogDirectory(), config.GetLogPath())
}
containerIO, err := cio.NewContainerIO(id,
cio.WithStdin(config.GetStdin()),
cio.WithTerminal(config.GetTty()),