Bug 852049
Summary: | Add new Postgres Plug-in | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Keith Robertson <kroberts> | ||||||||
Component: | sos | Assignee: | Keith Robertson <kroberts> | ||||||||
Status: | CLOSED ERRATA | QA Contact: | David Kutálek <dkutalek> | ||||||||
Severity: | high | Docs Contact: | |||||||||
Priority: | unspecified | ||||||||||
Version: | 6.4 | CC: | agk, azelinka, bmr, ddumas, gavin, jmoran, mitsuhiro.tanino.gm, syeghiay | ||||||||
Target Milestone: | rc | ||||||||||
Target Release: | --- | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | sos-2.2-35.el6 | Doc Type: | Bug Fix | ||||||||
Doc Text: |
Cause:
PostgreSQL is a popular open-source databased included in Red Hat Enterprise Linux. Prior versions of sos did not include support for collecting information about installed postrgres instances.
Consequence:
No diagnostic information was collected for this component.
Fix:
A new module psql has been included in this release that obtains information from the database.
Result:
Diagnostic data is now captured on appropriately configured systems when the module is enabled.
|
Story Points: | --- | ||||||||
Clone Of: | |||||||||||
: | 913759 (view as bug list) | Environment: | |||||||||
Last Closed: | 2013-02-21 10:58:35 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: | 784640, 862738, 913759 | ||||||||||
Attachments: |
|
Description
Keith Robertson
2012-08-27 12:44:21 UTC
Made a couple of changes after noticing a postproc exception when testing with --debug: Running plugins. Please wait ... Completed [54/54] ... Traceback (most recent call last): File "/usr/sbin/sosreport", line 23, in <module> sosreport(sys.argv[1:]) File "/usr/lib/python2.6/site-packages/sos/sosreport.py", line 824, in sosreport plug.postproc() AttributeError: psql instance has no attribute 'tmp_dir' diff -up sos-2.2/sos/plugins/psql.py.orig sos-2.2/sos/plugins/psql.py --- sos-2.2/sos/plugins/psql.py.orig 2012-10-18 18:12:13.102139939 +0100 +++ sos-2.2/sos/plugins/psql.py 2012-10-18 18:22:09.555465593 +0100 @@ -30,6 +30,10 @@ class psql(sos.plugintools.PluginBase): __username = 'postgres' __dbport = 5432 + packages = [ 'postgresql' ] + + tmp_dir = None + optionList = [ ("pghome", 'PostgreSQL server home directory (default=/var/lib/pgsql)', '', False), ("username", 'username for pg_dump (default=postgres)', '', False), @@ -91,6 +95,8 @@ class psql(sos.plugintools.PluginBase): def postproc(self): import shutil + if self.tmp_dir == None: + return try: shutil.rmtree(self.tmp_dir) except: Created attachment 644291 [details]
Updated plugin with some enhancements for unicode.
Created attachment 645679 [details]
Patched plug-in
Created attachment 659595 [details]
Set option in options list to '/var/lib/pgsql'
*** Bug 887690 has been marked as a duplicate of this bug. *** I've ported over Keith's suggestions (minus the unicode changes) but I'm now hitting the problem David mentioned in comment #19 (this is the first time I've seen it). Something in the psql module appears to be breaking the tarball. OK, the weird tarball problem is not directly related to the postgres module; it happens whenever there are no modules collecting data (which was happening on my test box with -o psql). This is still a problem but will not affect any real uses (since it only affects a case where no useful data is collected anyway). I've filed bug 893570 to deal with this in 6.5. 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 |