зеркало из https://github.com/microsoft/docker.git
Move container start event into monitor
Signed-off-by: Michael Crosby <michael@docker.com>
This commit is contained in:
Родитель
b7550cd456
Коммит
6ae05936e1
|
@ -104,9 +104,7 @@ func (m *containerMonitor) reset(successful bool) {
|
|||
container.stdin, container.stdinPipe = io.Pipe()
|
||||
}
|
||||
|
||||
if container.daemon != nil && container.daemon.srv != nil {
|
||||
container.LogEvent("die")
|
||||
}
|
||||
container.LogEvent("die")
|
||||
|
||||
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)
|
||||
|
||||
m.container.LogEvent("start")
|
||||
|
||||
if exitStatus, err = m.container.daemon.Run(m.container, pipes, m.callback); err != nil {
|
||||
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 {
|
||||
return job.Errorf("Cannot start container %s: %s", name, err)
|
||||
}
|
||||
container.LogEvent("start")
|
||||
|
||||
return engine.StatusOK
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче