Handle start errors sync with runc
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
22dac6af92
commit
b68bc651a8
3 changed files with 47 additions and 5 deletions
|
@ -12,15 +12,12 @@ import (
|
|||
"github.com/docker/docker/pkg/term"
|
||||
)
|
||||
|
||||
var runtimeLog string
|
||||
|
||||
func setupLogger() {
|
||||
f, err := os.OpenFile("/tmp/shim.log", os.O_CREATE|os.O_RDWR|os.O_APPEND, 0755)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
logrus.SetOutput(f)
|
||||
runtimeLog = "/tmp/runtime.log"
|
||||
}
|
||||
|
||||
// containerd-shim is a small shim that sits in front of a runtime implementation
|
||||
|
|
|
@ -84,7 +84,11 @@ func (p *process) start() error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
args := []string{"--log", runtimeLog}
|
||||
logPath := filepath.Join(cwd, "log.json")
|
||||
args := []string{
|
||||
"--log", logPath,
|
||||
"--log-format", "json",
|
||||
}
|
||||
if p.state.Exec {
|
||||
args = append(args, "exec",
|
||||
"--process", filepath.Join(cwd, "process.json"),
|
||||
|
@ -140,7 +144,6 @@ func (p *process) start() error {
|
|||
}
|
||||
p.containerPid = pid
|
||||
return nil
|
||||
|
||||
}
|
||||
|
||||
func (p *process) pid() int {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue