Skip to content

Commit

Permalink
proxy: Pass sandbox to proxy
Browse files Browse the repository at this point in the history
Add the `-sandbox` option when launching the proxy. This isn't strictly
required by the proxy, but is extremely useful for log analysis to allow
log entries to be matched to sandboxes as the proxy will add a
`sandbox` field in each log entry.

Fixes kata-containers#463.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
  • Loading branch information
jodh-intel committed Jul 6, 2018
1 parent b2bec33 commit 23eb13f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion virtcontainers/kata_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ func (p *kataProxy) start(sandbox *Sandbox, params proxyParams) (int, string, er
return -1, "", err
}

args := []string{config.Path, "-listen-socket", proxyURL, "-mux-socket", params.agentURL}
args := []string{
config.Path,
"-listen-socket", proxyURL,
"-mux-socket", params.agentURL,
"-sandbox", sandbox.ID(),
}

if config.Debug {
args = append(args, "-log", "debug")
console, err := sandbox.hypervisor.getSandboxConsole(sandbox.id)
Expand Down

0 comments on commit 23eb13f

Please sign in to comment.