mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-07 02:54:29 +00:00
Merge pull request #1322 from lifupan/fixconsole
virtcontainer: watch the qemu's console when proxy's debug enabled
This commit is contained in:
commit
e2c17661b0
@ -55,10 +55,13 @@ func (p *kataBuiltInProxy) start(params proxyParams) (int, string, error) {
|
|||||||
params.logger.Debug("Starting builtin kata proxy")
|
params.logger.Debug("Starting builtin kata proxy")
|
||||||
|
|
||||||
p.sandboxID = params.id
|
p.sandboxID = params.id
|
||||||
err := p.watchConsole(buildinProxyConsoleProto, params.consoleURL, params.logger)
|
|
||||||
if err != nil {
|
if params.debug {
|
||||||
p.sandboxID = ""
|
err := p.watchConsole(buildinProxyConsoleProto, params.consoleURL, params.logger)
|
||||||
return -1, "", err
|
if err != nil {
|
||||||
|
p.sandboxID = ""
|
||||||
|
return -1, "", err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1, params.agentURL, nil
|
return -1, params.agentURL, nil
|
||||||
|
@ -17,7 +17,7 @@ func TestKataBuiltinProxy(t *testing.T) {
|
|||||||
|
|
||||||
p := kataBuiltInProxy{}
|
p := kataBuiltInProxy{}
|
||||||
|
|
||||||
params := proxyParams{}
|
params := proxyParams{debug: true}
|
||||||
|
|
||||||
err := p.validateParams(params)
|
err := p.validateParams(params)
|
||||||
assert.NotNil(err)
|
assert.NotNil(err)
|
||||||
|
Loading…
Reference in New Issue
Block a user