mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-01 07:47:15 +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")
|
||||
|
||||
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