virtcontainers: fix the issue of missing starting builtin proxy

It shouldn't set kataAgent.state.URL in its configure() method
for builtin kata proxy, otherwise the following check of whether
is it nil in startProxy() will return directly and failed to
start builtin proxy which will log the qemu's console.

Fixes: #756

Signed-off-by: fupan <lifupan@gmail.com>
This commit is contained in:
fupan 2018-09-19 15:58:48 +08:00 committed by Fupan Li
parent 35d3c0bf5a
commit 561269480c
2 changed files with 1 additions and 1 deletions

View File

@ -247,7 +247,6 @@ func (k *kataAgent) configure(h hypervisor, id, sharePath string, builtin bool,
if builtin {
k.proxyBuiltIn = true
k.state.URL, _ = k.agentURL()
}
// Adding the shared volume.

View File

@ -649,6 +649,7 @@ func TestAgentConfigure(t *testing.T) {
err = k.configure(h, id, dir, true, c)
assert.Nil(err)
assert.Empty(k.state.URL)
err = k.configure(h, id, dir, false, c)
assert.Nil(err)