aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [containers_log] Fetch all container logsCédric Jeanneret2019-08-2624-89/+37
| | | | | | | | | | | | | | | | | | | | | | Until now, we didn't have a central plugin for collecting service container logs. Each service was managing its own things, and this lead to missing log files in the past. Ensuring we fetch the content of /var/log/containers on its own ensures we won't forget to add possible new directories, like the "stdouts" we recently added in OpenStack in order to get the container STDOUT written on the disk. Therefore, this commit does 2 main things: - cleanup all the /var/logs/containers custom copy - create a central plugin that takes care of this location on its own. It's active by default and ensure the location actually exists. Resolves: #1668 Signed-off-by: Cédric Jeanneret <cjeanner@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [ipvs] Only run ipvsadm commands if the ip_vs kernel module is loadedPatrick Talbert2019-08-261-2/+2
| | | | | | | | | | | Running any ipvsadm command can cause the kernel to autoload the ip_vs module. So only run ipvsadm commands if the ip_vs kernel module is found to already be loaded on the system. Resolves: #1634 Signed-off-by: Patrick Talbert <ptalbert@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [openvswitch] Capture DPDK PMD performance countersEelco Chaudron2019-08-261-1/+3
| | | | | | | Resolves: #1686 Signed-off-by: Eelco Chaudron <echaudro@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [ceph] Add additional commands to capture dataAshish Singh2019-08-261-1/+3
| | | | | | | | | Add addtional commands to ceph plugin. Resolves: #1694 Signed-off-by: Ashish Singh <assingh@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [openstack_*] Remove duplicate rpm verify from OpenStack pluginsJake Hunsaker2019-08-2614-40/+0
| | | | | | | | | | | | | | A number of openstack plugins were calling 'rpm -V' against their own package lists as part of their setup() method when the --verify option is given to sos. This is already done in normal plugin execution, so there is no need to duplicate the calls. This change removes these calls from the openstack plugins. Resolves: #1696 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [plugins] log when skipping files over size limitPavel Moravec2019-08-261-15/+21
| | | | | | | | | | Sosreport should log when skipping files due to sizelimit. That gives users valuable information about remaining files on the system. Resolves: #1719 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [openstack_instack] Add container-image-prepare logCédric Jeanneret2019-08-261-0/+1
| | | | | | | | | | | | | | | | | During undercloud and overcloud deploy preparation steps, a task is fetching container images and pushing them to a local registry (usually on the undercloud directly). Since this task might fail at some point, we need this log in order to properly debug the issue and provide better support. The task itself doesn't produce any other output than this log, and only exists on the undercloud. Resolves: #1730 Signed-off-by: Cédric Jeanneret <cjeanner@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [ceph] Add quorum_status and mon_statusJorge Niedbalski2019-08-261-0/+2
| | | | | | | | | | This change adds the quorum_status and mon_status output to the ceph plugin. Resolves: #1738 Signed-off-by: Jorge Niedbalski <jorge.niedbalski@canonical.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [kdump] collect kdump initramfs contentSourabh Jain2019-08-261-0/+13
| | | | | | | | | | This patch adds a command (lsinitrd) to extract the content of kdump initramfs. Resolves: #1744 Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [plugins] Fix ignored parameters in get_cmd_output_now()Kazuhito Hagio2019-08-261-1/+3
| | | | | | | | | | | | Currently the get_cmd_output_now() function does not pass 'suggest_filename' and 'root_symlink' parameters to _get_cmd_output_now() function, so the parameters passed from plugins are ignored. Let's fix this. Resolves: #1745 Signed-off-by: Kazuhito Hagio <k-hagio@ab.jp.nec.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [instack] getting a copy of tripleo-configDavid Vallee Delisle2019-08-261-0/+1
| | | | | | | | | | | When troubleshooting containerized OOO Deployments, it can help a lot to have the tripleo-config files on the overcloud nodes. Resolves #1760 Signed-off-by: David Vallee Delisle dvd@redhat.com Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [policies/amazon] Handle missing /etc/os-release properlypmoravec2019-08-261-0/+4
| | | | | | | | | Catch use cases when /etc/os-release is missing by returning Amazon policy as disabled. Resolves: #1763 Signed-off-by: pmoravec <pmoravec@redhat.com>
* [openstack_instack] Collect /home/stack/.tripleo/historyAssaf Muller2019-08-261-1/+5
| | | | | | | | | | | | | The 'history' file includes one line for every cmdline invocation of TripleO. The file includes useful information to troubleshoot TripleO based OpenStack deployments, as it includes timestamps for operations, so the troubleshooter will now be able to know when the last operation happened. Resolves: #1765 Signed-off-by: Assaf Muller <amuller@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [openvswitch] catch all openvswitch2.* packagesDavid Marchand2019-08-261-1/+1
| | | | | | | | | | | | | Since the release of openvswitch 2.10, the Red Hat Fast Datapath channel maintains multiple versions of openvswitch. Update the list of packages using a wildcard to catch all openvswitch2.* packages. Resolves: #1768 Signed-off-by: David Marchand <david.marchand@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [openstack_octavia] fix debian/ubuntu package nameTrent Lloyd2019-08-251-1/+1
| | | | | | | | | | The correct package name for Debian/Ubuntu is 'octavia-common' rather than 'openstack-octavia-common' (which was from RedHat). Resolves: #1751 Signed-off-by: Trent Lloyd <trent@lloyd.id.au> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [lstopo] Fix to not depend on distutilsBryan Quigley2019-08-251-3/+3
| | | | | | | | | | | | | This adds support for Ubuntu and drops the depends on distutils replacing with the sos utility. I believe the functionality should be the same, and appears to work on Ubuntu. Closes: #1656 Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [man] remove obolete references to XML reportsPavel Moravec2019-08-251-3/+3
| | | | | | | | | As XML reports were removed from sos, manpages should not refer to them further. Resolves: #1669 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [qpid] collect DB_CONFIGPavel Moravec2019-08-251-0/+2
| | | | | | | | | Collect Berkely DB config file important for scaled environments with many durable queues. Resolves: #1721 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [manpages] describe --note optionPavel Moravec2019-08-251-1/+3
| | | | | | Resolves: #1724 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [satellite] dont collect apache and squid dataPavel Moravec2019-08-251-9/+0
| | | | | | | | Stop collecting duplicate data that apache and squid plugin are responsible for. Resolves: #1766 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [networking] Update predicate usageJake Hunsaker2019-08-251-13/+5
| | | | | | | | | | | Updates predicate usage within the networking plugin to now require all kmods needed for 'ss' output to be present. Additionally, removes the extra check for --allow-system-changes since that is handled directly in predicate evaluation. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [Plugin] Allow predicates to match any or all given itemsJake Hunsaker2019-08-251-13/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Expands predicate evaluation to be able to evaluate True or False depending on if any of the passed items are present (previous behavior) or if _all_ the passed items need to be present. This is handled by optionally passing a dict via the 'required' argument to SoSPredicate. The keys in this dict are items supported by SoSPredicate (currently 'kmods' and 'services'), with values being either 'any' or 'all'. Both kmods and services can be passed to the same predicate to allow fine-grained control over if a command should be collected. The default behavior remains the same, meaning that both 'kmods' and 'services' are set to 'any' for the required dict. For example, creating a predicate like the following: SoSPredicate(self, kmods=['foo', 'bar'], services=['oof', 'rab']) implies "required={'kmods': 'any', 'services': 'any'}" and thus as long as either kmods _and_ either of the services exist, the predicate evaluates True. If, for example, neither of the kmods are present, the predicate will evaluate False. Providing a predicate like the following however, will require _both_ kmods to be present and either of the services to evaluate True. If either kmods are not present, and --allow-system-changes is not set by the end user, this predicate will evaluate False: SoSPredicate(self, kmods=['foo', 'bar'], services=['oof', 'rab'], required={'kmods': 'all'}) Further, --allow-system-changes is handled directly in predicate evaluation for kmods, meaning individual plugins (like networking) do not need to separately check for if this flag is set or not. However, they will still need to specify 'changes=True' to the add_cmd_ouput() call if the intent is for the warning message that gets logged to include a mention about using --allow-system-changes. Fixes: #1755 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [vdsm]: Fix executing shell commandsMartin Perina2019-08-251-2/+2
| | | | | | | | | | | | | | | During review process of [1] it was suggested to replace '/bin/sh' with just 'sh', but unfortunately this change caused an error to not include information about VDSM mount points as described in [2]. This fix restores previous state and add full path to shell executions. [1] https://github.com/sosreport/sos/pull/1205 [2] https://bugzilla.redhat.com/1743304 Resolves: #1761 Signed-off-by: Martin Perina <mperina@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [libvirt] Collect rotated qemu logs and remove size limitsJake Hunsaker2019-08-251-4/+6
| | | | | | | | | | | | | | Expands qemu log collection to included rotated logs. Additionally, removes the 5MB limit for each path collection as sos now has implicit size limiting in place, and 5MB would be too small of a limit for systems running a large number of VMs (such as OSP or oVirt nodes). Resolves: #1758 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [Plugin] Apply cmd predicates to add_cmd_outputJake Hunsaker2019-08-251-0/+2
| | | | | | | | | | | | | | | | | If no predicate was passed to add_cmd_output() calls, then a predicate set by set_cmd_predicate() was not being applied to those calls, thus leading to a 'None' predicate being evaluated and potentially causing an exception in plugins such as docker where the bulk of command collection is gated by the service running. Now if no predicate is handed to add_cmd_output(), and a cmd_predicate has been set, then the cmd_predicate is applied before being handed off to the _add_cmd_output() helper. Fixes: #1756 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [ovirt_hosted_engine] Add gluster deployment and cleanup logGobinda Das2019-08-251-0/+6
| | | | | | | Resolves: #1748 Signed-off-by: Gobinda Das <godas@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [leapp] Add Plugin From DownstreamJake Hunsaker2019-08-251-0/+33
| | | | | | | | | | | Adds the downstream leapp plugin directly into sos. Additionally fixing an issue where the leapp database may be truncated, rendering the collected database file unusable. Resolves: #1753 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [candlepin] collect sizes of DB tablesPavel Moravec2019-08-251-0/+58
| | | | | | Relevant to: #1749 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [foreman] collect sizes of DB tablesPavel Moravec2019-08-251-5/+26
| | | | | | | | Also prevent overwriting os.environ["PGPASSWORD"] by other plugins. Resolves: #1749 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [openstack_nova] apply sizelimit to each logfile separatelyPavel Moravec2019-08-251-6/+18
| | | | | | | | | | | | Apply sizelimit separately to individual logfile types to esnure newest logfile of each type is always collected. Further, collect also logrotated version fo those files (up to sizelimit). Resolves: #1747 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [dnf] collect all configs and logrotated logsPavel Moravec2019-08-251-8/+4
| | | | | | | | Collect whole /etc/dnf and logrotated /var/log/dnf{,librepo,rpm}.log* Resolves: #1746 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [kdump] collect kexec_crash_* on all distributionsPavel Moravec2019-08-251-1/+5
| | | | | | | | | Collect /sys/kernel/kexec_crash_[size|loaded] on both RedHat and Debian distributions. Resolves: #1742 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [sosreport,reporting] replace HTML reports by Report subclassPavel Moravec2019-08-254-186/+199
| | | | | | | | | | | | | | | Current HTML report generation is slow and its implementation is full of scattered html code. We shall utilize Report class instead. Additionally, add JSON report format for easy automated parsing. Further, fixed decoding of unicode content of a report. Fixed report_tests suite including some pycodestyle errors. Resolves: #1713 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [crio] Write outputs to subdir, fix possible exception in output parsingJake Hunsaker2019-08-251-4/+5
| | | | | | | | | | | | | Updates the plugin to write container/image/pod output from crictl to subdirs. Additionally, fixes an issue where an exception could be raised when a crictl command has no output at all. Resolves: #1706 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [ovirt] Collect host certsPavel Moravec2019-08-251-0/+8
| | | | | | | | Collecting /etc/pki/ovirt-engine/ helps to identify expired host certs. Resolves: #1704 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [vdsm] collect vdsm certsPavel Moravec2019-08-251-2/+3
| | | | | | | | Collecting /etc/pki/vdsm/certs/ helps to identify expired host certs. Resolves: #1703 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [networkmanager] collect custom scriptsPavel Moravec2019-08-251-1/+2
| | | | | | | | Collect custom scripts from /etc/NetworkManager/dispatcher.d directory Resolves: #1701 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [libraries] Add path environment variablesJake Hunsaker2019-08-251-0/+6
| | | | | | | | | Adds collections of path related env vars. Resolves: #1679 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [qt] Add New PluginJake Hunsaker2019-08-251-0/+29
| | | | | | | | | Adds a new plugin for Qt. Currently, this plugin only collects relevant environment variables and activates/verifies on the 'qt' package on Red Hat family distributions. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [dbus] Add environment variable collectionJake Hunsaker2019-08-251-0/+2
| | | | | | | Adds collection of the DBUS_SESSION_BUS_ADDRESS env var. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [x11] Collect X related environment variablesJake Hunsaker2019-08-251-0/+15
| | | | | | | | Adds collection of XDG environment variables, as well as DISPLAY and DESKTOP_SESSION. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [host] Add collection of environment variablesJake Hunsaker2019-08-251-0/+6
| | | | | | | | Adds collection of common environment variables relevant to support cases surrounding shell issues. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [kubernetes] Collect proxy env varsJake Hunsaker2019-08-251-0/+7
| | | | | | | Adds collection of proxy environment variables. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [podman] Collect proxy env varsJake Hunsaker2019-08-251-0/+7
| | | | | | | Adds collection of proxy environment variables. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [docker] Collect proxy env varsJake Hunsaker2019-08-251-0/+9
| | | | | | | Adds collection of proxy environment variables. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [crio] Capture proxy env varsJake Hunsaker2019-08-251-0/+7
| | | | | | | Adds collection of proxy environment variables. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [sosreport] grab logs since datePavel Moravec2019-08-256-12/+65
| | | | | | | | | | | | Adds a --since switch that takes a date as an argument. This switch will skip the archive files with a mtime older than the date. Also, --since affects journalctl execution for --all. Resolves: #1678 Signed-off-by: David Vallee Delisle <dvd@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [boot] Capture SecureBoot configuration statePavel Moravec2019-08-251-1/+4
| | | | | | | | | | Adds collection of mokutil to show is SecureBoot is enabled on the system or not. Fixes: #1574 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [scsi] call lsscsi with "-i" optionPavel Moravec2019-08-251-4/+2
| | | | | | | | | To get the WWID sd device combination in a single command. Resolves: #1626 Signed-off-by: Nitin U. Yewale <nyewale@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [networking] use automatic pred warning for ss and macsec commandsBryn M. Reeves2019-08-161-18/+6
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>