aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [ipsec] Remove IPSec plugin in favor of OpenSwanRobb Manes2019-03-181-42/+0
| | | | | | | | | | | | | | Red Hat distributions have not used the ipsec-tools and racoon packages since RHEL5, and all of this information is collected in the OpenSwan module via the same paths. Similarly, Debian distributions have not provided this since wheezy, and the same data is collected in OpenSwan. Resolves: #1465 Signed-off-by: Robb Manes <rmanes@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [openswan] fix option list styleBryn M. Reeves2019-03-181-3/+4
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [openswan] Forbid collection of secrets and certdbRobb Manes2019-03-181-1/+6
| | | | | | | | | | | | | | When collecting IPSec data, currently nothing prevents the collection of keys or the cert.db files. Ensure we don't collect this information as it is private. Thanks to Robert Bost (@bostrt) for discovering this and Matt Rogers (@mrogers950) for double checking what we should ignore. Resolves: #1463 Signed-off-by: Robb Manes <rmanes@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [utilities] Remove the __path__ attribute comparison with empty stringSourabh Jain2019-03-181-1/+1
| | | | | | | | | | | | | | | This patch removes an unnecessary comparison on package's __path__ attribute with an empty string in get_modules method. When we pass an empty path to _find_plugins_from_list function it returns None. The NoneType is not an iterable entity, so this will leads to runtime error when we extend the plugins list with None value. Resolves: #1463 Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [sosreport] use mode='w' when writing plugin exceptionsFilip Krska2019-03-181-1/+1
| | | | | | | | | | Use append mode when writing to plugin exception files: otherwise, if multiple exceptions occur within one plugin (e.g. in separate execution phases), the later ones will overwrite the earlier. Resolves: #1461 Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [archive] add mode argument to Archive.add_string()Filip Krska2019-03-181-3/+3
| | | | | | | | | Add mode (e.g. to allow append) support to add_string() function. Related: #1461 Signed-off-by: Filip Krska <fkrska@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [ovirt] collect `engine-config -d` when availableDan Kenigsberg2019-03-181-2/+6
| | | | | | | | | | Newer versions of ovirt-engine can produce a short and readable diff from the "factory defaults". Resolves: #1460 Signed-off-by: Dan Kenigsberg <danken@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [openstack_novajoin] Novajoin logs and confDavid Vallee Delisle2019-03-181-0/+40
| | | | | | | Resolves: #1459 Signed-off-by: David Vallee Delisle <dvd@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [networking] call ethtool for proper vlan device namesPavel Moravec2019-03-181-42/+25
| | | | | | | | | | Dont rely on device names from "ip -o link" output where the names contain also physical device name. Rather get the list of device names from listing /sys/class/net/ directory. Resolves: #1458 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [logging] Always cleanup temp directoryJake Hunsaker2019-03-181-0/+1
| | | | | | | | | | | | | | | | When running `sosreport -l`, or the more specific --list-* options, sos still creates a temp directory and log files, however we were not cleaning those up - so over time we could have a multitude of sos temp directories littering the filesystem. Now always cleanup the temp directory after execution. Only exception to this would be if we hit an OSError during execution _and_ the debug option is specified. Resolves: #1456 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [filesys] Use the correct interface when calling dumpe2fsXuewei Zhang2019-03-181-1/+1
| | | | | | | | | | dumpe2fs takes one parameter indicating the device to be dumped. Closes: #1452 Resolves: #1453 Signed-off-by: Xuewei Zhang <xueweiz@google.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [openvswitch] Collect also offloaded flowsPavel Moravec2019-03-181-0/+2
| | | | | | | | | | Dump also any offloaded hardware flows by colling: ovs-dpctl dump-flows type=offloaded -m Resolves: #1450 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [policies] Detect CentOS distribution without D/S patchesMiguel Angel Ajo2019-03-181-1/+13
| | | | | | | | | | | | | | This partially fixes issue #1264 by handling the CentOS and CentOS Atomic hosts, partially based on the CentOS packaging patch [1]. Without this patch, if you try to develop sosreports on a CentOS host, you will get an empty list of plugins. [1] https://git.centos.org/blob/rpms!sos.git/c7/SOURCES!sos-3.4-centos-branding.patch Resolves: #1447 Signed-off-by: Miguel Angel Ajo <majopela@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [pacemaker] leave CIB file collection to crm_reportKen Gaillot2019-03-181-3/+0
| | | | | | | | | | | | The plugin previously collected the CIB, which may contain sensitive information, without scrubbing it. While the plugin could scrub it, it will already be collected (scrubbed) by the crm_report command run in setup(), so the plugin's collection is redundant and can be removed. Resolves: #1444 Signed-off-by: Ken Gaillot <kgaillot@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [pacemaker] only run pcs commands on systems that support itKen Gaillot2019-03-181-5/+2
| | | | | | | | | | pcs commands should be run in pcs_setup() rather than setup(), so they are only called on distributions that ship pcs Related: #1444 Signed-off-by: Ken Gaillot <kgaillot@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [kubernetes] improve parsing namespacesPavel Moravec2019-03-181-1/+3
| | | | | | | | | Handle (theoretical) cases when "kubectl get namespace" returns a line with white characters only, and prevent IndexError to be raised. Resolves: #1442 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [openstack_nova] list all non-admin instances tooMiguel Angel Ajo2019-03-181-1/+1
| | | | | | | | | | | | | | | | | | | | The current command in the openstack_nova.py plugin $ nova list Returns an incomplete list of instances when called as administrator, which results in incomplete sosreports. The right command to use to get a complete list of instances is: $ nova list --all-tenants Closes: #1439 Resolves: #1440 Signed-off-by: Miguel Angel Ajo Pelayo <majopela@redhat.com> Signed-off-by: Assaf Muller <amuller@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [lustre] Collect ring buffer dumps on all_logsNathaniel Clark2019-03-181-0/+4
| | | | | | | | | | | Collect emergency dumps of the lustre ring buffer if all_logs is set. These files are dumps of the Lustre ring buffer, that are dumped under certain conditions Resolves: #1436 Signed-off-by: Nathaniel Clark <Nathaniel.Clark@misrule.us> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [plugins] Add new plugin cifsPierguido Lambri2019-03-181-0/+30
| | | | | | | | | This collects few configuration files and cifs data. Resolves: #1434 Signed-off-by: Pierguido Lambri <plambri@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [openvswitch] Add FDB bridge statisticsEelco Chaudron2019-03-181-1/+2
| | | | | | | | | Add the ovs-appctl fdb/stats command for each bridge. Resolves: #1431 Signed-off-by: Eelco Chaudron <echaudron@gmail.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [systemd] Add 'systemctl list-jobs' to systemd pluginHATAYAMA Daisuke2019-03-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the output of 'systemctl list-jobs', providing a list of jobs that are in progress. This is sometimes useful when we try to analyze troubles such as some units are unexpectedly not started/stopped. For example, consider there is the inquiry from some customer that multi-user.target on our system is configured as default.target but is still inactive after system boot, why? # LANG=C systemctl get-default multi-user.target # LANG=C systemctl status multi-user.target * multi-user.target - Multi-User System Loaded: loaded (/usr/lib/systemd/system/multi-user.target; \ enabled; vendor preset: disabled) Active: inactive (dead) Docs: man:systemd.special(7) In such case, systemctl list-jobs gives us the clear suggestion that there is a still running start job for foobar.service and multi-user.target and the other units are waiting for it to finish. # LANG=C systemctl --no-pager list-jobs JOB UNIT TYPE STATE 112 multi-user.target start waiting 226 systemd-update-utmp-runlevel.service start waiting 258 foobar.service start running 236 systemd-readahead-done.timer start waiting 4 jobs listed. Resolves: #1427 Signed-off-by: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [kubernetes] Collect additional resourcesJake Hunsaker2019-03-181-2/+9
| | | | | | | | | Adds several resources for 'kubectl get' output. Resolves: #1424 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [origin] Collect deploymentconfigs from additional namespacesJake Hunsaker2019-03-181-2/+19
| | | | | | | | | | | | | | The origin plugin will now collect deploymentconfig output from more than just the 'default' namespace. Now it will collect from 'default', 'openshift-web-console', and 'openshift-ansible-broker' by default and a new 'all-namespaces' option has been added to allow deploymentconfig collection from all existing namespaces. Closes: #1410 Resolves: #1423 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [openstack_glance] fix typo from commit 2b29530Pavel Moravec2019-03-181-1/+1
| | | | | | | | false -> False Resolves: #1420 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [ovirt] Collect engine heap dump only if it's specifiedNijin Ashok2019-03-181-1/+7
| | | | | | | | | | | | | Currently the java heap dump of engine process is collected from "/var/log/ovirt-engine/dump" by default. The size of these dumps are very large which will increase the size of collected sosreport significantly. The dumps are not required for most of the cases and hence collect it only if it's specified using -k ovirt.heapdump Resolves: #1415 Signed-off-by: Nijin Ashok <nashok@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [etcd] Don't collect private .key filesJake Hunsaker2019-03-181-1/+4
| | | | | | | | | | Prevent the etcd plugin from capturing private keys. Closes: #1403 Resolves: #1414 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [landscape] Add copy of Landscape OOPS filesEric Desrochers2019-03-181-0/+1
| | | | | | | | | | | | | | | | | When a deviation from correct behaviour occurs Landscape may generate a very lightweight OOPS file useful for debugging file as follow: Format: /var/lib/landscape/landscape-oops/<YYYY-MM-DD>/OOPS-<OOPS-ID> OOPS-ID represent the ID displayed in the Landscape WebUI when an oops occurs. Resolves: #1413 Signed-off-by: Eric Desrochers <eric.desrochers@canonical.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [logrotate] fix path for logrotate.status in RHEL7/CentOS7Andrea Perotti2019-03-181-0/+1
| | | | | | | | | | In RHEL7/CentOS7 logrotate.status is placed in /var/lib/logrotate rather then directly in /var/lib. Resolves: #1412 Signed-off-by: Andrea Perotti <aperotti@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [x11] Add .old files to check previous executionsMikel Olasagasti Uranga2019-03-181-0/+2
| | | | | | | Resolves: #1286 Signed-off-by: Mikel Olasagasti Uranga <mikel@olasagasti.info> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [azure] Added /var/log/azure directory to sosreportBryn M. Reeves2019-03-181-1/+10
| | | | | | | Resolves: #1274 Suggested-by: Dave Mulford <dave.mulford@gmail.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [sosreport] Allow user-controllable plugin timeoutsJake Hunsaker2019-03-124-6/+57
| | | | | | | | | | | | | | | | | | | | Allows users to specify a timeout for each plugin using the '-k plugin.timeout=value' syntax by adding the 'timeout' option to every plugin. Additionally, adds the --plugin-timeout option to set a timeout for _all_ plugins. If --plugin-timeout and a specific -k timeout option is provided, the -k timeout option will be applied for those specific plugins, with --plugin-timeout being applied to all others. In either case, specifying a timeout of 0 seconds results in no timeout being applied. In the event that an invalid timeout is set, the timeout will be set to the default value for the plugin. Resolves: #1499 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [pcp] collect 12 newest pmlogger files regardless of sizePavel Moravec2019-03-121-7/+21
| | | | | | | | | | | - collect reasonable count of pmlogger files instead of sizelimit - (configurable via pcp.pmloggerfiles plugin option - prevent pmlogger/pmmgr binary files to be truncated/tailed Resolves: #1496 Signed-off-by: Pavel Moravec <pmoravec@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [podman|docker] Add postprocessing for container inspect outputJake Hunsaker2019-03-122-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a postproc for the podman and docker plugins to attempt to obfuscate sensitive keys in 'inspect' output for those runtimes. Previously, these keys were being captured in plaintext which could lead to passwords or similar being leaked when sysadmins configure containers with environment variables (or similar) that contain this data. Specifically, we match against 'key=value' pairs as that is how the container runtimes accept and print these pairs, like so: "Env": [ "mypassword=supersecret", "container=oci" ], By comparison, the inspect outputs now read like the following when a potentially sensitive key is found: "Env": [ "mypassword=********", "container=oci" ], Resolves: #1487 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [boom] collect entire /boot/boom treeBryn M. Reeves2019-03-111-1/+1
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [boom] add RHEL7 packages to listBryn M. Reeves2019-03-111-1/+6
| | | | | | RHEL7 ships boom as part of LVM2: lvm2-python-boom. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [composer] Collect sources info for all sourcesJake Hunsaker2019-03-041-10/+12
| | | | | | | | | | | Adds collection of info on each source found by composer-cli. The _get_blueprints() method has been made more generic to accomodate both blueprints and sources. Resolves: #1571 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [policies] Fix setting the custom name_patternVille Heikkinen2019-03-041-0/+1
| | | | | | | | | | | | | | | | Added initialization of date variable, so that it's possible to set the custom name_pattern. Without the fix, if the name_pattern is set in the plugin to be something else than 'legacy' or 'friendly', the report generation will fail to error UnboundLocalError: local variable 'date' referenced before assignment Resolves: #1570 Signed-off-by: Ville Heikkinen <ville.heikkinen@nokia.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [docker] Don't run docker commands when the service is not runningJake Hunsaker2019-03-041-3/+8
| | | | | | | | | Prevents the docker plugin from running docker commands when the service is not running. This will prevent us from collecting the same 'docker is not running' error message over and over again from the docker commands that would otherwise get run. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [policy|plugin] Add 'is_running' check for servicesJake Hunsaker2019-03-042-5/+23
| | | | | | | | | | | | | | | | | | | | Adds a method to the InitSystem class used by policies and plugins to check if a given service name is running. Plugins can make use of this through the new self.service_is_running() method. For policies that use the base InitSystem class, this method will always return True as the service_is_running() method is likely to be used when determining if we should run commands or not, and we do not want to incorrectly stop running those commands where they would collect meaningful output today. The SystemD init system for policies properly checks to see if the given service is active or not when reporting is the service is running. Resolves: #1567 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [services] add rc.localBryan Quigley2019-03-041-1/+2
| | | | | | | | Resolves: #1566 Closes: #1545 Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [systemd] Add many other lists, statusesBryan Quigley2019-03-041-0/+6
| | | | | | | | | | | | | | | | | | systemctl list-jobs - any currently runnign list-dependencies - nice dependency tree list-timers --all - what timers are setup/active list-machines - for systemd container orcestration systemd-resolve --status - what link is using what dns server, etc --statistics - how cache/DNSSEC/etc are doing Resolves: #1565 Closes: #1457 Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [system] collect /etc/environmentBryan Quigley2019-03-041-0/+1
| | | | | | | | Resolves: #1564 Closes: #1550 Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [watchdog] collect wdctl /dev/watchdog* outputsPavel Moravec2019-03-041-0/+4
| | | | | | | Resolves: #1561 Signed-off-by: Pavel Moravec <pmoravec@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [travis] Update python versions and 14.04 -> 16.04Bryan Quigley2019-03-041-3/+3
| | | | | | | | | | | | | | The change notes specifically mention how they've improved performance including boot times with 16.04. Python 3.7 is now stable. Add --version flag for pycodestyle. Resolves: #1554 Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [openstack_nova] Remove redundant Docker callLee Yarwood2019-03-041-1/+0
| | | | | | | | | | This call is no longer used and was missed during the clean up in 2b29530eb50ab1016937f5c28adaf4e2288e46be. Resolves: ##1552 Signed-off-by: Lee Yarwood <lyarwood@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [xfs] add /sys/fs/xfs to XFS pluginBryn M. Reeves2019-03-011-1/+4
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [crio] Add tagging classesJake Hunsaker2019-02-251-1/+1
| | | | | | | | | Adds tagging classes so plugin will run on Red Hat and Ubuntu based systems. Resolves: #1578 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [general] fix pycodestyle indentation errorsPavel Moravec2019-02-074-20/+20
| | | | | | Resolves: #1556 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [satellite] don't collect /root/ssl-buildPavel Moravec2019-02-011-1/+1
| | | | | | | | Recursive listing of the directory is sufficient. Resolves: #1555 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [grub2] Enable plugin by grub2-common package alsoPavel Moravec2019-01-211-1/+2
| | | | | | | | | | | Newer Fedora systems, grub2 package is replaced by grub2-common that needs to enable grub2 plugin by default as well. Additionally, collect /boot/loader/entries with boot list entries. Resolves: #1543 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>