aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [emc,symcli] move symcli collection into its own plugin.Bryn M. Reeves2014-09-182-72/+96
| | | | | | Related: #257. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [general] collect 'hostname' as well as 'hostname -f'Bryn M. Reeves2014-09-181-5/+2
| | | | | | | | | | | | | | | The --fqdn option to hostname depends on the system resolver configuration. On hosts where the fqdn is undefined the command may return: "hostname: Name or service not known" Since hostname will at least give the locally configured name regardless of resolver or DNS state collect both commands. Fixes #404. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [openstack_neutron] set correct plugin nameBryn M. Reeves2014-09-181-1/+1
| | | | | | Fixes #394. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [archive] introduce py2.6 TarFile compat wrapperBryn M. Reeves2014-09-181-1/+78
| | | | | | | | | | | Python 2.6 lacks the filter parameter to TarFile.add() that the TarFileArchive uses to preserve permissions on archive content. Work around this by creating a wrapper class that implements the missing functionality (duplicated from the py2.7.5 tarfile.py) and use it whenever running on a python version less than 2.7. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [utilities] do not pass unicode to shlex on PY2 runtimesBryn M. Reeves2014-09-181-0/+3
| | | | | | | | | | | | | | | | | | | | | | | Running sos-3.2beta on a python2.6 runtime leads to: File "/usr/sbin/sosreport", line 25, in <module> main(sys.argv[1:]) File "/usr/lib/python2.6/site-packages/sos/sosreport.py", line 1408, in main sos.execute() TypeError: execve() argument 1 must be encoded string without NULL bytes, not str > /usr/lib64/python2.6/subprocess.py(1234)_execute_child() -> raise child_exception This occurs because some command output is interpreted as unicode by the Python runtime. When this output is processed in a plugin and passed back down to sos_get_command_output() it leads to the above exception. Work around the problem by encoding strings passed to shlex.split on older Python versions. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [docs] update references to report optionsBryn M. Reeves2014-09-171-3/+3
| | | | | | | | | The --report switch was changed to --no-report a while back. Update the docs to reflect the new option. Fixes #396. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [apt] Removing leftover debugging codeLouis Bouchard2014-09-171-1/+0
| | | | | Signed-off-by: Louis Bouchard <louis.bouchard@canonical.com> Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* [apt] switching shell crap to python syntaxLouis Bouchard2014-09-171-6/+7
| | | | | | | Avoid long string of piped shell commands at all cost Fixes: #398 Signed-off-by: Louis Bouchard <louis.bouchard@canonical.com>
* [keyutils] add to the storage profileBryn M. Reeves2014-09-171-1/+1
| | | | | | | Since keyutils is used by several storage components (NFS idmap service, cifs) add it to the 'storage' profile. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [keyutil] add kernel keyring tools supportBryn M. Reeves2014-09-171-0/+35
| | | | | | | Based on a request from Bill Yodlowsky. Collect request-key configuration and the output of 'keyctl show'. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [sos] bump release to 3.2b1Bryn M. Reeves2014-09-171-1/+10
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [juju] Fix backtrace from juju pluginLouis Bouchard2014-09-171-0/+1
| | | | | | | | Restrict plugin execution to when juju is installed Fixes #400 Signed-off-by: Louis Bouchard <louis.bouchard@canonical.com> Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* [teamd] add plugin for network teaming driverBryn M. Reeves2014-09-171-0/+54
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [memory,processor] add to the 'memory' profileBryn M. Reeves2014-09-172-2/+2
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [numa] new plugin for NUMA informationBryn M. Reeves2014-09-171-0/+45
| | | | | | | | | And define a new 'memory' profile to group related plugins together. Fixes #226. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [sosreport] change description of non-default pluginsBryn M. Reeves2014-09-161-1/+1
| | | | | | | | | | | | | | | | | | | | Plugins are currently listed as 'not default' if the plugin's default_enabled() method evaluates to False: sendmail inactive sendmail service snmp inactive Simple network management protocol soundcard not default Sound devices squid inactive Squid caching proxy It sounds odd and it looks ugly in the plugin listing. Change the description to 'optional': sendmail inactive sendmail service snmp inactive Simple network management protocol soundcard optional Sound devices squid inactive Squid caching proxy Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [sosreport] fix whitespace errorsBryn M. Reeves2014-09-161-0/+2
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [soundcard] make plugin default enabledBryn M. Reeves2014-09-161-3/+0
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [satellite] make plugin default enabledBryn M. Reeves2014-09-161-3/+0
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [gluster] remove unnecessary default_enabled()Bryn M. Reeves2014-09-161-3/+0
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [sosreport] profile listing improvementsBryn M. Reeves2014-09-161-13/+30
| | | | | | | | | | | Add a listing of available profiles at the end of --list-plugins output and add plugin and profile counts to the output of both --list-plugins and --list-profiles. Also factor out some common code for formatting commas-separated multi-line lists. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [utilities,plugin] check for return status 126Bryn M. Reeves2014-09-162-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A return status of 126 indicates 'found but not executable'. This is returned from timeout for some malformed commands when running as a normal user but not when running as root, e.g.: Running 1/1: multipath... [plugin:multipath] collecting path '/etc/multipath/' [plugin:multipath] unpacked command tuple: ('['multipath -l', 'multipath -v4 -ll']', 'None', 'None', 300, 'None') [plugin:multipath] collecting output of '['multipath -l', 'multipath -v4 -ll']' 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 1389, in main sos.execute() AttributeError: 'list' object has no attribute 'split' > /usr/lib/python2.7/site-packages/sos/plugins/__init__.py(563)get_cmd_output_now() -> % (exe.split()[0], time() - start)) (Pdb) bt /usr/sbin/sosreport(25)<module>() -> main(sys.argv[1:]) /usr/lib/python2.7/site-packages/sos/sosreport.py(1389)main() -> sos.execute() /usr/lib/python2.7/site-packages/sos/sosreport.py(1369)execute() -> self.collect() /usr/lib/python2.7/site-packages/sos/sosreport.py(1144)collect() -> plug.collect() /usr/lib/python2.7/site-packages/sos/plugins/__init__.py(633)collect() -> self._collect_cmd_output() /usr/lib/python2.7/site-packages/sos/plugins/__init__.py(613)_collect_cmd_output() -> timeout=timeout, runat=runat) > /usr/lib/python2.7/site-packages/sos/plugins/__init__.py(563)get_cmd_output_now() -> % (exe.split()[0], time() - start)) (Pdb) result {'status': 126, 'output': u"timeout: failed to run command '[multipath -l,': Permission denied\n"} Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [multipath] fix add_cmd_output usageBryn M. Reeves2014-09-161-1/+1
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Try to ensure FQDN of host is collectedPeter Portante2014-09-161-1/+6
| | | | | | | | | Not all systems are required to have the generic hostname command return the FQDN. We have encountered customers who require the a short name by default. Adding the "-f" output helps to get that information. Signed-off-by: Peter Portante <peter.portante@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [logs] make journalctl log collection honour all_logsBryn M. Reeves2014-09-161-1/+5
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [logs] improve log collection for journald-only configurationsBryn M. Reeves2014-09-161-1/+14
| | | | | | | | | | If no syslog exists collect the last three days worth of journald logs by default and allow the user to specify a "log_days" option to control the data collected. Fixes #325. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [systemd,logs] move journalctl logs to logs pluginBryn M. Reeves2014-09-162-2/+4
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [sosreport] fix use of -o and -n without --profileBryn M. Reeves2014-09-161-1/+4
| | | | | | | | Break the logic of the combined 'onlyplugins' and profile check out to make it more readable and fix a bug that caused all default plugins to be enabled when running '-o someplug'. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [docker] optional log capturing for all containersAdam Stokes2014-09-161-2/+9
| | | | | | | | | | This options provides the user the ability to pull logs from all containers including the terminated/stopped. Fixes #360 Fixes #365 Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* [sosreport] fix test in SoSReport._is_in_profile()Bryn M. Reeves2014-09-161-1/+1
| | | | | | | | All plugins belong to the null (empty) plugin. Fix the test in _is_in_profile() to check against the list of active profiles and not the list of all detected profiles. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [plugins] do not truncate mangled command namesBryn M. Reeves2014-09-162-3/+1
| | | | | | | | | There's no reason to truncate mangled command names within an archive. This isn't MS-DOS 3.1 and there are cases where the 64 character limit causes a loss of uniqueness and resulting name collisions (e.g. namespaced network commands). Fixes #388.
* [ssmtp] add sSMTP pluginBryn M. Reeves2014-09-161-0/+42
| | | | | | Fixes #395. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [sosreport] allow --profile with -o and -nBryn M. Reeves2014-09-161-5/+9
| | | | | | | | | | | Allow the user to fine-tune the set of enabled plugins using the -o (--only-plugins) and -n (--skip-plugins) options. These add and remove plugins from the set defined by the active profile(s). Both options may be specified multiple times, or given lists of plugins to operate on. E.g.: Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [sosreport] initial profiles supportBryn M. Reeves2014-09-163-7/+102
| | | | | | | | | | | | | | | | | | | Add simple profile support. Plugins can define a 'profiles' attribute that contains a list of profile names that this plugin belongs to. If a profile is given on the command line only plugins belonging to that profile will run. Two new command-line options are introduced in thie commit: --list-profiles --profile=NAME Profiles can be combined with -l/--list-plugins in order to see the effect of the profile on the set of enabled plugins. Fixes #247. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [plugins] improve plugin class docstringsBryn M. Reeves2014-09-16152-311/+161
| | | | | | | | | | | | | Plugin class docstrings should be a brief (42 characters or less) description of the component the plugin supports. This is needed since the class docstring is displayed in the table of enabled plugins when running 'sosreport --list-plugins'. Class docstrings should not describe the distribution a particular class runs on; this is redundant since only plugins tagges with a class matching the running policy will be displayed. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [kernelrt,mrgmessg,mrggrid] add MRG profileBryn M. Reeves2014-09-163-3/+3
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [nfs,nfsserver,sunrpc,autofs] add NFS profileBryn M. Reeves2014-09-164-4/+4
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [apache,selinux,openshift] add OpenShift profileBryn M. Reeves2014-09-163-3/+3
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [plugins] add initial profile tags to all pluginsBryn M. Reeves2014-09-16159-14/+168
| | | | | | | | | | | | | | | | | Add an initial profile tag list to each plugin base class. A tag list is a tuple of strings indicating the set of profiles that should select this plugin, e.g.: plugin_name = "qux" profiles = ('system', 'storage', 'foo) A follow up patch will add infrastructure to use these tag lists to allow the user to select a logically-related set of plugins by specifying a profile on the command line: # sosreport -v --batch --profile=storage Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [docs] improve man page descriptions of --ticket and --case-idBryn M. Reeves2014-09-161-4/+12
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* sosreport: Accept commas, period and alphas in the case idAruna Balakrishnaiah2014-09-163-24/+26
| | | | | | | | | | | | sosreport does not accept commas, period and alphas in the case id, the patch fixes the same. Change the ticket number field to case id as it now accepts alpha numerals as well but maintain the '--ticket-number' option for compatibility. Signed-off-by: Aruna Balakrishnaiah <aruna@linux.vnet.ibm.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [veritas] fix call_ext_prog usageBryn M. Reeves2014-09-151-3/+2
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [ipa] fix get_cmd_output_now usageBryn M. Reeves2014-09-151-1/+1
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [hpasm] fix add_copy_specs() useBryn M. Reeves2014-09-151-1/+1
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [anaconda] make password scrubbing more robustBryn M. Reeves2014-09-141-2/+2
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [abrt] trigger plugin on more packagesBryn M. Reeves2014-09-141-1/+1
| | | | | | Add the GUI and main abrt packages to the plugin's packages list. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [sosreport] remove jython logging handler workaroundBryn M. Reeves2014-09-131-7/+2
| | | | | | | | | | | | The workaround in sosreport.py for log handlers persisting past logging.shutdown() on Jython causes further problems with leaking log handler messages in the non-build case (i.e. where we are calling the Archive's finalize() method). Fix this by removing the workaround since sos no longer targets the Jython runtime. Fixes: #393. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [sosreport] re-order logging shutdownBryn M. Reeves2014-09-131-6/+10
| | | | | | | | | | | | | | | | | | | Currently we remove all log handlers and then add the log files to the archive. This can cause messages to leak to the console when running in --quiet mode: # sosreport -o lvm2 --batch --build --debug --quiet No handlers could be found for logger "sos" This happens because the Archive classes output to the 'sos' logger; removing the handlers before archiving the logs causes a default basicConfig to be used and generates the above message. Add the files to the archive and then remove the handlers. Fixes #393. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [sosreport] log sosreport command lineBryn M. Reeves2014-09-131-0/+3
| | | | | | | | | | Log the command line given to sosreport in the report log: INFO: [sos.sosreport:setup] executing 'sosreport -o lvm2 --batch --build --debug' Fixes #392. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [plugin] ensure Plugin has an 'archive' memberBryn M. Reeves2014-09-121-0/+1
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>