aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [tmpfiles] ignoring cleanup on /var/tmp/sos*Jan Jansky2023-03-314-1/+8
| | | | | | | | | | | | | | | tmpfiles relocated to separated folder, added tmpfilesd-sos-rh.conf which ignoring tmpfiles clean on /var/tmp/sos*. This is introduced due to wrong selinux context on some collected files in temporal /var/tmp/sos or /var/tmp/sosreport which generate avc denials from tmpfiles or even repeated denials when --build option is used. Related: RHBZ#1664651 Resolves: #3180 Signed-off-by: Jan Jansky <jjansky@redhat.com>
* [ceph_mgr] Gather some commands in json formatJose Castillo2023-03-301-9/+24
| | | | | | | | | Capture the output of some ceph mgr commands in json format, and add a new command to be collected. Related: RHBZ#2116602 Signed-off-by: Jose Castillo <jcastillo@redhat.com>
* [cirrus] Update CI testing imagesJake Hunsaker2023-03-301-10/+10
| | | | | | Routine update of the images used by our CI testing in GCP Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Skip /sys/class/net/bonding_* from netdevsPavel Moravec2023-03-291-3/+6
| | | | | | | | | | | Avocado tests generate netdevs by listing /sys/class/net which can contain also bonding_masters that does not refer to any netdev. In such a case, the test case fails. Resolves: #3176 Closes: #3178 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [subscription_manager] collect subscription-manager statusPavel Moravec2023-03-281-0/+1
| | | | | | | | | Collect "subscription-manager status" mainly to detect the current Simple Content Access mode of the RHSM server. Resolves: #3173 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [snap] Add license to mimic spec fileArif Ali2023-03-281-0/+1
| | | | Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [report] Set log verbosity from presets properlyPavel Moravec2023-03-242-21/+21
| | | | | | | | | | When a loaded preset sets verbosity, we should just set it to relevant loggers without redeclaring or adding new ones. Resolves: #3149 Closes: #3171 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [presets] Add new 'minimal' presetJake Hunsaker2023-03-241-3/+17
| | | | | | | | | | | Adds a new 'minimal' preset that serves to provide a minimal set of data for analysis. This involves reducing plugin/command timeouts and log/journal collection sizes. The `--low-priority` option is also enabled to further reduce system resource usage during report execution. Close: #2686 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [ovn_central] add command ovn-appctl debug/chassis-features-listFernando Royo2023-03-241-12/+17
| | | | | | | | | | | | | | | | | The upcoming u/s OVN release will introduce a new command called 'debug/chassis-features-list', this patch add to the ovn_central plugin's list of commands, in order to promptly obtain this information. Note that in case the OVN version doesn't support this command, the plugin will not crash but instead save as output 'not a valid command' msg. Also a small refactor has been carried out in terms of reuse, for function _find_sock, as ovn-appctl commands for northd service need to run over specific socket. Signed-off-by: Fernando Royo <froyo@redhat.com>
* [archive] Order archive contents specificallyJake Hunsaker2023-03-211-0/+13
| | | | | | | | | | | | This commit changes the way we build the final tarball such that the contents of `version.txt`, `sos_reports/`, and `sos_logs/` are ordered first so that automation tools can more easily access these files while keeping the tarball in memory, without needing to read the entire content of the tarball or extracting it to disk. Closes: #3139 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [logs] Fix loading of CosLogs variant for every distroJake Hunsaker2023-03-201-2/+18
| | | | | | | | | | | | | | | | | | | | Previously, the way the distro tags were applied to the `Logs` and the `CosLogs` variant, the `CosLogs` plugin would be used for every distribution. Fix this by separating an `IndependentLogs` class and marking the actual plugin content as a "base" plugin to build upon, and have the `CosLogs` plugin continue to subclass the base plugin, without inheriting the `IndependentPlugin` subclass. Do this rather than folding the `CosLogs` plugin and `log_days` option back into the main `Logs` class as CoS seems to prefer an exported binary journal rather than the standard text output favored by other distributions. Closes: #3166 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [spec] migrated to SPDX licenseSandro Bonazzola2023-03-171-1/+1
| | | | | | | Migrated License field to SPDX format as defined in https://docs.fedoraproject.org/en-US/legal/update-existing-packages/ Signed-off-by: Sandro Bonazzola <sbonazzo@redhat.com>
* [tests] Call cleaner with --no-update when using keywordsPavel Moravec2023-03-132-2/+2
| | | | | | | | | | When running avocado tests in a sequence on the same host, further tests are affected by cleaner default_mapping built from obfuscating specific keywords also. Prevent adding these keywords to the mapping. Resolves: #3165 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [subscription_manager] Scrub proxy passwords from repo_server_valStepan Broz2023-03-131-0/+11
| | | | | | | | | | | | | | | | | Make sure that passwords are scrubbed from files in /var/lib/rhsm/repo_server_val. Example of scrubbing: proxy_password=hackme To: proxy_password=******** Whitespace around '=' is allowed. Fixes: #3163 Signed-off-by: Stepan Broz <sbroz@redhat.com>
* [build] Drop old dependencies from sos.specJake Hunsaker2023-03-101-2/+0
| | | | | | | | Removes the lingering dependencies on `tar` and `xz` from `sos.spec`, as we have for some time now stopped shelling out to those tools and instead have leveraged their native python modules. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [powerpc]: To collect lparnumascore logsKorrapati Likhitha2023-03-091-0/+3
| | | | | | | | | | | | | | This patch is to update powerpc plugin to collect lparnumascore logs. lparnumascore displays the NUMA affinity score for the running LPAR.Following commands are added lparnumascore lparnumascore -c cpu -d 4 lparnumascore -c mem -d 3 Suggested-by: Laurent Dufour <ldufour@linux.ibm.com> Signed-off-by: Korrapati Likhitha <likhitha@linux.ibm.com>
* [tests] add a test covering #3160Pavel Moravec2023-03-081-0/+19
| | | | | | | | | Run the cleaner tests with obfuscating (also) "tmp" to cover files handling under sys_tmp. Related to: #3160 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [cleaner] dont clean sys_tmp from final_pathPavel Moravec2023-03-081-2/+3
| | | | | | | | | | | | | | When generating location of final tarball, apply cleaner obfuscation to the filename but not to the tmp path itself. Otherwise sos clean --keywords tmp fails in attempt to move file to nonexisting /var/obfuscatedword0 directory. Resolves: #3160 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [report] Allow users to constrain sos process priorityJake Hunsaker2023-03-076-2/+96
| | | | | | | | | | | | | | Adds a new `--low-priority` option to report, which will attempt to constrain the process priority for the report generation. We do this by attempting to set ourselves to an 'idle' IO class, as well as setting our niceness to 19 to avoid contending for CPU time. This is also exposed via `sos collect`, however users should note that this will not be effective until the sos-4.5.1 release. Closes: #3127 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [iprconfig] guard whole plugin by sg kmod predicatePavel Moravec2023-03-071-5/+8
| | | | | | | | | Calling any iprconfig command loads 'sg' kernel module. So guard collecting anything from the plugin by that kmod predicate. Resolves: #3159 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [ceph_iscsi] Support tcmu-runner logs in subdirsRaimund Sacherer2023-03-071-0/+1
| | | | | | | Added support for the tcmu-runner log being in a subdirectory of /var/log. Signed-off-by: Raimund Sacherer <rsachere@redhat.com>
* [plugins/__init__] Comment TypoRaimund Sacherer2023-03-071-1/+1
| | | | | | changed a typo in a comment. Signed-off-by: Raimund Sacherer <rsachere@redhat.com>
* [unpackaged] Print unpackaged symlinks instead of targetsPavel Moravec2023-03-061-9/+18
| | | | | | | | | | | | If a file in $PATH is unpackaged symlink leading to a (packaged) file, print rather the symlink instead of its destination, including whole symlink chain to the destination. Further, add trailing '\n' to nonempty output. Resolves: #3157 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [report] Ignore case when scrubbing via do_file_subPavel Moravec2023-03-0624-227/+114
| | | | | | | | | | | | | | | | File content substitutions done via do_file_sub will newly work case insensitive. This simplifies detection and description of sensitive content, while a risk to obfuscate a regular content is pretty low. The change is followed by simplification of do_file_sub and do_path_regex_sub calls in individual plugins, and also making them more generic: bfuscated string should not contain explicit case-sensitive key, but \1 rather, to prevent unintentional change of case of the key. Closes: #3070 Resolves: #3156 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [report,plugin] Control journal size separate from log-sizeJake Hunsaker2023-03-026-25/+45
| | | | | | | | | | | | | | | Historically, journal sizes have been limited to the *higher* of 100MB or `--log-size`. While this had the benefit of potentially controlling both logs and journals with the same option, it was not immediately intuitive to end users and downright prevented collecting less than 100MB of journals. Address this by separating journal size limiting from `--log-size` by adding a new `--journal-size` option (default 100). This will allow users to individually control journal sizes without any "gotcha" scenarios with relation to general log size limiting. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [microshift] Fix microshift get and add commandsPablo Acevedo Montserrat2023-03-021-2/+7
| | | | | | | | | Drop microshift get usage in favor of oc get commands. Add version and show-config commands before running inspect. Closes https://issues.redhat.com/browse/USHIFT-932 Signed-off-by: Pablo Acevedo Montserrat <pacevedo@redhat.com>
* [lvm2] Capture the contents of /run/lvmJose Castillo2023-03-021-0/+1
| | | | | | | | | The directory /run/lvm contains information about LVM autoactivation, and the files inside it can help debug issues where an LV or a VG is not being activated. Signed-off-by: Jose Castillo <jcastillo@redhat.com>
* [frr] Add vtysh command collectionJake Hunsaker2023-03-021-0/+30
| | | | | | | | FRR is deployed in a container for certain (RH)OSP deployments. As such, the `frr` plugin should attempt to collect various command outputs from that container if it exists. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [build] Bump version to 4.5.14.5.1Jake Hunsaker2023-03-013-4/+7
| | | | | | This commit marks the release of sos-4.5.1 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [testing] Grab snap build logs on failureArif Ali2023-03-011-0/+5
| | | | Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [ostree] Collect "ostree fsck" under plugin specific optPavel Moravec2023-02-271-2/+5
| | | | | | | | | | Collect "ostree fsck" via the plugin specific option, not via --verify option. Relevant: rhbz#2161533 Resolves: #3147 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [presets] drop --verify from RHOCP presetPavel Moravec2023-02-271-2/+2
| | | | | | | | There is no need to have that option enabled by default for RHOCP. Relevant: #3147 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [composer] Capure /etc/osbuild-composer fileJose Castillo2023-02-241-1/+2
| | | | | | | | | | | /etc/osbuild-composer contains customizations users create for Image Builder. This directory is not currently owned by any package but if present, it, and all files inside, should be gathered as well. Related: RHBZ#2169776 Signed-off-by: Jose Castillo <jcastillo@redhat.com>
* [report] Print work outcome even in quiet modePavel Moravec2023-02-242-4/+13
| | | | | | | | | | sos report should print generated sosreport directory or tarball or etimate of size even with --quiet option. Resolves: #3142 Closes: #3143 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [microshift] Add MicroShift OVN pluginPablo Acevedo Montserrat2023-02-231-0/+47
| | | | Signed-off-by: Pablo Acevedo Montserrat <pacevedo@redhat.com>
* [microshift] Add MicroShift pluginPablo Acevedo Montserrat2023-02-231-0/+167
| | | | Signed-off-by: Pablo Acevedo Montserrat <pacevedo@redhat.com>
* [rhui] Obfuscate registry_password from answers filesPavel Moravec2023-02-221-1/+1
| | | | | | | | | | registry_passwords occur in rhui-tools.conf (#3138) but also in (backups of) answers.yaml files. Relevant: #3138 Resolves: #3140 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [rhui] Obfuscate registry_password in rhui-tools.confPavel Moravec2023-02-211-0/+4
| | | | | | | | | Scrub registry_password value in /etc/rhui/rhui-tools.conf Relevant: rhbz#2170893 Resolves: #3138 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [tests] Add version consistency testJake Hunsaker2023-02-171-2/+12
| | | | | | | | | | Commits a downstream test from RHEL to ensure that a given release has a consistent version string in the UI report, manifest, and most importantly for the package nvr for an sos package built from the current branch. Note that this test is only implemented for RPM installations at this time. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Add test for #3071Pavel Moravec2023-02-161-1/+8
| | | | | | | | Add test for #3071 : Prevent obfuscating tmpDir Resolves: #3136 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [tests] Add test for AD username obfuscationPavel Moravec2023-02-151-0/+8
| | | | | | | | | Add unit test for #3030. Relevant: #3030 Resolves: #3135 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [ceph] add iSCSI gatewayNobuto Murata2023-02-101-0/+36
| | | | | | | | | | Along with existing Ceph plugins, Ceph iSCSI gateway use case requires additional config and log files to be analyzed. https://docs.ceph.com/en/latest/rbd/iscsi-overview/ Closes: #3098 Related-Bug: https://bugs.launchpad.net/ubuntu/+source/sosreport/+bug/2000672 Signed-off-by: Nobuto Murata <nobuto.murata@canonical.com>
* [azure] Update curl command for Azure MetadataToshi Aoyama2023-02-081-2/+2
| | | | | | | | - add `--noproxy` option - update api-version to `2021-01-01` - add query parameter `format=json` Signed-off-by: Toshi Aoyama <toaoyama@microsoft.com>
* Avoid overwrite symbolic link for a command outputFernando Royo2023-02-081-3/+6
| | | | | | | | | | | | | | | | Every output of a command run on a container is saved in the sos_commands folder, also additionally a symbolic link is created from the sos_container folder to link the container where it was run to the output file. When there is a duplicated command on the list to be run on the container, the symbolic link creation will fail due to file already exists error. To avoid this error we can trust on the check_path method, that will give us a clue avoid if the file already exists or not to continue with the symbolic link creation. Signed-off-by: Fernando Royo <froyo@redhat.com>
* [snap][testing] Fix bionic snap runtimeArif Ali2023-02-085-3/+16
| | | | | | | | | | | | | | | | | | | | When the snap is being packaged via core22, it used python3.10 but bionic used python3.6 and seems have runtime issues there. Added the sos alias for testing, to ensure that when the stage one testing is done, that sos is correctly tested within the snap This alternative ensures that the packaging module is packaged in the snap, and can use this if the pkg_resources version does not work Add a wrapper function in utlities, so that the parse_version can be used in a consistent way across the sos project Closes: #3126 Signed-off-by: Arif Ali <arif.ali@canonical.com>
* Remove duplicate commandsFernando Royo2023-02-071-6/+3
| | | | | | | | | | | | When a list of command are sent to run on a container the output is printed to file on sos_commands/<plugin> folder, but also a symbolic link is created from the sos_container/<container> file to the sos_commands/<plugin> file. When a command is duplicated, we get an exception on the plugin and the rest of commands are not executed. This patch removes some hardcoded commands, and clean the list from duplicated commands before sending to the container.
* [tags] Add insights specific tagsRyan Blakley2023-02-0676-138/+338
| | | | | | | | | * Added missing tags for plugins to match insights spec names, so they can be queried by insights when loading an archive. This will aid in spec loading via the manifest instead of defining the specs individually as we do now. Signed-off-by: Ryan Blakley <rblakley@redhat.com>
* [build] Bump version to 4.5.04.5.0Jake Hunsaker2023-02-013-4/+7
| | | | | | This commit marks the release of sos-4.5.0. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [ceph_common] Update log patterns for multiple ceph versionsJake Hunsaker2023-01-311-3/+3
| | | | | | | | | Updates the log patterns for `ceph_common` to handle Ceph versions that use or don't use fsid's as part of the logging paths. Related: #3122 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [ceph] Accommodate both running on host and containersNobuto Murata2023-01-303-82/+22
| | | | | | | | | | | Simplify the log collection condition by introducing a file glob. It can capture logs from both existing clusters such as package based deployments and container based deployments such as cephadm. Closes: #3100 Co-authored-by: Samuel Walladge <samuel.walladge@canonical.com> Signed-off-by: Nobuto Murata <nobuto.murata@canonical.com>