Support reopening container log.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2018-02-13 01:55:29 +00:00
parent 8357315564
commit a8264ec035
8 changed files with 93 additions and 53 deletions

View File

@@ -110,9 +110,7 @@ func (c *criContainerdService) startContainer(ctx context.Context,
}
}
}()
if err := cio.WithOutput("log", stdoutWC, stderrWC)(cntr.IO); err != nil {
return nil, fmt.Errorf("failed to add container log: %v", err)
}
cntr.IO.AddOutput("log", stdoutWC, stderrWC)
cntr.IO.Pipe()
return cntr.IO, nil
}