Add working shim exec driver for start

Still need to implement a working Wait() on the process using epoll
because of the non-blocking exit fifo

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby 2016-10-06 11:39:12 -07:00
parent c76f883ccd
commit 90e4f130c8
6 changed files with 223 additions and 76 deletions

View file

@ -39,9 +39,9 @@ type checkpoint struct {
type processState struct {
specs.ProcessSpec
Exec bool `json:"exec"`
Stdin string `json:"containerdStdin"`
Stdout string `json:"containerdStdout"`
Stderr string `json:"containerdStderr"`
Stdin string `json:"stdin"`
Stdout string `json:"stdout"`
Stderr string `json:"stderr"`
RuntimeArgs []string `json:"runtimeArgs"`
NoPivotRoot bool `json:"noPivotRoot"`
CheckpointPath string `json:"checkpoint"`
@ -74,7 +74,7 @@ func newProcess(id, bundle, runtimeName string) (*process, error) {
}
s, err := loadProcess()
if err != nil {
return nil, err
return nil, fmt.Errorf("load process from json %s", err)
}
p.state = s
if s.CheckpointPath != "" {
@ -86,7 +86,7 @@ func newProcess(id, bundle, runtimeName string) (*process, error) {
p.checkpointPath = s.CheckpointPath
}
if err := p.openIO(); err != nil {
return nil, err
return nil, fmt.Errorf("open IO for container %s", err)
}
return p, nil
}