Bug 850433
| Summary: | One redundant new line char in gathered commands | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | David Kutálek <dkutalek> | |
| Component: | sos | Assignee: | Bryn M. Reeves <bmr> | |
| Status: | CLOSED ERRATA | QA Contact: | David Kutálek <dkutalek> | |
| Severity: | low | Docs Contact: | ||
| Priority: | low | |||
| Version: | 6.3 | CC: | agk, bmr, gavin | |
| Target Milestone: | rc | |||
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| 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.
|
Story Points: | --- | |
| Clone Of: | ||||
| : | 971420 (view as bug list) | Environment: | ||
| Last Closed: | 2013-02-21 10:58:26 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 971420 | |||
|
Description
David Kutálek
2012-08-21 15:11:51 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. 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]# 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 |