Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1049759 - [RHS-C] rhsc-log-collector garbles the tty when multiple hosts are gathered and ssh is called with the "-t" flag
Summary: [RHS-C] rhsc-log-collector garbles the tty when multiple hosts are gathered a...
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: rhsc-log-collector
Version: 2.1
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: Darshan
QA Contact: RHS-C QE
Depends On:
Blocks: 1035040
TreeView+ depends on / blocked
Reported: 2014-01-08 07:09 UTC by Prasanth
Modified: 2015-08-27 07:12 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Known Issue
Doc Text:
When rhsc-log-collector command is run, after collecting logs from different servers, the Terminal becomes garbled and unusable. Workaround: Run 'reset' command.
Clone Of: 1041749
Last Closed: 2015-08-27 07:12:07 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 489813 None None None Never

Description Prasanth 2014-01-08 07:09:25 UTC
Cloning this bug for RHSC as the same issue is present in rhsc-log-collector as well.

+++ This bug was initially created as a clone of Bug #1041749 +++

Description of problem:

When rhsc-log-collector is run for multiple hypervisor hosts and invokes ssh with the "-t" flag, it results in a garbled TTY requiring "stty sane" to be run to get it back.

Version-Release number of selected component (if applicable):


How reproducible:

I was able to reproduce this 100% of the time if gathering more than one host.  A single host does not exhibit this problem.

Steps to Reproduce:
1.  This problem depends on bug 1010472, which adds the "-t" flag to ssh.  The patch looks like this:

--- rhevm-log-collector.orig    2013-10-07 10:40:57.000000000 -0400
+++ rhevm-log-collector 2013-12-12 12:59:03.552000942 -0500
@@ -503,6 +503,10 @@
         def format_ssh_command(self, cmd="ssh"):
             cmd = "/usr/bin/%s " % cmd

+       # add a controlling tty
+       if cmd.startswith("/usr/bin/ssh"):
+           cmd += "-t "
             if "ssh_port" in self.configuration:
                 port_flag = "-p" if cmd.startswith("/usr/bin/ssh") else "-P"
                 cmd += port_flag + " %(ssh_port)s " % self.configuration

2.  With that patch in place, run 'rhsc-log-collector collect' in an environment with more than one host

Actual results:

The command will succeed, but the TTY will become garbled during or just after the collection of data from the hosts

The only recovery is to run 'stty sane' or 'reset' on the TTY where the 'rhevm-log-collector' was invoked.

Expected results:

The command succeeds and the TTY is sane.

Additional info:

This appears to be something to be a combination of the "-t" flag and specifying multiple hosts.  If you remove the "-t" flag the behavior goes away, and if you only specify one host the behavior goes away.  It might have something to do with the logging module being used in multiple threads simultaneously.

I was able to completely alleviate the problem with this patch:

--- rhevm-log-collector.orig    2013-10-07 10:40:57.000000000 -0400
+++ rhevm-log-collector 2013-12-12 12:59:03.552000942 -0500
@@ -626,6 +630,7 @@
             stdout = self.sosreport()
+  'stty sane')
             self.configuration["hypervisor_dir"] = os.path.join(

--- Additional comment from Sandro Bonazzola on 2013-12-18 03:07:34 EST ---

Moving to RHEVM since there are Red Hat Customer Portal references.

Comment 1 Shalaka 2014-01-13 08:57:55 UTC
As this bug has been identified as known issue, please add the DocText.

Comment 2 Shalaka 2014-01-23 09:38:26 UTC
Please review the edited Doc Text and signoff.

Comment 3 Aravinda VK 2014-01-24 11:16:33 UTC
Minor change in doc text. (Red Hat Storage Console => Terminal)

Comment 4 Sahina Bose 2015-08-27 07:12:07 UTC
This issue has been fixed post rebase to upstream ovirt 3.5 in RHGS release 3.1.

Closing this bug. Please reopen a bug against version 3.1 if you encounter the issue again

Note You need to log in before you can comment on or make changes to this bug.