mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-30 09:13:29 +00:00
virtcontainer: watch the qemu's console when proxy's debug enabled
kata builtin proxy has always watched the qemu's console whether proxy's debug is set or not, this is not aligned with kata cli. This patch will change it and watch the qemu's console only when proxy's debug is set in kata config. Fixes: #1318 Signed-off-by: fupan <lifupan@gmail.com>
This commit is contained in:
parent
886d859fbe
commit
c4957ddd8d
@ -55,10 +55,13 @@ func (p *kataBuiltInProxy) start(params proxyParams) (int, string, error) {
|
||||
params.logger.Debug("Starting builtin kata proxy")
|
||||
|
||||
p.sandboxID = params.id
|
||||
err := p.watchConsole(buildinProxyConsoleProto, params.consoleURL, params.logger)
|
||||
if err != nil {
|
||||
p.sandboxID = ""
|
||||
return -1, "", err
|
||||
|
||||
if params.debug {
|
||||
err := p.watchConsole(buildinProxyConsoleProto, params.consoleURL, params.logger)
|
||||
if err != nil {
|
||||
p.sandboxID = ""
|
||||
return -1, "", err
|
||||
}
|
||||
}
|
||||
|
||||
return -1, params.agentURL, nil
|
||||
|
@ -17,7 +17,7 @@ func TestKataBuiltinProxy(t *testing.T) {
|
||||
|
||||
p := kataBuiltInProxy{}
|
||||
|
||||
params := proxyParams{}
|
||||
params := proxyParams{debug: true}
|
||||
|
||||
err := p.validateParams(params)
|
||||
assert.NotNil(err)
|
||||
|
Loading…
Reference in New Issue
Block a user