aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [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>
* [lstopo] Add detection for hwloc packageArif Ali2023-05-241-1/+5
| | | | | | This package is the one for ubuntu to run the lstopo command Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [rhc] New plugin for RHCJose Castillo2023-05-241-0/+49
| | | | | | | | | | | RHC is a client tool and daemon that connects the system to Red Hat hosted services enabling system and subscription management. This plugin captures configuration files and the output of 'rhc status'. Closes: RHBZ#2196649 Signed-off-by: Jose Castillo <jcastillo@redhat.com>
* [powerpc] collect invscout logsSourabh Jain2023-05-241-0/+8
| | | | | | | | | | | | | | | | Gather the microcode and Vital Product Data (VPD) files produced by running the invscout commands. The invscout commands are executed prior to the commencement of log file collection. The invscout log files are generally small in size (KBs) and previous log files are removed from the /var/adm/invscout directory each time the invscout command is executed. Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com> Suggested-by: Borislav Stoymirski <borislav.stoymirski@bg.ibm.com> Tested-by: Borislav Stoymirski <borislav.stoymirski@bg.ibm.com>
* [landscape] Add more loggingNikhil Kshirsagar2023-05-241-2/+8
| | | | Signed-off-by: Nikhil Kshirsagar <nikhil.kshirsagar@canonical.com>
* [policies] Mariner has been rebranded to Azure Linuxroot2023-05-241-5/+5
| | | | Signed-off-by: Eric Desrochers <edesrochers@microsoft.com>
* [juju] Ensure to collect hidden filesArif Ali2023-05-191-1/+2
| | | | | | | | Currently, it was inconsistent with the hidden file collection, this line ensures that we collect these files for better support Closes: #3242 Signed-off-by: Arif Ali <arif.ali@canonical.com>
* powerpc: collect RMC status logsSourabh Jain2023-05-191-3/+11
| | | | | | | | | | | | | Resource Monitoring and Control (RMC) responsible for establishing management connection between HMC (Hardware Management Console) and Logical partition (LPAR). Add commands to collect the status/info of RMC service, node, and other system resource. Additionally collect RSCT node ID file. Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com> Tested-by: Borislav Stoymirski <borislav.stoymirski@bg.ibm.com> Suggested-by: Borislav Stoymirski <borislav.stoymirski@bg.ibm.com>
* [specfile] add runtime requirement to python3-setuptoolsPavel Moravec2023-05-191-0/+1
| | | | | | | | As pkg_resources module from setuptools is used in SosNode. Resolves: #3241 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [kernel] collect /var/lib/systemd/pstorePavel Moravec2023-05-191-0/+1
| | | | | | | | | After a kernel panic, /sys/fs/pstore data is backed off to /var/lib/systemd/pstore which should be collected as well. Resolves: #3244 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [rhui] Fix small typo while obfuscating cookiesJose Castillo2023-05-171-1/+1
| | | | | | Fix small typo while obfuscating cookies. Signed-off-by: Jose Castillo <jcastillo@redhat.com>
* [collector] collect report from primary node if in node_listPavel Moravec2023-05-171-2/+9
| | | | | | | | | | When sos is running on primary node with hostname listed in node_list, collect report from the node (until strict node option prohibits it). Resolves: #3240 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [redhat] Add debugging output to failed SFTP uploadsJake Hunsaker2023-05-161-0/+10
| | | | | | | | Adds debugging information to failed SFTP uploads when verbosity is set above 1. This prints to console since our log files have already been closed at this point. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [logging] Make ui_log sensitive to verbosityJake Hunsaker2023-05-161-2/+6
| | | | | | | | Makes the `ui_log` logger sensitive to verbosity settings, by allowing debug messages to print to console if verbosity is set above 1 (e.g. `-vv` or `-vvv`). Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [ubuntu] update policy to use MultiPackageManagerArif Ali2023-05-161-0/+15
| | | | | | | | | | | | This change allows it to use the default deb as the primary package manager and the snap as a fallback package manager This change also ensures that the sosreport, if installed via snap for sos collect is detected if the deb doesn't exist Closes: #3214 Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [apt] mask credentials in list filesArif Ali2023-05-161-0/+14
| | | | | | | | | The /etc/apt/sources.list or files in /etc/apt/sources.list.d may have credentials for private repositories. This change should mask the files and remove the username and the password. Resolves: #1514 Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [plugins] collect strings before commandsPavel Moravec2023-05-151-1/+1
| | | | | | | | | When plugin timeouts during commands execution/collection, ensure we have collected sos_strings for tailed files. Resolves: #3237 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [pm][snap] remove __init__Arif Ali2023-05-151-5/+0
| | | | | | The __init__ was not required, so removing it Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [alternatives] Add ubuntu sectionArif Ali2023-05-151-13/+47
| | | | | Related: #3224 Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [networking] Collect `sysctl -a` from namespacesJuanma Sanchez2023-05-151-0/+1
| | | | | | | | | Since some sysctl groups (e.g net.*) are namespaced, when gathering namespace data it's important to include the sysctl information as well. Resolves: #3232 Signed-off-by: Juanma Sanchez <juasanch@redhat.com>
* [lxd] Add logs and config from the snapArif Ali2023-05-151-0/+17
| | | | Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [insight] Capture information for malware and complianceJose Castillo2023-05-151-0/+2
| | | | | | | | | | | | For Compliance (and others) we need to capture: /etc/insights-client/tags.yaml For Malware we need to capture: /etc/insights-client/malware-detection-config.yml Closes: RHBZ#2196647 Signed-off-by: Jose Castillo <jcastillo@redhat.com>
* [ubuntu] Update plugin to support proArif Ali2023-05-111-0/+7
| | | | | | | | | | * Add new command to check status using `pro` * Add json format for the status command * Add /var/log/ubuntu-advantage-timer* logs Related: #3224 Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [networking] Collect IPv4 and IPv6 routesMat Kowalski2023-05-101-3/+2
| | | | | | | | | | With this PR we are deprecating `route` command in favour of `ip route`. We are also creating a single root symlink `ip_route` that will contain aggregated IPv4 and IPv6 routes. Closes: #3220 Signed-off-by: Mat Kowalski <mko@redhat.com>
* [elastic] Add shard, aliases and update log collectionArif Ali2023-05-101-1/+3
| | | | Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [dpkg] Filter out uninstalled packagesJake Hunsaker2023-05-091-2/+4
| | | | | | | | Packages uninstalled via `dpkg` can remain in the package list, but will be marked with "deinstall" - as such, filter these packages out. Co-authored-by: Arif Ali <arif.ali@canonical.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Add tests for actual PackageManager implementationsJake Hunsaker2023-05-091-1/+59
| | | | | | | | Adds basic unit tests for the fitness of `PackageManager` implementations for rpm and dpkg, as well as the new `MultiPackageManager` using both of those. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [package_managers] Break up `_generate_pkg_list()`Jake Hunsaker2023-05-094-22/+37
| | | | | | | | | | This commit breaks up `_generate_pkg_list()` by making it call to a new `_parse_pkg_list()` method that each `PackageManager` will now need to implement. This new method will be fed the output of the manager's `query_command` for it to parse and yield package information, for `_generate_pkg_list()` to then assemble into the `_packages` dict. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [package_managers] Add MultiPackageManager support for policiesJake Hunsaker2023-05-092-12/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a new `MultiPackageManager` class to handle systems that have multiple distinct package managers on them. This initial implementation requires policies that will leverage this to define a `primary` package manager, and at least one fallback package manager. Policies will need to pass the uninstantiated class object to the initializing call to `MultiPackageManager`, for example: self.pkgman = MultiPackageManager(primary=RpmPackageManager, fallbacks=[DpkgPackageManager]) When a call to a `PackageManager` method is made to `MultiPackageManager`, the call is first directed to the primary manager. If that response is empty, None, etc... then the call is forwarded to each of the fallback managers in the order they were defined, until either a non-empty response is returned or we run out of fallbacks to try. In order to allow for some introspection of which defined manager provides a non-empty response for package queries, a new `pkg_manager` entry in the contents of the `packages` property has been added. Closes: #2237 Related: #3214 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [juju] Fix cluster collection doesn't work in 2 scenariosjneo82023-05-042-1/+47
| | | | | | | | | | Fix below two scenarios: 1. If subordinate's parent is missing. 2. If subordinate's parent's units is missing. Closes: #3213 Signed-off-by: jneo8 <james.lin@canonical.com>
* [snap] add snap pkg managerArif Ali2023-05-041-0/+45
| | | | | Related: #3214 Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [apport] Collect /var/crash if all-logs has been requestedArif Ali2023-05-031-0/+1
| | | | Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [networkmanager] collect all fields of connectionsBeniamino Galvani2023-05-031-0/+1
| | | | | | | | | | | By default "nmcli con" only shows few fields of connections; many others are skipped and some of them are quite important like the filename, the autoconnect flag, and the last activation timestamp. Add the full dump of connection fields. Since the output can be harder to quickly parse, also leave the plain "nmcli con" output. Signed-off-by: Beniamino Galvani <bgalvani@redhat.com>
* [dnf] Remove redundant --asumeno optionPavel Moravec2023-05-021-5/+4
| | | | | | | | | | | | | This is to revert #2091 as no such dnf command should wait for user prompt, and having --assumeno makes final filenames redundantly harder to read. Further, stop collecting "dnf list installed *dnf*" as we already collect whole "dnf list installed". Resolves: #3211 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [tests] Allow tests to restrict execution architectureJake Hunsaker2023-05-022-0/+23
| | | | | | | | | | | | | | | | | | Adds a new `arch` class attr that allows test classes to specify which architecture(s) they are allowed/designed to execute on. If the test is attempted to be executed on an architecture that is not in the specified list, we will skip the test before any setup or sos executions are done. By default, the `arch` class attr is an empty list, which implies that the test can run on _any_ architecture. Tests should specify `arch` as a list even for single-arch tests. Included in this change is restricting the Foreman tests to x86_64 only, as that is the only architecture on which that product is supported. Closes: #3186 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [cirrus] Move F38 image from Beta to GAJake Hunsaker2023-05-011-2/+2
| | | | | | F38 has been GA, so we should move off the Beta image for our testing. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [build] Bump version to 4.5.3Jake Hunsaker2023-04-283-4/+7
| | | | Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [juju] Add juju integration to sos collect.jneo82023-04-2810-2/+701
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new cluster profile and transport called "juju" for `sos collect`. Both the profile and transport are intended to be used on juju managed environments which assumes that `juju` is installed on the machine where `sos collect` is called, and that the juju user has superuser privilege to the current controller. When using the "juju" cluster profile, the sos reports will be collected from all the applications within the current model by default. If necessary, one can filter the nodes by models / applications / units / machines with cluster options. For example `-c "juju.models=sos" -c "juju.apps=a,b,c"`. Moreover, transport will also be dynamically changed to "juju" when cluster type is juju. If not using "juju" cluster profile, one can still choose to use the "juju" transport by specifying --transport option. However, not that the --nodes option will be expected to be a comma separated machine IDs , **not** IP addr, since `juju ssh` identifies the ssh target by machine ID. For example, `sos collect --nodes 0,1,2` Closes: #2668 Signed-off-by: Chi Wai Chan <chiwai.chan@canonical.com> Signed-off-by: jneo8 <james.lin@canonical.com> Co-authored-by: Chi Wai Chan <chiwai.chan@canonical.com> Co-authored-by: jneo8 <james.lin@canonical.com>
* [powerpc] Collect lsslot,amsstat, and opal elogsSeeteena Thoufeek2023-04-281-2/+7
| | | | | | | | | | This patch updates powerpc plugin to collect the slots and active memory sharing information and opal elogs. Signed-off-by: Borislav Stoymirski <borislav.stoymirski@bg.ibm.com> Signed-off-by: Seeteena Thoufeek <s1seetee@linux.vnet.ibm.com> Reported-by: Borislav Stoymirski <borislav.stoymirski@bg.ibm.com> Tested-by: Borislav Stoymirski <borislav.stoymirski@bg.ibm.com>
* [ceph]: dump mon's config databasePonnuvel Palaniyappan2023-04-271-0/+1
| | | | Signed-off-by: Ponnuvel Palaniyappan <pponnuvel@gmail.com>
* [lustre]: Collect job_stats and export informationNathaniel Clark2023-04-251-0/+2
| | | | Signed-off-by: Nathaniel Clark <Nathaniel.Clark@misrule.us>
* [report] Honour -o/-e/-n from cmdline over presetPavel Moravec2023-04-251-2/+14
| | | | | | | | | | | | | When preset disables a plugin that user wants to manually enable, current merging of options ends up with -e PLUG -n PLUG which makes the plugin still disabled. apply_options_from_cmdline method must remove the preset options for any plugin that interfere with cmdline options for the plugin. Resolves: #3195 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [iscsi] Scrub password_in stringsJose Castillo2023-04-251-2/+9
| | | | | | | | | | Scrub strings in password_in in /etc/iscsi/iscsid.conf and the files within te directory /var/lib/iscsi/nodes/, i.e. /var/lib/iscsi/nodes/*/*/default and others. Fixes: RHBZ#2187859 Signed-off-by: Jose Castillo <jcastillo@redhat.com>
* [policies] Add CBL-Mariner policyEric Desrochers2023-04-241-0/+45
| | | | Signed-off-by: Eric Desrochers <edesrochers@microsoft.com>
* [component,plugins] fix typoslilinjie2023-04-242-2/+2
| | | | | | | | | fix typos in comments Resolves: #3202 Signed-off-by: lilinjie <lilinjie@uniontech.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [firewalld] Add missing directories: ipsets/, policies/, helpers/Juanma Sanchez2023-04-191-0/+3
| | | | | | | Resolves: #3191 Signed-off-by: Juanma Sanchez <juasanch@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [zfs] add collection of files from /proc/splRafael Lopez2023-04-131-0/+22
| | | | | | | | | | Add collection of files under /proc/spl which contain useful statistics and data for debugging and analysing zfs. Resolves: #3194 Signed-off-by: Rafael Lopez <rafael.lopez@canonical.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>