RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 850433 - One redundant new line char in gathered commands
Summary: One redundant new line char in gathered commands
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: sos
Version: 6.3
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Bryn M. Reeves
QA Contact: David Kutálek
URL:
Whiteboard:
Depends On:
Blocks: 971420
TreeView+ depends on / blocked
 
Reported: 2012-08-21 15:11 UTC by David Kutálek
Modified: 2013-06-06 13:10 UTC (History)
3 users (show)

Fixed In Version: sos-2.2-32.el6
Doc Type: Bug Fix
Doc Text:
Cause: The python runtime's pipe communication interface adds an additional trailing newline ('\n') character to output read from an external program. Consequence: Files stored in the generated reports that are generated by running an external command include additional trailing whitespace that could interfere with attempts to compare file content. Fix: The sosreport command has been modified to remove this additional character when present. Result: File capture is now consistent between sos versions in Red Hat Enterprise Linux 5 and 6 simplifying comparison of diagnostic data captured on these two releases.
Clone Of:
: 971420 (view as bug list)
Environment:
Last Closed: 2013-02-21 10:58:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0474 0 normal SHIPPED_LIVE sos bug fix and enhancement update 2013-02-20 21:06:54 UTC

Description David Kutálek 2012-08-21 15:11:51 UTC
Description of problem:

sosreport appends a new line char (\n) after gathered command shell output. While this seems like an intention, behaviour now differs for RHEL6 and RHEL5, where line is not appended. It seems to me we can remove this additional new line char in RHEL6

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


How reproducible:

Always

Steps to Reproduce:
1. sosreport --batch -o general 
2. tar xf /tmp/sosreport-xxx.tar.xz
3. cat ./xxx/sos_commands/general/date 
4. date
  
Actual results:

Tue Aug 21 16:56:21 CEST 2012\n\n

Expected results:

Tue Aug 21 16:56:21 CEST 2012\n

Additional info:

Comment 1 Bryn M. Reeves 2012-10-17 14:18:04 UTC
This actually seems to be a python thing - we don't do anything to add the traling newline, it appears to just be a consequence of slurping the file up in pipe.communicate().

In RHEL5 we added a tweak to delete the last char if it is a '\n' (helpers.py::sosGetCommandOutput()). I'll do the same in 6 for consistency.

Comment 2 Bryn M. Reeves 2012-10-17 14:20:15 UTC
Before:
[root@rhel6-vm1 tmp]# cat rhel6-vm1-2012101715141350483291/sos_commands/general/date 
Wed Oct 17 15:14:56 BST 2012

[root@rhel6-vm1 tmp]#

After:
[root@rhel6-vm1 tmp]# cat rhel6-vm1-2012101715171350483426/sos_commands/general/date 
Wed Oct 17 15:17:07 BST 2012
[root@rhel6-vm1 tmp]#

Comment 7 errata-xmlrpc 2013-02-21 10:58:26 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0474.html


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