Bug 2028285 - tracer hangs forever if not ran via tty
Summary: tracer hangs forever if not ran via tty
Keywords:
Status: NEW
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: katello-tracer
Version: 6.10.1
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Satellite QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-12-01 22:04 UTC by jcallaha
Modified: 2023-08-18 12:13 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SAT-19642 0 None None None 2023-08-18 12:13:07 UTC

Description jcallaha 2021-12-01 22:04:14 UTC
Description of problem:
tracer performs a check to see if it can expect additional input from stdin, if so then it tries to read from stdin
https://github.com/FrostyX/tracer/blob/master/tracer/main.py#L42
However, this conditional also triggers if you run tracer via a non-tty ssh method. tracer then hangs on the blocking read until the session is killed.

Version-Release number of selected component (if applicable):
All versions. This part of the codebase has been intact for at least 7 years.

How reproducible:
100%

Steps to Reproduce:
1. Install tracer on a host
2. ssh root@<your host> tracer

Actual results:
The ssh command will continue to wait until killed (or timed out by other means)

Expected results:
tracer runs as normal (with a better mechanism of checking the stdin buffer)

Additional info:
os.isatty(0) also has the same issue

Comment 2 Brad Buckingham 2023-07-21 21:06:39 UTC
Upon review of our valid but aging backlog the Satellite Team has concluded that this Bugzilla does not meet the criteria for a resolution in the near term, and are planning to close in a month. This message may be a repeat of a previous update and the bug is again being considered to be closed. If you have any concerns about this, please contact your Red Hat Account team.  Thank you.

Comment 3 Jakub Kadlčík 2023-08-18 12:08:57 UTC
I am sorry, I must have missed the issue somehow :-/

I am proposing this upstream PR
https://github.com/FrostyX/tracer/pull/201


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