From: Ondrej Lichtner <olichtne(a)redhat.com>
The NetTestCommand object only disabled the recipe handler and the
connection handler. This was incorrect as it ment that the logs from
commands wouldn't be saved on the slave machine. Also when there were
multiple commands running they would be accessing the tty without
synchronization which is probably not correct.
This commit changes the behaviour by calling the disable_logging method
which clears all the handlers to files, tty or sockets. And after
creates a new connection handler that forwards the log messages to the
main server process.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Common/NetTestCommand.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/lnst/Common/NetTestCommand.py b/lnst/Common/NetTestCommand.py
index b5569a5..57a9350 100644
--- a/lnst/Common/NetTestCommand.py
+++ b/lnst/Common/NetTestCommand.py
@@ -107,9 +107,8 @@ class NetTestCommand:
self._connection_pipe = self._write_pipe
- self._log_ctl.unset_recipe()
- self._log_ctl.cancel_connection()
- self._log_ctl.set_connection(self._write_pipe)
+ self._log_ctl.disable_logging()
+ self._log_ctl.set_connection(self._connection_pipe)
result = {}
try:
--
1.7.11.7