Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 713449 - sosreport truncates leading and trailing whitespace from command outputs
sosreport truncates leading and trailing whitespace from command outputs
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: sos (Show other bugs)
6.1
Unspecified Linux
medium Severity medium
: rc
: ---
Assigned To: Bryn M. Reeves
David Kutálek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-15 08:59 EDT by Bryan Yount
Modified: 2011-12-06 13:11 EST (History)
7 users (show)

See Also:
Fixed In Version: 2.2-11.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-12-06 13:11:09 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1536 normal SHIPPED_LIVE Low: sos security, bug fix, and enhancement update 2011-12-05 20:02:03 EST

  None (edit)
Description Bryan Yount 2011-06-15 08:59:55 EDT
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 12:31:39 EDT
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 13:11:09 EST
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.