The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/6869

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
This reverts commit 78b4b396c8413e4b6e6c32317611d0fead72d09b.

This is because although it fixes the hanging lxc clients and leaking go routines, it also introduces a regression when using `lxc exec` without a single command that is expected to output data directly to the console.

With the escape sequence being sent, this was intermittently wiping out the output of the command.

Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com>
From d6054a856259657fec682d9f8e4dfbc87f1df4aa Mon Sep 17 00:00:00 2001
From: Thomas Parrott <thomas.parr...@canonical.com>
Date: Tue, 11 Feb 2020 17:38:02 +0000
Subject: [PATCH] Revert "lxd/instance/drivers/driver/qemu: Fix go routine leak
 and hanging lxc clients"

This reverts commit 78b4b396c8413e4b6e6c32317611d0fead72d09b.

This is because although it fixes the hanging lxc clients and leaking go 
routines, it also introduces a regression when using `lxc exec` without a 
single command that is expected to output data directly to the console.

With the escape sequence being sent, this was intermittently wiping out the 
output of the command.

Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com>
---
 lxd/instance/drivers/driver_qemu.go | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/lxd/instance/drivers/driver_qemu.go 
b/lxd/instance/drivers/driver_qemu.go
index 83a7522315..efb2276fbb 100644
--- a/lxd/instance/drivers/driver_qemu.go
+++ b/lxd/instance/drivers/driver_qemu.go
@@ -2904,14 +2904,7 @@ func (vm *qemu) Exec(req api.InstanceExecPost, stdin 
*os.File, stdout *os.File,
                        return nil, err
                }
 
-               revert.Add(func() {
-                       termios.Restore(int(stdin.Fd()), oldttystate)
-
-                       // Write a reset escape sequence to the console to 
cancel any ongoing reads to the handle
-                       // and then close it.
-                       stdout.Write([]byte("\x1bc"))
-                       stdout.Close()
-               })
+               revert.Add(func() { termios.Restore(int(stdin.Fd()), 
oldttystate) })
        }
 
        dataDone := make(chan bool)
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to