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 713449 - sosreport truncates leading and trailing whitespace from command outputs
Summary: sosreport truncates leading and trailing whitespace from command outputs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: sos
Version: 6.1
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Bryn M. Reeves
QA Contact: David Kutálek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-15 12:59 UTC by Bryan Yount
Modified: 2011-12-06 18:11 UTC (History)
7 users (show)

Fixed In Version: 2.2-11.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 18:11:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1536 0 normal SHIPPED_LIVE Low: sos security, bug fix, and enhancement update 2011-12-06 01:02:03 UTC

Description Bryan Yount 2011-06-15 12:59:55 UTC
Description of problem:
The sosreport utility in RHEL 6 is stripping out leading and trailing whitespace from the captured output of commands.  This could lead to confusion and misreading of sos data.


Version-Release number of selected component (if applicable):
sos-2.2-8.el6.noarch


How reproducible:
Very


Steps to Reproduce:
1. Run sosreport
2. View command output captured in report
3. Compare with actual command output


Actual results:

# cat free 
total       used       free     shared    buffers     cached
Mem:       3922400    1184348    2738052          0       6936     628912
-/+ buffers/cache:     548500    3373900
Swap:      6160376          0    6160376


Expected results:

# free
             total       used       free     shared    buffers     cached
Mem:       3922400    1096932    2825468          0      12572     642716
-/+ buffers/cache:     441644    3480756
Swap:      6160376          0    6160376


Additional information:
Looks like the issue is in helpers.py line 58 in function 'sosGetCommandOutput' where it returns "stdout.strip()"

Comment 2 Bryn M. Reeves 2011-06-15 16:31:39 UTC
I just tracked down the changeset that introduced this upstream (it's in 1.9 but not prior releases) as I suspected there's no rationale for the change given. This seems completely bogus to me and as comment #0 indicates breaks, or at least makes confusing, many standard command's outputs (I'm surprised nobody noticed already!).

I'm for reverting this upstream and in RHEL6 asap as it will also affect comparison between sos data when we do make the change.

Keith, thoughts?

Comment 5 errata-xmlrpc 2011-12-06 18:11:09 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/RHSA-2011-1536.html


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