aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [landscape] Add landscape-api command collectionArif Ali2023-09-121-0/+28
| | | | | | | | If the relevant environment variables are set, then we collect some useful information to debug landscape-server further Signed-off-by: Arif Ali <arif.ali@canonical.com> Signed-off-by: Mark Cunningham <mark.cunningham@canonical.com>
* [rpmostree] Enhance status output with more detailsPablo Acevedo Montserrat2023-09-081-1/+1
| | | | Signed-off-by: Pablo Acevedo Montserrat <pacevedo@redhat.com>
* [contrail] add another container regexArif Ali2023-09-071-1/+4
| | | | | | | | In a contrail environment, the container name could also start with vrouter, this then ensures that the relevant details are also collected from any host that has the containers running Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [masakari] Add masakari pluginsArif Ali2023-09-072-0/+131
| | | | | | | | | | | | | Add masakari and masakarimonitors plugin for openstack. This is a ubuntu plugin at the moment. These are split into 2, as they run on 2 seperate set of nodes. * masakari is a control node service * masakarimonitors runs on a nova hypervisor Resolves: #3348 Signed-off-by: Arif Ali <arif.ali@canonical.com>
* Collect logs from ovnkube-controller containerPeriyasamy Palanisamy2023-08-301-1/+6
| | | | | | | | | This enables ovn sos report plugin to collect logs ovnkube-controller container because ovn-kubernetes now provides option to run both ovnkube-node and ovnkube-controller in same container with this PR https://github.com/ovn-org/ovn-kubernetes/pull/3807. Signed-off-by: Periyasamy Palanisamy <pepalani@redhat.com>
* [hpssm] handle new names and higher slot positionsTrevor Benson2023-08-281-1/+1
| | | | Signed-off-by: Trevor Benson <trevor.benson@gmail.com>
* [openvswitch] Add pmd-sleep-show commandKevin Traynor2023-08-281-1/+3
| | | | | | | | | | Since OVS 3.2 there is a command to capture the sleep configuration of DPDK PMD cores. This shows the maximum amount of time the PMD cores may sleep for under low or no load traffic conditions. Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
* [maas] Support MAAS 3.5Igor Brovtsin2023-08-251-1/+16
| | | | | | | | | | | | | | | | In MAAS 3.5, system journal is used by all the services, therefore the log size is significantly increased compared to the previous MAAS versions. For snap this means that `journalctl` might need a long time to collect and filter the log files before outputting them. This sometimes leads to `maas` plugin timeouts with 3.5 snap, as `sos` performs automatic log collection for services listed in `services` tuple without any filters other than unit name, unless explicitly specified by user. We want the plugin to work without additional params, so we service declaration for 3.5 snap is ommitted. Logs are collected via `add_journal` call with a sane default limit to avoid timeouts. Signed-off-by: Igor Brovtsin <brigaccess@gmail.com>
* Collect ovn logs as much as possiblePeriyasamy Palanisamy2023-08-211-8/+17
| | | | | | | | | | | The sosreport limits to collect logs at maximum of 25 MB in a given collection passed into add_copy_spec method. so this may lead into logs wouldn't have fully collected when user collected sos report without --all-logs option. Hence this commit ensures logs and dbs collected as much as possible when --all-logs option is not specified. Signed-off-by: Periyasamy Palanisamy <pepalani@redhat.com>
* Collect additional ovnkube node logsPeriyasamy Palanisamy2023-08-211-1/+2
| | | | | | | | With Interconnect support in latest OVN-Kubernetes, ovnkube-nodes logs grew large. This commit adds the ability to collect those additional logs. Signed-off-by: Periyasamy Palanisamy <pepalani@redhat.com>
* [build] Bump version to 4.6.0Jake Hunsaker2023-08-173-4/+7
| | | | Signed-off-by: Jake Hunsaker <jacob.r.hunsaker@gmail.com>
* [selinux] Add ubuntu check and pluginArif Ali2023-08-171-3/+3
| | | | | Signed-off-by: Arif Ali <arif.ali@canonical.com> Signed-off-by: Adam Vest <adam.vest@canonical.com>
* [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>