aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [sosreport] fix silent exception handling in sosreportBryn M. Reeves2015-01-191-6/+12
| | | | | | | | | | | | The OSError and IOError exception branches for the setup, collect, and postproc methods silently ignore plugin exceptions that are not on the list of fatal fs errors (that will cause sos to halt immediately). Fix this and either raise the exception (if --debug is given) or log it to a file via _log_plugin_exception(). Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [sosreport] fix stray whitespace fix from previous commitBryn M. Reeves2015-01-191-1/+0
| | | | | | Fixed in tree but not added to commit. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [sosreport] log plugin exceptions to a fileBryn M. Reeves2015-01-191-4/+13
| | | | | | | | | Add exception logging for the Plugin.postproc() method and move plugin exceptions into a separate per-plugin log file. This is less cluttered than pushing a multi-line traceback through the soslog.error logger and matches the behaviour of older releases. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [ctdb] fix RedHatPlugin tagging useBryn M. Reeves2015-01-191-2/+2
| | | | | | | | | | | The generic Ctdb class is tagged with RedHatPlugin. This causes the RedHatCtdb to not execute (since only the first matching class is instantiated). Remove the RedHatPlugin tag from the Ctdb class and fix the former's call to Ctdb.setup(). Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [squid] don't use add_copy_spec_limt() for conf filesBryn M. Reeves2015-01-191-1/+1
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [squid] collect logs from /var/log/squidBryn M. Reeves2015-01-191-2/+6
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [openstack_neutron] fix legacy component detection testBryn M. Reeves2015-01-141-4/+1
| | | | | | | | | | | | | | | Currently the Neutron plugin will assume it's running on a Neutron (rather than a legacy Quantum) installation if: - '/etc/neutron' exists AND the user specifies quantum=True Otherwise it's assumed to be a Quantum install. This is clearly broken; the sense of the 'openstack_neutron.quantum' part of the test should be inverted. Fixes #420. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [sosreport] do not make logging calls after OSErrorBryn M. Reeves2015-01-131-3/+6
| | | | | | | | | | | Following an OSError during archive setup the logging subsystem is potentially in an inconsistent or unusable state (e.g. due to a readonly file system error). Use the print function directly since we just need to report the error and exit. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [sosreport] catch OSError exceptions in SoSReport.execute()Bryn M. Reeves2015-01-131-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OSError exceptions during logging setup and tear down are not currently handled: 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 1409, in main sos.execute() File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1366, in execute self._setup_logging() File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 739, in _setup_logging self.sos_log_file = self.get_temp_file() File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 670, in get_temp_file return self.tempfile_util.new() File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 82, in new fd, fname = tempfile.mkstemp(dir=self.tmp_dir) File "/usr/lib64/python2.7/tempfile.py", line 304, in mkstemp return _mkstemp_inner(dir, prefix, suffix, flags) File "/usr/lib64/python2.7/tempfile.py", line 239, in _mkstemp_inner fd = _os.open(file, flags, 0600) OSError: [Errno 28] No space left on device: '/tmp/tmp.4ejNitjwcr/nospace_tmp/tmpBjPTOm' Address this by adding OSError to the list of caught exceptions in the main SoSReport.execute() method. Wrap the exception branch clean up in a try/except block to catch additional exceptions while attempting to clean up (e.g. unlink failures following an EROFS on the temporary archive path). Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [anaconda] make useradd password regex tolerant of whitespaceBryn M. Reeves2015-01-131-1/+1
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [mysql] fix command-line dbpass handlingBryn M. Reeves2014-12-231-2/+2
| | | | | | | | | | | | | | The logic for chosing between a command-line and environment variable passed password in the MySQL plugin was incorrect. This prevents a database dump from being collected when a password is given on the command line. Altough use of the command line to pass authentication tokens is discouraged we should ensure the case works. Fixes #456. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [docs] update man page for new optionsBryn M. Reeves2014-12-171-4/+25
| | | | | | | | | | | | | The man page was missing: --verify --all-logs --log-size --plugin-option And listed the old '--ticket' (now --ticket-number). Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [navicli] catch exception if input is unreadableBryn M. Reeves2014-12-171-1/+4
| | | | | | | | | | | | | | | | | CLARiiON SP IP Address or [Enter] to exit: 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 1408, in main sos.execute() File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1387, in execute self.setup() File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1117, in setup plug.setup() File "/usr/lib/python2.7/site-packages/sos/plugins/navicli.py", line 72, in setup ans = input("CLARiiON SP IP Address or [Enter] to exit: ") EOFError: EOF when reading a line Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [ovirt] remove duplicate codeSandro Bonazzola2014-12-171-26/+0
| | | | | Signed-off-by: Sandro Bonazzola <sbonazzo@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [selinux] capture process SELinux domainsBryn M. Reeves2014-12-161-2/+2
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [kimchi] add new pluginChristy Perez2014-12-161-0/+40
| | | | | | | | | | | This plugin gathers kimchi logs and configuration files. Kimchi is an HTML5-based virtualization-management platform For more information, please visit: https://github.com/kimchi-project/kimchi/wiki Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [ovirt] remove password leak from engine setup answer fileSandro Bonazzola2014-12-161-0/+15
| | | | | Signed-off-by: Sandro Bonazzola <sbonazzo@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [ovirt] remove password leak from ovirt-engine setup answer fileSandro Bonazzola2014-12-161-0/+12
| | | | | Signed-off-by: Sandro Bonazzola <sbonazzo@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [ovirt] remove ovirt-engine setup answer file password leakSandro Bonazzola2014-12-161-0/+15
| | | | | Signed-off-by: Sandro Bonazzola <sbonazzo@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [yum] add subscription-manager identity outputspandey2014-12-161-1/+2
| | | | | | | | The "subscription-manager identity" command displays consumer registered uuid and registered org uuid/name , which is useful to track rhn related issues Signed-off-by: spandey <spandey@redhat.com>
* [postgresql] avoid to crash with numerical passwordsSandro Bonazzola2014-12-151-1/+1
| | | | | Signed-off-by: Sandro Bonazzola <sbonazzo redhat com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [archive] remove all references to ZipFileArchiveBryn M. Reeves2014-12-113-39/+3
| | | | | | | | | | Commit f342d39 removed ZipFileArchive and the test suite references but left several imports in other files. Remove them and attendant support functions. Fixes #449. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [archive] remove ZipArchiveBryn M. Reeves2014-12-093-149/+2
| | | | | | | | Remove the ZipArchive class and associated test code. Fixes #322. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [sosreport] disable the 'zip' compression typeBryn M. Reeves2014-12-091-4/+2
| | | | | | | | | | | | | | | | | | | | The Zip archive format is little used and has been broken for some time: Unexpected exception setting up archive: Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1092, in prework self._set_archive() File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 679, in _set_archive self.archive = ZipFileArchive(archive_name, self.tmpdir) TypeError: __init__() takes exactly 2 arguments (3 given) __init__() takes exactly 2 arguments (3 given) Remove it from the allowed options list for --compression-type. The supporting Archive classes can be removed in a separate commit. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [global] make all utf-8 handling use errors='ignore'Bryn M. Reeves2014-12-093-6/+10
| | | | | | | | | | Stop playing whack-a-mole with unicode handling and ignore all invalid characters. It's not really possible to ensure that we always get strict utf-8 data from the system - e.g. dmesg on systems with broken BIOS strings will often spit undecodable byte sequences. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [corosync/pacemaker] Collect corosync-cfgtool -s output / add Pacemaker supportFelipe Reyes2014-11-182-0/+33
| | | | | | | | This patch improves HA clustering information gathering adding a new a new plugin for Pacemaker. Signed-off-by: Felipe Reyes <felipe.reyes@canonical.com> Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* Merge pull request #434 from niedbalski/patch-1Louis Bouchard2014-11-181-0/+2
|\ | | | | [plugins/rabbitmq] Added cluster_status command output
| * [plugins/rabbitmq] Added cluster_status command outputJorge Niedbalski2014-11-141-0/+2
|/ | | | | * Added the 'rabbitmqctl cluster_status' output command Signed-off-by: Jorge Niedbalski R. <niedbalski@gmail.com>
* [docs] Add prominent link to user focused docsncoghlan2014-11-101-0/+4
| | | | | It wasn't immediately clear to me from the developer docs what SoS actually *does*, but the user docs made it clear.
* [maas] Fix maas dumpdata command not found Fixes: #423Chris Johnston2014-10-301-3/+7
| | | | | | | | | | | The maas dumpdata command issued by the MAAS plugin causes a command not found error. The command is now issued to maas-region-admin. Also corrected capitalizations around the MAAS name. Fixes: 423 Signed-off-by: Chris Johnston <chrisjohnston@ubuntu.com> Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* [sosreport] fix archive permissions regressionBryn M. Reeves2014-10-301-0/+3
| | | | | | | | | Restore the umask save/restore around archive creation and ensure the effective umask is 077 at the time of archive creation. Fixes #425. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [plugin] limit names to PC_NAME_MAXBryn M. Reeves2014-10-203-7/+30
| | | | | | | | | | | | | Commit 8bf7b0c removed the truncation of mangled command names to 64 chars. This causes problems for some plugins (e.g. Issue #415) that generate long enough command lines to hit system name length limits. Instead of arbitrarily limiting to 64 characters limit to the lesser of the archive format limit (if present) or the value of PC_NAME_MAX for any intermediate FileCacheArchive path. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [mysql] fix pep8 violationsBryn M. Reeves2014-10-201-1/+2
| | | | | | | The previous commit had a couple of pep8 errors that were fixed in the working tree but not added to the commit; fix them. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [mysql] obtain dbpass from the environmentBryn M. Reeves2014-10-201-3/+10
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [tomcat] add support for tomcat7 and log size limitsBryn M. Reeves2014-10-201-5/+9
| | | | | | | | Based on a patch from Pavel Moravec in Issue #412. Fixes #412. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [corosync] add postprocessing for corosync-objctl outputBryn M. Reeves2014-10-151-0/+7
| | | | | | | | The corosync-objctl command may include fence device passwords in its output. Remove them with the same postprocessing regex as the cluster plugin uses. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [ovirt_hosted_engine] fix exception when force-enabledBryn M. Reeves2014-10-151-2/+3
| | | | | | Fixes #416. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [kpatch] do not try to read kpatch data if it could not be runBryn M. Reeves2014-10-141-0/+2
| | | | | | | | | | Everything the kpatch plugin does requires the list of available kpatch patches obtained from 'kpatch list'. If this fails return immediately from the setup method. Fixes #417. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [debian/changelog] Fix tab spacingLouis Bouchard2014-10-131-2/+2
| | | | Signed-off-by: Louis Bouchard <louis.bouchard@canonical.com>
* [apt] Fix failing apt-cache policy detailsLouis Bouchard2014-10-131-7/+10
| | | | | | | | | | Split add_cmd_output to use suggest_filename since the output of apt-cache policy for each installed package would create an incredibly long filename. Fixes #415. Signed-off-by: Louis Bouchard <louis.bouchard@canonical.com>
* [debian/changelog] update changelog to new releaseAdam Stokes2014-10-121-0/+17
| | | | | | | Syncs up the version within the changelog to the latest release. Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* [Makefile] Add debian pkg tarball buildLouis Bouchard2014-10-031-1/+12
| | | | | | | Fixes #418 Signed-off-by: Louis Bouchard <louis.bouchard@canonical.com> Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* [powerpc] allow PowerPC plugin to run on ppc64leBryn M. Reeves2014-10-021-1/+1
| | | | | | | | | The plugin currently tests whether policy().get_arch() is equal to "ppc64". On little endian PowerPC machines this method returns "ppc64le". Change the check_enabled() method to test whether the returned string contains "ppc64". Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [yum] call rhsm-debug with --no-subscriptionsBryn M. Reeves2014-10-021-1/+1
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [archive] invert sense of six.PY2 testBryn M. Reeves2014-10-011-1/+1
| | | | | | | | | Old versions of six do not include a 'PY2' attribute leading to an exception in sos_get_command_output(). Invert the sense of the test and check that six.PY3 is false instead as all versions of the module include this attribute. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [utilities] invert sense of six.PY2 testBryn M. Reeves2014-10-011-1/+1
| | | | | | | | | Old versions of six do not include a 'PY2' attribute leading to an exception in sos_get_command_output(). Invert the sense of the test and check that six.PY3 is false instead as all versions of the module include this attribute. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [sos] bump version to 3.23.2Bryn M. Reeves2014-09-301-1/+4
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [Plugin] remove add_copy_specs()Bryn M. Reeves2014-09-30119-181/+169
| | | | | | | | | | | Merge add_copy_specs() into add_copy_spec() and treat any strings passed to the new method as though they were a single item list. Mirrors the prior change to add_cmd_outputs(). Fixes #301. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [Plugin] remove add_cmd_outputs()Bryn M. Reeves2014-09-3058-82/+79
| | | | | | | | | | | Remove add_cmd_outputs() and allow add_cmd_output() to accept a list of commands to invoke. Add a check and warn via the logs if a plugin attempts to use 'root_symlink' or 'suggest_filename' with a command list of length > 1. Fixes #301. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [kpatch] new pluginBryn M. Reeves2014-09-301-0/+38
| | | | | | Based on a suggestion from Marc Milgram in rhbz#1110918. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>