aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [build] Bump version to 4.5.6Jake Hunsaker2023-07-203-4/+7
| | | | | | This commit marks the release of sos-4.5.6. Signed-off-by: Jake Hunsaker <jacob.r.hunsaker@gmail.com>
* [lustre] Add more debug paramsNathaniel Clark2023-07-201-2/+21
| | | | | | | | This prevents mb_groups from being collected as it is large, and not useful for debug. This also collects more state of the filesystem. Signed-off-by: Nathaniel Clark <nclark@whamcloud.com>
* [plugins/samba] collect output of 'net ads info'Nikhil Kshirsagar2023-07-201-0/+1
| | | | Signed-off-by: Nikhil Kshirsagar <nikhil.kshirsagar@canonical.com>
* [utilities][ceph] wildcard support for path in files, fix ceph pathsNikhil Kshirsagar2023-07-206-5/+7
| | | | | | | | This lets files triggers use * and also updates the ceph plugins to trigger only if folders are non empty Closes: #3311 Signed-off-by: Nikhil Kshirsagar <nikhil.kshirsagar@canonical.com>
* [options] compatibility fix for python 3.12Sandro Bonazzola2023-07-191-1/+1
| | | | | | | | | Addresses ConfigParser.readfp removal in 3.12. Fixes #3308 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=2223526 Signed-off-by: Sandro Bonazzola <sbonazzo@redhat.com>
* [plugins] py311 fix for re.MArif Ali2023-07-1828-46/+48
| | | | | | | | Add a common regex for re.MULTILINE so that doesn't need to be defined and remove the definitions where `(?m)` is being defined Closes: #3301 Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [plugins/ceph][ubuntu] Add microceph collectionsNikhil Kshirsagar2023-07-183-106/+146
| | | | | | Collect the microceph data in the ceph plugins. Signed-off-by: Nikhil Kshirsagar <nikhil.kshirsagar@canonical.com>
* [maas] remove the collection of apache2 logsArif Ali2023-07-171-1/+0
| | | | | | | MAAS no longer uses apache2 for it web hosting, so no longer required for this plugin Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [gh_worklow] Build and push snap on releaseArif Ali2023-07-172-1/+13
| | | | | | | | | | | Adding workdlow to publish the released sos to the latest/candidate channel when the a new release is created via the tag. This ensures less mannual intervention for future releases. Update the snap creation for anyone building manually, and need python3-venv as a build dependancy. Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [clean] Properly obfuscate MAC addressesJan Jansky2023-07-132-3/+3
| | | | | | | | | | | | | | | | | | | | | Some of mac addresses was not properly obfuscated because some collected data contains mac addresses in format 01:<mac> and parser was not ready for that. Also added mapper which will obfuscate mac address in case it is in format with _ instead of : as for example 00_50_56_87_5d_01 instead of 00:50:56:87:5d:01 Format with _ is used for example by vmware plugin. Resolves: #3302 Signed-off-by: Jan Jansky <jjansky@redhat.com>
* [microshift] Add initial support for backup infoPablo Acevedo Montserrat2023-07-101-3/+8
| | | | Signed-off-by: Pablo Acevedo Montserrat <pacevedo@redhat.com>
* [ssh] Add User .ssh Config File OptionDaniel Zhou2023-07-071-2/+11
| | | | | | | | Resolves issue SUPDEV-137. Adds a plugin option for the ssh module, defining whether it will or will not collect .ssh config files per user Default for new option is True Signed-off-by: Daniel Zhou <dzhou@redhat.com>
* [tests] add test for #3292Pavel Moravec2023-06-301-0/+18
| | | | | | | | Add a test that cleaner keeps permissions of a sanitised file Relevant to: #3292 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [clean] Respect permissions of sanitised filesPavel Moravec2023-06-301-1/+1
| | | | | | | | | | When copying files we applied a substitution in, we must replace just original file content (shutil.copyfile) and not also its stat data (shutil.copy). Resolves: #3292 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [docs] Update maintainer field in man pagesJake Hunsaker2023-06-304-4/+8
| | | | | | | | | Update the maintainer field to be more generic and direct readers to the upstream repo. Closes: #3290 Signed-off-by: Jake Hunsaker <jacob.r.hunsaker@gmail.com>
* [grub2] Capture /etc/grub2-efi.cfgJose Castillo2023-06-291-1/+2
| | | | | | | | | | | | | sos report does not gather the symlink /etc/grub2-efi.cfg when present. If a system is legacy, but has this file, grubby default to using this one first in some cases. Therefore we need to know if it's present or not. Closes: RHBZ#2218563 Signed-off-by: Jose Castillo <jcastillo@redhat.com>
* [ceph] Add a new profile for Ceph pluginsJose Castillo2023-06-298-8/+8
| | | | | | | | | | | | | This patch helps simplify the capture of data from ceph plugins. After the original code was divided in 8 different plugins, it may be a bit confusing which plugins to use when running sos and attempting to capture only ceph data. By selecting the profile, sos will activate only these ceph_* plugins that apply to a specific ceph node. Signed-off-by: Jose Castillo <jcastillo@redhat.com>
* [tests] Make options_tests faster by calling them on a few plugins onlyPavel Moravec2023-06-272-4/+4
| | | | | | | | | | | | | options_tests.py tests -n option which means tens of plugins are redundantly collected. Testing -o option is effectively the same while the sosreport run needs a half time only. The functionality of -n option is tested elsewhere, thus the change does not shrink test coverage. Resolves: #3288 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [build] Bump version to 4.5.5Jake Hunsaker2023-06-233-4/+7
| | | | | | This commit marks the release of sos-4.5.5. Signed-off-by: Jake Hunsaker <jacob.r.hunsaker@gmail.com>
* [docker] collect on Debian tooJohan Guldmyr2023-06-221-2/+3
| | | | | | | | Tested by: - manually patching file on Debian 11 and 12 (both on sos version 4.0.2) - sudo ./bin/sos report from this commit (and on python 3.11) Signed-off-by: Johan Guldmyr <johan@meetiqm.com>
* [Plugin] Fix exception when calling os.makedirsJose Castillo2023-06-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | When calling get_cmd_output_path() to create a directory via the plugin hpssm, sos threw the following exception: Traceback (most recent call last): File "/root/sos/sos/report/__init__.py", line 1224, in setup plug.setup() File "/root/sos/sos/report/plugins/hpssm.py", line 67, in setup logpath = self.get_cmd_output_path() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/sos/sos/report/plugins/__init__.py", line 2168, in get_cmd_output_path os.makedirs(cmd_output_path) File "<frozen os>", line 225, in makedirs FileExistsError: [Errno 17] File exists: '/var/tmp/sos.1gdy83zb/sosreport-localhost-vbwfnpn/sos_commands/hpssm' This was happening because the directory 'hpssm' was already created. With this change we avoid any race where we call os.makedirs() after we have already created the plugin directory. Closes: RHBZ #2216608 Signed-off-by: Jose Castillo <jcastillo@redhat.com>
* [conntrack] collect conntrack commands only when kmods are loadedPavel Moravec2023-06-221-3/+11
| | | | | | | | | Two conntrack commands require several kmods - guard collection of the commands by relevant SoSPredicate. Resolves: #3279 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [keywords] Add new PrepperJake Hunsaker2023-06-223-18/+39
| | | | | | | | | Adds a new Prepper to handle keyword preparation. This is slightly inefficient since we will only realistically need this once, but baking it into the archive loop does not pose any other problems, and it would be more fragile to break out a special flow just for keywords. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [username] Add new PrepperJake Hunsaker2023-06-225-50/+71
| | | | | | | | | Adds a new Prepper for usernames, and removes the bits from the parser and mapping that otherwise handled the initial preparation of the mapping. The prepper will source from the same initial files, as well as from the `--usernames` command line option. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [mac] Add new PrepperJake Hunsaker2023-06-223-5/+28
| | | | | | | Adds a new Prepper to handle feeding relevant files to the mac parser for initial preparation of the mappings. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [hostname] Add new prepperJake Hunsaker2023-06-228-75/+78
| | | | | | | | | Adds a new Prepper for handling hostname determination for preparing the mapping and parser. As part of this new prepper, pass the CLI options to each prepper for use. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [ip] Add new prepperJake Hunsaker2023-06-224-2/+42
| | | | | | Adds a new prepper for IP network address sourcing. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [cleaner] Separate cleaner prepping from archivesJake Hunsaker2023-06-224-49/+240
| | | | | | | | | | | | | | | | | | | | | | Up until now, the archive abstractions have defined what files `sos clean` will use to prepare the mappings for obfuscation before entering the normal obfuscation loop over every file in every archive. While this is straight forward enough, it is not particularly flexible, and prevents us from easily using other approaches for preparing the mappings beyond what is directly obtained via the parsers (which in some cases need special handling to be prepared at all). Change this by introducing `SoSPrepper`s which will be used to determine now only what files to pass to which parsers on an archive-by-archive basis, but will also allow for manually retrieving items from disaparate sources within the archive(s) and handing those directly to the mappings, without the need for those items to first pass the parser check. Related: RH: SUPDEV-135 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [vault] Add vault pluginArif Ali2023-06-221-0/+55
| | | | Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [maas] adding configuration file collectionAlejandro Santoyo2023-06-221-0/+3
| | | | | | | | | | | | | Adding the below paths to collection as they are useful to troubleshoot some issues. "/var/lib/maas/http/*.conf" "/var/lib/maas/*.conf" "/var/lib/maas/rsyslog" Resolves #3280 Signed-off-by: Alejandro Santoyo <alejandro.santoyo@canonical.com>
* [build][snap] Fix build of snapArif Ali2023-06-211-1/+5
| | | | | | | | Originally, it was working by coincidence Reference: https://github.com/canonical/rockcraft/issues/225#issuecomment-1597025315 Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [kernel] verify also kernel-redhat on RedHatPolicyPavel Moravec2023-06-151-0/+6
| | | | | | | | | RedHat distributions can deliver kernel in RPM named either 'kernel' or 'kernel-redhat', in which case we must verify both package names. Resolves: #3274 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [ipa] add EPN log file (ipaepn.log)François Cami2023-06-141-1/+2
| | | | | | | | | | | | | Since https://www.freeipa.org/page/Releases/4.8.7, IPA includes a tool to send email notifications to users when their passwords are about to expire. This logs into: /var/log/ipaepn.log More information: https://pagure.io/freeipa/issue/3687 Resolves: #3272 Signed-off-by: François Cami <fcami@redhat.com>
* [sssd] Handle spaces in postproc regex substitutionJake Hunsaker2023-06-121-3/+3
| | | | | | | | | | Widen the capturing of strings for the `ldap_default_authtok` substitution performed on sssd configuration files to also capture strings with spaces. Closes: #3266 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [grub2] Capture user created configuration filesJose Castillo2023-06-121-0/+2
| | | | | | | | | | | | | | | | | | For now neither "/boot/grub2/custom.cfg" nor "/boot/grub2/user.cfg" are embedded in the sosreport, which may contain critical information when troubleshooting boot issues. Indeed it happens customers create the files badly, e.g. create a copy of "boot/grub2/grub.cfg" itself, which ends up having a dead loop in Grub and preventing the system to boot. With such information, we would troubleshoot such issues more rapidly. Resolves: RHBZ#2213951 Signed-off-by: Jose Castillo <jcastillo@redhat.com>
* [ipa] add SID log file (ipaserver-enable-sid.log)François Cami2023-06-091-0/+1
| | | | | | | | | | | Since https://www.freeipa.org/page/Releases/4.9.8, SID configuration is instegrated in the base installer. This logs into: /var/log/ipaserver-enable-sid.log More information: https://pagure.io/freeipa/issue/8995 Resolves: #3268 Signed-off-by: François Cami <fcami@redhat.com>
* [sosnode] Report sos report execution errors in consistent formatJake Hunsaker2023-06-091-2/+3
| | | | | | | | This change simply makes `SosNode` report execution errors using the standardized UI formatting, instead of printing the log format to console (but the logged message will still be written to the log file). Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [ocp] Handle delete project timeouts more gracefullyJake Hunsaker2023-06-092-16/+33
| | | | | | | | | | | | | | | | In scenarios where the cluster is unable to delete the temporary project due to a failure on one of the cluster nodes during the collection, we would previously fail to delete the temporary project with a nasty traceback after waiting for 5 minutes. Be better at this by reducing the wait time (by adding a new `timeout` parameter to `exec_primary_cmd()`) and more gracefully reporting the error, and the fact that the user must make manual intervention to remove the temporary project. Related: RH SUPDEV-74 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [report] Add flags from regex if they existArif Ali2023-06-091-3/+8
| | | | | | | | | | | | Now that we ae using flags in re.subn, it doesn't like the full pattern that is being passed through via do_file_private_sub. So, we separete pattern and the flags, and pass these through to re.subn Closes: #3261 Signed-off-by: Arif Ali <arif.ali@canonical.com> Signed-off-by: David Negreira <david.negreira@canonical.com>
* [cxl] Add a new Compute Express Link (CXL) pluginSteve Scargall2023-06-061-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | Compute Express Link (CXL) is an industry-supported Cache-Coherent Interconnect for Processors, Memory Expansion, and Accelerators. The CXL Consortium (https://www.computeexpresslink.org/) is an open industry standard group formed to develop technical specifications that facilitate breakthrough performance for emerging usage models while supporting an open ecosystem for data center accelerators and other high-speed enhancements. There are currently three specifications (v1.1, 2.0, and v3.0) publicly available. CPUs are available from Intel and AMD that support CXL v1.1. Hardware is emerging that supports up to CXL v3.0. This plugin uses open-source utilities from https://github.com/pmem/ndctl that introduce new and updated commands to support CXL devices in the Linux Kernel. Signed-off-by: Steve Scargall <37674041+sscargal@users.noreply.github.com>
* [pm] Update plugins to use package_managerArif Ali2023-06-052-11/+7
| | | | | | | | | | Remove `check_enabled()` for the maas plugin, as that is now not required with `SnapPackageManager` now enabled for the `UbuntuPlugin` Use package manager to detrmine is package is a snap rather than `snap list`. Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [apache] collect all /etc/httpd/conf/*.conf filesPavel Moravec2023-06-051-1/+1
| | | | | | | | | httpd.conf can refer to files in either conf.d or directly in conf dir, so let collect all configs by default. Resolves: #3264 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [specfile] new fedora guidelinesSandro Bonazzola2023-05-312-0/+21
| | | | | | adapt the specfile to new fedora packaging guidelines. Signed-off-by: Sandro Bonazzola <sbonazzo@redhat.com>
* [specfile] align with Fedora spec fileSandro Bonazzola2023-05-311-14/+15
| | | | Signed-off-by: Sandro Bonazzola <sbonazzo@redhat.com>
* [cleaner] Enhance trailing characters list after AMC addressPavel Moravec2023-05-311-3/+3
| | | | | | | | | A MAC address can be followed by characters other than just blank char or a newline. Let enhance the list accordingly. Resolves: #3258 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [Plugin|Archive] Fix collection of symlinks in containersJake Hunsaker2023-05-313-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | When collecting an sos report from witin a container, and intending to collect host-level information, symlink collection would previously collect the container's version of the symlink target due to how they would resolve within the `Archive.add_file()` flow. Fix this by simply forcing the follow up collection of the sysroot location of the symlink target, which would previously be aborted due to the fact that sos had already collected the container's matching file. This introduces a certain level of inefficiency by way of doubling the copy operations, however ensuring that we only make a single copy operation originally involves a quite fragile set of path mangling that depends heavily upon how the symlinks are created on the host's filesystem. For example a symlink using a relative path could be resolved somewhat easily, but a symlink using an absolute path introduces a certain amount of indeterminate resolution, which we cannot allow for the vast majority of use cases that are performed outside of a container. Resolves: rhbz#2075720 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [build] Bump version to 4.5.4Jake Hunsaker2023-05-263-4/+7
| | | | | | This commit marks the release of sos-4.5.4 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [openstack_*][ubuntu] Update paths and collectionsArif Ali2023-05-2617-64/+95
| | | | | | | | | | | Update the apache plugin to only collect the defaults and update the openstack bits to collect specifics for their service move gnocchi.py to openstack_gnocchi.py Closes: #2525 Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [foreman] collect qpid-stat -qPavel Moravec2023-05-251-0/+7
| | | | | | | | | | | When katello-agent is (still) enabled, "qpid-stat -q" provides a great overview of pending requests and connected agents. As there is no katello plugin, we must collect it in foreman directly. Resolves: #3251 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [microk8s][ubuntu] Add microk8s pluginDavid Negreira2023-05-241-0/+52
| | | | | | Add a new plugin to support collecting data from microk8s on Ubuntu. Signed-off-by: David Negreira <david.negreira@canonical.com>