mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Move container start event into monitor
Signed-off-by: Michael Crosby <michael@docker.com>
This commit is contained in:
parent
b7550cd456
commit
6ae05936e1
2 changed files with 4 additions and 4 deletions
|
@ -104,9 +104,7 @@ func (m *containerMonitor) reset(successful bool) {
|
||||||
container.stdin, container.stdinPipe = io.Pipe()
|
container.stdin, container.stdinPipe = io.Pipe()
|
||||||
}
|
}
|
||||||
|
|
||||||
if container.daemon != nil && container.daemon.srv != nil {
|
|
||||||
container.LogEvent("die")
|
container.LogEvent("die")
|
||||||
}
|
|
||||||
|
|
||||||
c := container.command.Cmd
|
c := container.command.Cmd
|
||||||
|
|
||||||
|
@ -160,6 +158,8 @@ func (m *containerMonitor) Start() error {
|
||||||
|
|
||||||
pipes := execdriver.NewPipes(m.container.stdin, m.container.stdout, m.container.stderr, m.container.Config.OpenStdin)
|
pipes := execdriver.NewPipes(m.container.stdin, m.container.stdout, m.container.stderr, m.container.Config.OpenStdin)
|
||||||
|
|
||||||
|
m.container.LogEvent("start")
|
||||||
|
|
||||||
if exitStatus, err = m.container.daemon.Run(m.container, pipes, m.callback); err != nil {
|
if exitStatus, err = m.container.daemon.Run(m.container, pipes, m.callback); err != nil {
|
||||||
utils.Errorf("Error running container: %s", err)
|
utils.Errorf("Error running container: %s", err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ func (daemon *Daemon) ContainerStart(job *engine.Job) engine.Status {
|
||||||
if err := container.Start(); err != nil {
|
if err := container.Start(); err != nil {
|
||||||
return job.Errorf("Cannot start container %s: %s", name, err)
|
return job.Errorf("Cannot start container %s: %s", name, err)
|
||||||
}
|
}
|
||||||
container.LogEvent("start")
|
|
||||||
return engine.StatusOK
|
return engine.StatusOK
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue