From 561269480cd7e6bf2e51c3bea9ae64925ba0fc47 Mon Sep 17 00:00:00 2001 From: fupan Date: Wed, 19 Sep 2018 15:58:48 +0800 Subject: [PATCH] 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 --- virtcontainers/kata_agent.go | 1 - virtcontainers/kata_agent_test.go | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/virtcontainers/kata_agent.go b/virtcontainers/kata_agent.go index 3f0a2916c7..0b7e63dee7 100644 --- a/virtcontainers/kata_agent.go +++ b/virtcontainers/kata_agent.go @@ -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. diff --git a/virtcontainers/kata_agent_test.go b/virtcontainers/kata_agent_test.go index d62d916c7f..3482a40279 100644 --- a/virtcontainers/kata_agent_test.go +++ b/virtcontainers/kata_agent_test.go @@ -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)