aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [tests] search for fixed strings, not regexps, by defaultPavel Moravec2023-08-171-2/+7
| | | | | | | | | | | | | Change grep_for_content to grep for a fixed string by default. The reason is tests would match 1a2b3c4 as IP address 1.2.3.4 (which it is not). Add regexp option to grep_for_content, to allow the default "grep" search. Resolves: #3320 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [firewall tables] Fix code to capture NAT tableJose Castillo2023-08-161-1/+1
| | | | | | | | | | This PR adds the nat table to default_ip_tables so when reading /proc/net/ip_tables_names fails, it captures all the default tables. Related: RHBZ#2228642 Signed-off-by: Jose Castillo <jcastillo@redhat.com>
* [cleaner] Use fully_trusted filter for extractionPavel Moravec2023-08-151-0/+6
| | | | | | | | | | | | | | Since Python 3.12, archive.extractall would require setting an extraction filter otherwise an exception is raised. See PEP 706 for more. Since Python 3.10 and 3.11 can raise false alarms as exceptions (see #3330 for examples), we must use the legacy fully_trusted filter. Relevant: #3319 Closes: #3330 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [cirrus] Update gce imagesArif Ali2023-08-131-7/+7
| | | | Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [readme] Update for snap status and installationArif Ali2023-08-131-1/+8
| | | | Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [flake 8] Fix two new style alertsJose Castillo2023-08-132-2/+2
| | | | | | | | | | | | | Two new alerts: sos/report/plugins/release.py:9:52: E231 missing whitespace after ',' sos/report/plugins/__init__.py:456:21: E721 do not compare types, for exact checks use `is` / `is not`, for instance checks use `isinstance() Signed-off-by: Jose Castillo <jcastillo@redhat.com>
* [slurm] Add slurm pluginArif Ali2023-08-091-0/+128
| | | | | | | Slurm is a workload manager in the HPC space, this is a start on this, and there may be further additions in the future. Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [ultrapath] Add new plugin for Huawei UltraPathPavel Moravec2023-08-081-0/+40
| | | | | | | | | Relevant: rhbz2187407 Resolves: #3328 Author: Nitin U. Yewale <nyewale@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [plugins/ubuntu] Do not load tls module if not loadedNikhil Kshirsagar2023-08-041-3/+6
| | | | | | | | | Adds a predicate to avoid loading the tls module if it is not loaded. Resolves: #3326 Signed-off-by: Nikhil Kshirsagar <nikhil.kshirsagar@canonical.com>
* [discovery] Enable the plugin by containersPavel Moravec2023-08-021-1/+4
| | | | | | | | | Enable the plugin by running containers and collect some further system logs. Resolves: #3324 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [plugins/ceph] Don't trigger ceph_common on cinder nodesNikhil Kshirsagar2023-08-011-1/+0
| | | | | | ceph_common is triggered due to librados2 package. Remove it. Signed-off-by: Nikhil Kshirsagar <nikhil.kshirsagar@canonical.com>
* [containerd] include containerd.io in packages setilluminatus2023-08-011-1/+1
| | | | Signed-off-by: Trevor Benson <trevor.benson@gmail.com>
* Resolves: #3323 fetch id in foreman_auth_tableNagoor Shaik2023-08-011-1/+1
| | | | | Signed-off-by: Nagoor Shaik <nshaik@redhat.com> Signed-off-by: Nagoor Shaik <nagoor.s@gmail.com>
* [openvswitch] Add shorter pmd rxq usage periodsKevin Traynor2023-07-311-0/+2
| | | | | | | | | | | | | | Since OVS 3.1 'ovs-appctl dpif-netdev/pmd-rxq-show' also supports showing the pmd rxq % usage over shorter timeframes than the default 1 minute, down to a granularity of 5 secs. A user testing may send traffic and have a steady state for less than 1 min, so it is useful to also see pmd rxq % usage over some shorter time periods. Add pmd-rxq-show stats for 5 and 30 secs. Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
* [report] Don't use sysroot for network device enumerationJake Hunsaker2023-07-311-4/+12
| | | | | | | | | | | | | | | | | | | | | | If sos is being used in a live environment to diagnose an issue, using sysroot can cause the network device enumeration via /sys/class/net crawling to fail. This will be the case for systems that do not use `nmcli`. When in a live environment, network devices will not be under `/$sysroot/sys/class/net` but the "regular" path for the booted environment. Similarly, if sos is being run in a container that is properly configured, network devices will appear under `/sys/class/net` and not (necessarily) under the sysroot path that mounts the host's filesystem. As such, disregard a configured sysroot when enumerating network devices by crawling `/sys/class/net`, and trap any exceptions that may percolate up from this in edge case environments. Related: #3307 Signed-off-by: Jake Hunsaker <jacob.r.hunsaker@gmail.com>
* Collect db files for ovn interconnect environmentPeriyasamy Palanisamy2023-07-241-0/+10
| | | | | | | This updates openshift_ovn plugin to collect ovn db files when it is running with interconnect configuration. Signed-off-by: Periyasamy Palanisamy <pepalani@redhat.com>
* [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>