Merge pull request #16228 from duglin/ContextualizeEvents

Add context.RequestID to event stream
This commit is contained in:
David Calavera
2015-09-24 14:16:22 -07:00
68 changed files with 737 additions and 565 deletions

View File

@@ -20,6 +20,7 @@ import (
"time"
"github.com/Sirupsen/logrus"
"github.com/docker/docker/context"
"github.com/docker/docker/daemon/execdriver"
"github.com/docker/docker/pkg/stringutils"
sysinfo "github.com/docker/docker/pkg/system"
@@ -125,7 +126,7 @@ func killNetNsProc(proc *os.Process) {
// Run implements the exec driver Driver interface,
// it calls 'exec.Cmd' to launch lxc commands to run a container.
func (d *Driver) Run(c *execdriver.Command, pipes *execdriver.Pipes, hooks execdriver.Hooks) (execdriver.ExitStatus, error) {
func (d *Driver) Run(ctx context.Context, c *execdriver.Command, pipes *execdriver.Pipes, hooks execdriver.Hooks) (execdriver.ExitStatus, error) {
var (
term execdriver.Terminal
err error
@@ -329,7 +330,7 @@ func (d *Driver) Run(c *execdriver.Command, pipes *execdriver.Pipes, hooks execd
if hooks.Start != nil {
logrus.Debugf("Invoking startCallback")
hooks.Start(&c.ProcessConfig, pid, oomKillNotification)
hooks.Start(ctx, &c.ProcessConfig, pid, oomKillNotification)
}
@@ -871,7 +872,7 @@ func (t *TtyConsole) Close() error {
// Exec implements the exec driver Driver interface,
// it is not implemented by lxc.
func (d *Driver) Exec(c *execdriver.Command, processConfig *execdriver.ProcessConfig, pipes *execdriver.Pipes, hooks execdriver.Hooks) (int, error) {
func (d *Driver) Exec(ctx context.Context, c *execdriver.Command, processConfig *execdriver.ProcessConfig, pipes *execdriver.Pipes, hooks execdriver.Hooks) (int, error) {
return -1, ErrExec
}