Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
kata_agent: send sandbox id in CreateSandbox request
Browse files Browse the repository at this point in the history
And do not append sandbox id to kernel arguments since that
would fail qemu args comparison in vm factory.

Fixes: #523

Signed-off-by: Peng Tao <bergwolf@gmail.com>
  • Loading branch information
bergwolf committed Jul 27, 2018
1 parent cb37c1a commit 5345a2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions virtcontainers/kata_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,7 @@ func (k *kataAgent) startSandbox(sandbox *Sandbox) error {
Hostname: hostname,
Storages: storages,
SandboxPidns: sandbox.sharePidNs,
SandboxId: sandbox.id,
}

_, err = k.sendReq(req)
Expand Down
6 changes: 1 addition & 5 deletions virtcontainers/qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,14 +396,10 @@ func (q *qemu) createSandbox() error {
return err
}

// Pass the sandbox name to the agent via the kernel command-line to
// allow the agent to use it in log messages.
params := q.kernelParameters() + " " + "agent.sandbox=" + q.id

kernel := govmmQemu.Kernel{
Path: kernelPath,
InitrdPath: initrdPath,
Params: params,
Params: q.kernelParameters(),
}

incoming := q.setupTemplate(&knobs, &memory)
Expand Down

0 comments on commit 5345a2f

Please sign in to comment.