Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1519267 - tracebacks in etcd and haproxy plugins
tracebacks in etcd and haproxy plugins
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sos (Show other bugs)
7.5
Unspecified Unspecified
medium Severity medium
: beta
: 7.5
Assigned To: Pavel Moravec
Miroslav Hradílek
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-11-30 09:10 EST by Miroslav Hradílek
Modified: 2018-04-10 14:07 EDT (History)
8 users (show)

See Also:
Fixed In Version: sos-3.5-2.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-04-10 14:05:49 EDT
Type: Bug
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
Github 1159 None None None 2017-12-05 06:48 EST
Github 1160 None None None 2017-12-05 07:03 EST
Red Hat Product Errata RHEA-2018:0963 None None None 2018-04-10 14:07 EDT

  None (edit)
Description Miroslav Hradílek 2017-11-30 09:10:14 EST
Description of problem:
Plugins when run manually should not end with traceback. Instead they should collect what they can and end. In current build of sosreport haproxy and etcd plugins fail to run because of missing packages and files they are trying to collect.

Version-Release number of selected component (if applicable):
Unreleased!!! sos-3.5-1.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1. sosreport --batch --all-logs -a  --debug -o etcd -e etcd
2. sosreport --batch --all-logs -a  --debug -o haproxy -e haproxy

Actual results:
# sosreport --batch --all-logs -a  --debug -o etcd -e etcd
. . .
 Setting up archive ...
 Setting up plugins ...
Traceback (most recent call last):
  File "/usr/sbin/sosreport", line 25, in <module>
    main(sys.argv[1:])
  File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1634, in main
    sos.execute()
KeyError: 'etcd'

> /usr/lib/python2.7/site-packages/sos/plugins/etcd.py(64)get_etcd_url()
-> ver = self.policy().package_manager.get_pkg_list()['etcd']
(Pdb)


# sosreport --batch --all-logs -a  --debug -o haproxy -e haproxy
. . .
 Setting up archive ...
 Setting up plugins ...
Traceback (most recent call last):
  File "/usr/sbin/sosreport", line 25, in <module>
    main(sys.argv[1:])
  File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1634, in main
    sos.execute()
IOError: [Errno 2] No such file or directory: '/etc/haproxy/haproxy.cfg'

> /usr/lib/python2.7/site-packages/sos/plugins/haproxy.py(48)setup()
-> for line in open("/etc/haproxy/haproxy.cfg").read().splitlines():
(Pdb)

Expected results:
Run and collect what you can and end gracefully with no tracebacks.

Additional info:
After installing haproxy and etcd haproxy plugin passes but etcd still fails but on different error...

# sosreport --batch --all-logs -a  --debug -o etcd -e etcd

sosreport (version 3.5)

This command will collect diagnostic and configuration information from
this Red Hat Enterprise Linux system and installed applications.

An archive containing the collected information will be generated in
/var/tmp/sos.JAKqXx and may be provided to a Red Hat support
representative.

Any information provided to Red Hat will be treated in accordance with
the published support policies at:

  https://access.redhat.com/support/

The generated archive may contain data considered sensitive and its
content should be reviewed by the originating organization before being
passed to any third party.

No changes will be made to system configuration.


 Setting up archive ...
 Setting up plugins ...
Traceback (most recent call last):
  File "/usr/sbin/sosreport", line 25, in <module>
    main(sys.argv[1:])
  File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1634, in main
    sos.execute()
NameError: global name 'subcmd' is not defined

> /usr/lib/python2.7/site-packages/sos/plugins/etcd.py(43)setup()
-> self.add_cmd_output(['%s %s' % (self.cmd, sub) for sub in subcmd])
(Pdb)
Comment 2 Pavel Moravec 2017-12-05 07:12:43 EST
Technically, both reported issues are regressions (though I dont expect them happening (often) at customers) - running same tests with sos 3.4 does not raise an exception.
Comment 4 Pavel Moravec 2017-12-05 07:15:51 EST
Steve, could you pls. pm_ack this small regression to 7.5?
Comment 11 errata-xmlrpc 2018-04-10 14:05:49 EDT
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.

https://access.redhat.com/errata/RHEA-2018:0963

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