kata_agent: send sandbox id in CreateSandbox request

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>
This commit is contained in:
Peng Tao 2018-07-27 10:51:38 +08:00
parent e69ebe5add
commit b200163de9
2 changed files with 2 additions and 5 deletions

View File

@ -584,6 +584,7 @@ func (k *kataAgent) startSandbox(sandbox *Sandbox) error {
Hostname: hostname,
Storages: storages,
SandboxPidns: sandbox.sharePidNs,
SandboxId: sandbox.id,
}
_, err = k.sendReq(req)

View File

@ -400,14 +400,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)