kata_proxy: Open a special goroutine do cmd.Wait

Got a defunct kata-proxy after kata quit when VMCache is enabled.
The reason is vmcache server opens kata-proxy but doesn't wait it.

If VMCache is disabled, kata-runtime will quit before kata-proxy.
So it will not meet the issue.

Open a special goroutine do cmd.Wait in kataProxy.start to handle
the isssue.

Fixes: #1678

Signed-off-by: Hui Zhu <teawater@hyper.sh>
This commit is contained in:
Hui Zhu 2019-05-15 21:36:26 +08:00
parent 86d51f59d4
commit 00d03c1022

View File

@ -51,6 +51,8 @@ func (p *kataProxy) start(params proxyParams) (int, string, error) {
return -1, "", err return -1, "", err
} }
go cmd.Wait()
return cmd.Process.Pid, proxyURL, nil return cmd.Process.Pid, proxyURL, nil
} }