Bug 717480

Summary: Fix problems hidden by __raisePlugins__ = 0, create logging for plugin errors
Product: Red Hat Enterprise Linux 5 Reporter: David Kutálek <dkutalek>
Component: sosAssignee: Bryn M. Reeves <bmr>
Status: CLOSED ERRATA QA Contact: David Kutálek <dkutalek>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.7CC: agk, bmr, gavin, lmiksik, prc
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Older versions of sos use a mechanism to suppress exceptions raised by plugins. This mechanism is intended to prevent a bug in one plugin preventing generation of a complete sosreport. Consequence: Since plugin exceptions are caught internally and not reported to the user or logged this mechanism may conceal genuine problems in the default plugin set. Fix: The sosreport command has been modified to report any exceptions raised during plugin processing to the sos log or to the terminal when run in verbose mode. Result: Plugin exceptions can now be discovered via the normal sos logging mechanisms while retaining the previous behavior of not permitting such exceptions to prematurely terminate the sos process
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-21 03:25:20 UTC Type: ---
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: 782064    

Description David Kutálek 2011-06-28 22:27:34 UTC
Description of problem:

There is a strange policy that unknown errors raised from plugins are silenced without any notice or logging. Therefore some existing problems were hidden:

 - error in cluster diagnostics
 - unhandled exception in sar plugin when /var/log/sa is not present
 - there may be more

I propose logging any tracebacks into separate file and make it part of sosreport.

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

sos-1.7-9.54.el5

How reproducible:

edit /usr/sbin/sosreport and set __raisePlugins__ to 1

Steps to Reproduce:
1. run sosreport -o cluster
2. run sosreport -o sar
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Bryn M. Reeves 2011-06-29 10:33:13 UTC
Thanks for the bug report David - we'll address these cases in 5.8 - this is an unfortunate aspect of RHEL5's sos behaviour (this has been changed upstream and can be controlled by a command-line option).

Unfortunately we are somewhat constrained in what we can change in this release but we can at least address all the cases in the shipped plugin set that we know of.

Comment 13 Bryn M. Reeves 2012-01-26 12:05:29 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause: Older versions of sos use a mechanism to suppress exceptions raised by plugins. This mechanism is intended to prevent a bug in one plugin preventing generation of a complete sosreport.

Consequence: Since plugin exceptions are caught internally and not reported to the user or logged this mechanism may conceal genuine problems in the default plugin set.

Fix: The sosreport command has been modified to report any exceptions raised during plugin processing to the sos log or to the terminal when run in verbose mode.

Result: Plugin exceptions can now be discovered via the normal sos logging mechanisms while retaining the previous behavior of not permitting such exceptions to prematurely terminate the sos process

Comment 14 errata-xmlrpc 2012-02-21 03:25:20 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-2012-0153.html