aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [tmpfiles.d] Provide a tmpfiles.d conf exampleEric Desrochers2020-08-131-0/+4
| | | | | | | | | | | | | | | | sos will now enforce /var/tmp to store its content. This example is for vendors such as Debian/Ubuntu without a current /var/tmp systemd-tmpfiles cleaning directive in place. Debian bug reference: #966621 Closes: #2178 Resolves: #2195 Signed-off-by: Eric Desrochers <eric.desrochers@canonical.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [openstack_octavia] Collect new API resourcesCarlos Goncalves2020-08-131-36/+43
| | | | | | | | | | | | | | | | OpenStack Octavia has introduced new API-level resources: - Availability Zones - Availability Zone Profiles - Flavors - Flavor Profiles - Providers - Provider Capabilities Resolves: #2185 Signed-off-by: Carlos Goncalves <cgoncalves@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [report] Fix typo in get_fibre_devs()Jake Hunsaker2020-08-121-1/+1
| | | | | | Fixes a typo in `get_fibre_devs()` in the call to `os.path.isdir()`. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [networkmanager] catch states when nmcli status failsPavel Moravec2020-08-111-1/+2
| | | | | | | | | | Catch situations when nmcli is not installed or returns nonzero; status['output'] is then empty. Resolves: #2191 Signed-off-by: Pavel Moravec <pmoravec@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [rpm] increase timeout of "rpm -Va"Pavel Moravec2020-08-111-1/+2
| | | | | | | | | | | Since "rpm -Va" takes often more time than the current timeout, let increase it accordingly, along with plugin_timeout. Closes: #1369 Resolves: #2193 Signed-off-by: Pavel Moravec <pmoravec@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [audit] collect /etc/audispPavel Moravec2020-08-071-1/+2
| | | | | | | | | Collect audit event multiplexor config dir. Resolves: #2187 Signed-off-by: Pavel Moravec <pmoravec@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [plugins] Proper apply sizelimit in some corner casesPavel Moravec2020-08-041-3/+7
| | | | | | | | | | | | | | In case sizelimit on a copysspec is exceeded, we must tail just the "size till the sizelimit" amount of the file. In case sizelimit is just exactly reached, we must collect the file but mark the limit is reached. Closes: #2175 Resolves: #2186 Signed-off-by: Pavel Moravec <pmoravec@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [openstack_octavia] Protect server key passphraseCarlos Goncalves2020-08-041-1/+1
| | | | | | | | | | | | Configuration setting server_certs_key_passphrase is a passphrase for encrypting amphora certificates and private keys. It should be a protected key. Closes: #2183 Resolves: #2184 Signed-off-by: Carlos Goncalves <cgoncalves@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [openstack_octavia] Copy all etc filesCarlos Goncalves2020-08-041-3/+6
| | | | | | | | | | | | Deployments may have multiple .conf and other relevant files (e.g. policy.json) files under var_config_data and var_puppet_gen etc/octavia directories. This is true for OpenStack TripleO deployments. Closes: #2181 Resolves: #2182 Signed-off-by: Carlos Goncalves <cgoncalves@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [example_plugin] Remove example pluginBryan Quigley2020-07-311-53/+0
| | | | | | | | | | The docs are better than copying this plugin. Closes: #2070 Resolves: #2167 Signed-off-by: Bryan Quigley <code@bryanquigley.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [drbd] Fix package detectionEric Desrochers2020-07-311-1/+1
| | | | | | | | | | Corrects the wildcard usage in package naming. Closes: #2169 Resolves: #2170 Signed-off-by: Eric Desrochers <eric.desrochers@canonical.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [drbd] Fix drbdsetup insufficient argumentsEric Desrochers2020-07-301-2/+2
| | | | | | | | | | Add required 'all' parameter to drbdsetup Closes: #2171 Resolves: #2173 Signed-off-by: Eric Desrochers <eric.desrochers@canonical.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [travis] drop 16.04/py3.5 and fix build to use pythonBryan Quigley2020-07-301-17/+3
| | | | | | | | | | Was determined we can drop Ubuntu 16.04 and python3.5 support. Also broke build cause we are trying only python3 now. Resolves: #2168 Signed-off-by: Bryan Quigley <code@bryanquigley.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [policies] remove osxBryan Quigley2020-07-301-20/+0
| | | | | | | | | Hasn't been any osx specific activity in years. Resolves: #2166 Signed-off-by: Bryan Quigley <code@bryanquigley.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [build] Remove sos.conf from setup.py, make config file optionalJake Hunsaker2020-07-292-3/+4
| | | | | | | | | | | | | | | | | | | In the recent packaging update (#2160), sos.conf was added to `setup.py` to include it in the source distribution tarball produced. That was the wrong approach, as setuptools explicitly tries to prevent files from being written outside of the package directory. Instead, the correct approach is to make the config file effectively optional, by producing a warning message when it doesn't exist, but still continue on with the defaults rather than aborting. Note that parsing errors and duplicate entries will still cause sos to abort execution. Resolves: #2174 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Bryan Quigley <code@bryanquigley.com>
* [autofs]: obsfucate password in `automount -m` cmdRohan Sable2020-07-271-0/+5
| | | | | | | | | | | | | This patch adds scrubbing of plain text password from the output of `automount -m` command. Before Patch : test | -fstype=cifs,username=user,password=pass //server/sambashare After Patch : test | -fstype=cifs,username=user,password=**** //server/sambashare Signed-off-by: Rohan Sable <rohanjsable@yahoo.com>
* [build] Remove Makefiles from treeJake Hunsaker2020-07-279-595/+0
| | | | | | | | | | Removes all Makefiles from the tree, as of 4.0 the supported method of packaging is via setuptools. Related: #2160 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Bryan Quigley <code@bryanquigley.com>
* [build] Update specfile and setuptoolsJake Hunsaker2020-07-272-34/+53
| | | | | | | | | | Updates the specfile for 4.0, specifically supporting py3 builds in conjunction with setuptools. Closes: #307 Resolves: #2160 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [hyperv] import from proper classPavel Moravec2020-07-231-1/+1
| | | | | | To follow new directory structure. Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [haproxy] enable the plugin when puppet-generated subdir existsPavel Moravec2020-07-231-2/+3
| | | | | | | | | | The plugin should be enabled also in containers where haproxy package is missing but thevar_puppet_gen directory exists. Resolves: #2163 Signed-off-by: Pavel Moravec <pmoravec@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [kubernetes] ignore blank+empty lines in "kubectl get nodes" outputPavel Moravec2020-07-231-1/+5
| | | | | | | | | | In a theoretical case when the command output contains empty or blank line, we must skip them before finding the first word there. Resolves: #2162 Signed-off-by: Pavel Moravec <pmoravec@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [hyperv] Add plugin for Hyper-V clientsKameron Carr2020-07-231-0/+28
| | | | | | | | | | The hyperv plugin collects config files specific to Hyper-V and runs commands for debugging the vmbus. Resolves: #2151 Signed-off-by: Kameron Carr <kameroncarrcollege@gmail.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [sos_extras] Update extras directory pathJake Hunsaker2020-07-211-4/+2
| | | | | | | | Updates the `sos_extras` plugin to use `/etc/sos/extras.d/` now instead of /etc/sos.extras.d plugin to use `/etc/sos/extras.d/` now instead of `/etc/sos.extras.d/` Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Update sos.conf locationJake Hunsaker2020-07-211-4/+5
| | | | | | Updates the check for sos.conf with the new location Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [host] Update sos config collectionJake Hunsaker2020-07-211-1/+3
| | | | | | | | Updates the host plugin to capture from /etc/sos now that the config layout has been changed. Adds a forbidden path to never collect the default_mapping file generated by `sos clean`. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [docs] Update man page for sos.conf after configuration redesignJake Hunsaker2020-07-212-2/+76
| | | | | | | | | | | | | Updates the manpage for further changes to the configuration design of sos. `man sos.conf` now includes information on non-root user overrides, as well as information regarding the subdirectories under `/etc/sos/` or `$HOME/.config/sos/`. The `sos_extras` plugin docstring has been copied into the man page as well for better coverage of how users are expected to use that plugin. The docstring remains in place in the actual plugin as well. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [collect] Update host group loading from /etc/sosJake Hunsaker2020-07-211-14/+26
| | | | | | | | | | | | | | | | | | Updates `sos collect` to read and write host group configurations to `/etc/sos/groups.d/` if run as root, or `~/.config/sos/groups.d/` if run as non root. Note that non-root users will be able to read host group files in `/etc/sos` to allow for easier inter-user sharing, but non-root users will not be able to write or update config files in that location. The order of precedence for loading host groups is: 1. The value of `--group` is an actual file path 2. The group definition exists under ~/.config/sos/groups.d/ 3. The group definition exists under /etc/sos/groups.d/ Related: #2125 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [report] Update preset config path and loading.Jake Hunsaker2020-07-212-6/+5
| | | | | | | | | | Updates the preset configuration path from `/var/lib/sos/presets` to `/etc/sos/presets.d` and update the functions to load and write this location. Related: #2125 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [global] Update config file location and layoutJake Hunsaker2020-07-216-99/+169
| | | | | | | | | | | | | | | | | | | Moves the default config file we look for to /etc/sos/sos.conf instead of /etc/sos.conf. Extends the config file to look for a section matching the name of the component being used. Renames the "general" section to "global" and the "tunables" section to "plugin_options". Updates the default sos.conf to this style and adds some comments to the file. Update the man page for sos.conf. Note that this commit does NOT update sos.spec to drop the default configuration file in the new location, as that will be handled by a later commit to update the specfile wholesale. Closes: #2125 Resolves: #2136 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [foreman] scrub admin init password in installer logsPavel Moravec2020-07-201-3/+3
| | | | | | | | | | | | | | | | | | Obfuscate several instances of passwords: "--foreman-initial-admin-password", "mySecret", +candlepin.amqp.keystore_password=secretHash1 +jpa.config.hibernate.connection.password=secretHash2 by enhancing the scrubbing of: --password='secretPwd' Closes: #2156 Resolves: #2157 Signed-off-by: Pavel Moravec <pmoravec@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [drbd] Add new plugin for DRBDJose Castillo2020-07-201-0/+33
| | | | | | | | | | | | This patch implements a new plugin to capture information about Distributed Replicated Block Device (DRBD) setups. Closes: #2102 Resolves: #2120 Signed-off-by: Jose Castillo <jcastillo@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [containers_common] collect user-related commands outputsPavel Moravec2020-07-161-10/+26
| | | | | | | | | | podman and buildah commands should be collected on per-user basis, as declared by rootlessusers plugin option. Resolves: #2145 Signed-off-by: Pavel Moravec <pmoravec@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [maas] use maas-region instead of deprecated maas-region-adminAlberto Donato2020-07-161-1/+1
| | | | | Signed-off-by: Alberto Donato <alberto.donato@canonical.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [gluster] remove generated state filesJan Jansky2020-07-161-1/+4
| | | | | | | | | | Remove also generated state files in /run/gluster. Resolves: #2154 Signed-off-by: Jan Jansky <jjansky@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [foreman] collect tasks in CSV formatPavel Moravec2020-07-161-5/+7
| | | | | | | | | | | | | | | Collect foreman_tasks_tasks table in CSV format. Further, add escaping of commas inside CSV fields by using COPY (..) WITH (FORMAT 'csv', DELIMITER ',', HEADER) command rather than "psql -A -F , -X". Resolves: #2148 Signed-off-by: Pavel Moravec <pmoravec@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [podman] remove "podman pod ps -a" commandPavel Moravec2020-07-161-1/+0
| | | | | | | | | | "-a" option is not used for a while (if ever) and we collect "podman pod ps" already. Resolves: #2146 Signed-off-by: Pavel Moravec <pmoravec@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [gluster] remove only dump filesJan Jansky2020-07-151-9/+8
| | | | | | | | | | Removes only dump files and leaving other files as .socket or sock. Resolves: #2152 Signed-off-by: Jan Jansky <jjansky@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [foreman] scrub rhsm proxy_password in installer logsPavel Moravec2020-07-091-1/+2
| | | | | | | | | Scrub potential RHSM proxy_password = <secret> in installer logs. Resolves: #2144 Signed-off-by: Pavel Moravec <pmoravec@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [sar] Extend command sadf to get more data out of sarJose Castillo2020-07-091-1/+1
| | | | | | | | | | | | Currently, the sadf command translates to a XML file the content of the CPU data captured in sar. With this patch, all the data captured via sar is translated into the XML file. Resolves: #2143 Signed-off-by: Jose Castillo <jcastillo@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [vhostmd] Capture the output of vhostmdJose Castillo2020-07-081-1/+1
| | | | | | | | | | | Currently we only use the output of vhostmd temporarily to check if the machine is a vm or not. With this patch we also capture its output. Resolves: #2135 Signed-off-by: Jose Castillo <jcastillo@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* Add preupgrade log to the leapp sos pluginMichal Bocek2020-07-081-0/+1
| | | | | | | | | | | | | | | - leapp generates not only leapp-upgrade.log (when running `leapp upgrade`) but also leapp-preupgrade.log (when running `leapp preupgrade`) - when customers send us a sos report after running `leapp preupgrade`, we don't have the log in the report archive and it makes the investigation of issues harded - related: https://bugzilla.redhat.com/show_bug.cgi?id=1846677#c3 Resolves: #2141 Signed-off-by: Michal Bocek <mbocek@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [ubuntu] support status command updateEric Desrochers2020-07-081-1/+1
| | | | | | | | | | | | | | | | | Dropping 'ubuntu-support-status' as is it confusing and not very useful in favor of 'ubuntu-security-status' which, for now, is only available starting with Focal/20.04LTS. Ubuntu bug report: https://launchpad.net/bugs/1873362 Closes: #2139 Resolves: #2140 Signed-off-by: Eric Desrochers <eric.desrochers@canonical.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [logs] collect also non-persistent journal logsPavel Moravec2020-07-071-5/+13
| | | | | | | | | | | | | | Collect journalctl logs also when journal is configured to store logs in memory only. Further, apply --since option to journal catalog logs. Further, when --all-logs is provided, collect the transient logs in /var/log/journal dir as well. Resolves: #2130 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [lvm2] Fix warning due to locking_type=0 optionReid wahl2020-07-031-7/+13
| | | | | | | | | | | | | | | | | | | On RHEL 8, the option `--config="global{locking_type=0}"` is deprecated. This option is included in the lvm_opts variable and thus produces deprecation warnings in the outputs of pvscan, vgscan, pvs, vgs, and lvs: WARNING: locking_type (0) is deprecated, using --nolocking. This patch fixes the issue by removing "locking_type=0" from the config string and appending "--nolocking" to lvm_opts on systems where "--nolocking" is supported. Related to RHBZ#1849248. Resolves: #2127 Signed-off-by: Reid Wahl <nrwahl@protonmail.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [pci] Update gating for lspci commandsJake Hunsaker2020-07-031-1/+11
| | | | | | | | | | | | | | | It was reported that certain arches may create subdir structures under /proc/bus/pci differently than others - most notably that the first device subdir could be '0000:00' instead of just '00'. Rather than chase these different layouts, update the gating check for running `lspci` commands to being that /proc/bus/pci exists and it has more than just the `devices` file present, as this file may be present but empty when nothing else exists under `/proc/bus/pci`. Resolves: #2138 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [man] Fix typos in man pagesPonnuvel Palaniyappan2020-06-293-4/+4
| | | | | | | | | Fix several typos within the manpage Resolves: #2133 Signed-off-by: Ponnuvel Palaniyappan <ponnuvel.palaniyappan@canonical.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [block] Fix typo in LUKS detectionJake Hunsaker2020-06-241-1/+1
| | | | | | | Fixes a typo in detecting LUKS partitions for cryptsetup output collection. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [report] Drop non-root framework by adding root_required checkJake Hunsaker2020-06-226-17/+7
| | | | | | | | | | | Adds a check on a per-component basis for if that component requires root permissions to run. By default, SoSComponent sets this value to `False`, so set it explicitly to `True` for `SoSReport`. Closes: #1989 Resolves: #2126 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [ovirt] Include oVirt engine truststoreMiguel Martín2020-06-221-2/+1
| | | | | | | | | | | Include the truststore used by the oVirt engine as it is supposed to contain CA certificates only Closes: #2122 Resolves: #2124 Signed-off-by: Miguel Martín <mmartinv@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [vdsm] Include all the vdsm certificatesMiguel Martín2020-06-221-2/+2
| | | | | | | | | | | Include all the certificates in '/etc/pki/vdsm' and make sure no keys are collected. Closes: #2121 Resolves: #2123 Signed-off-by: Miguel Martín <mmartinv@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>