aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [smclient] Add SANtricity storage device (NetApp) supportVikas Goel2021-07-301-0/+61
| | | | Signed-off-by: Vikas Goel <vikas.goel@gmail.com>
* [ipmitool] Include channel, raw, and lan information.Vikas Goel2021-07-301-0/+8
| | | | Signed-off-by: Vikas Goel <vikas.goel@gmail.com>
* [storcli] Add LSI MegaRAID device supportVikas Goel2021-07-301-0/+44
| | | | Signed-off-by: Vikas Goel <vikas.goel@gmail.com>
* [qaucli] Add QLogic plugin supportVikas Goel2021-07-301-0/+41
| | | | Signed-off-by: Vikas Goel <vikas.goel@gmail.com>
* [build,tests] Include .po files for manual builds, add cirrus testJake Hunsaker2021-07-292-0/+15
| | | | | | | | | | | First, adds a MANIFEST.in file for distutils to reference, so that we can easily ensure that the .po files are included in any manual build from the git checkout. Second, add a cirrus task to ensure that basic rpm builds from the git checkout can be done by the user. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [sar] Capture all formats of sar filesJose Castillo2021-07-291-18/+14
| | | | | | | | | | | Currently, the plugin captures only files with the format saDD. If an user enables the option -D, the format changes to saYYYYMMDD. By using this regex, we gather both formats while ignoring .xz files and other non-sar files. Signed-off-by: Jose Castillo <jcastillo@redhat.com>
* [policies] add uniontech server os policy supportliugang2021-07-291-0/+40
| | | | Signed-off-by: liugang <liuganga@uniontech.com>
* [cleaner] Read map file only once for parsersJake Hunsaker2021-07-298-36/+28
| | | | | | | | | | Instead of re-reading the mapping file for each parser, read it once and store the contents, then hand those contents over to each parser. This allows us to side-step handling the same exception for malformed config files over and over for each parser loaded. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [lgtm] Suppress false positive alertsJake Hunsaker2021-07-282-3/+7
| | | | | | | | | | | | | Adds an alert suppression for 2 LGTM.com alerts. First, one involving the overriding of `load_options()` when we're initializing the placeholder component for `collect` on systems that do not have the proper support for it. Second, an alert about logging sensitive data when we are reporting the temporary anonymous user used to leverage the RH SFTP server when the user does not provide credentials. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [packit] Update packit configurationJake Hunsaker2021-07-271-1/+7
| | | | | | | Updates the packit configuration to enable GH comment notifications, as well as expand the architectures the COPR RPMs are built for. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] use Avocado "recursive" behavior by defaultCleber Rosa2021-07-271-2/+0
| | | | | | | | | | | | | | Avocado will, by default, use the "recursive" behavior when looking for tests. It means that the class hierarchy will be crawled recursively, until, for "avocado-instrumented" tests, the top-most parent "avocado.Test" is found. When the "enable" behavior is activated, it forces the class to be considered one containing avocado-instrumented tests, but, it disables the recursive behavior and only the tests local to that specific class are found. Signed-off-by: Cleber Rosa <crosa@redhat.com>
* [MigrationResults] collect info about conversions and upgradesPavel Moravec2021-07-261-0/+21
| | | | | | | | | | | | A new tiny plugin independent on leapp and convert2rhel is proposed. It should collect /etc/migration-results with info about RHEL conversions and upgrades, whenever the file is present. Resolves: #2627 Relevant to: rhbz#1959598 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [report] Improve logging skipped commands during dry runPavel Moravec2021-07-261-1/+7
| | | | | | | | | | | Set default value for the attribute 'changes' when_add_cmd_output is called without that argument. Further, add reason to "skipped command" log due to --dry-run. Resolves: #2626 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [build] Remove old libxml2 dependencyJake Hunsaker2021-07-261-1/+0
| | | | | | | Removes an old dependency on python-libxml2 that has not been required for some time. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [openvswitch] Add collection for OVS datapathsJake Hunsaker2021-07-221-1/+5
| | | | | | | | | | | Updates PR#1820 to bring in additional command collection for the openvswitch plugin. Note that the `ovs-appctl` command added in that original PR is not brought forward, as subsequent changes since that PR have added an iterative collection of that command. Resolves: #1820 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Add foreman_proxy and foreman_installer testsPavel Moravec2021-07-221-0/+26
| | | | | | | | | | | Add tests checking independence of foreman_* plugins on the "main" foreman plugin. Add the two plugins to the list of expectedly enabled on a tfm instance. Relevant: #2546 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [foreman-proxy] split the plugin from foremanPavel Moravec2021-07-224-56/+184
| | | | | | | | | | | | | | | Most of foreman plugin is not applicable to a smart proxy, so split that functionality to a separate plugin. Additionally, split installer (and foreman-maintain relicts) common to both foreman and smart proxy to its dedicated plugin. Move puppet stuff from foreman to puppet plugin. Resolves: #2546 Closes: #2423 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [options] allow variant option names in config filePavel Moravec2021-07-121-0/+9
| | | | | | | | | | | | | | | While cmdline allows --plugin-option as well as --plugopts, it stores the value under `plugopts` key. Therefore parsing config file ignores --plugin-option. Similarly for --name/--label and --profile/--profiles. When processing config file, we must unify those potentially duplicit keys. Resolves: #2606 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [collector] fix a typo in --plugin-optionPavel Moravec2021-07-121-1/+1
| | | | | | | | Sos report uses --plugin-option or --plugopts. Relevant: #2606 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* kata_containers: Update to the 2.x releaseFabiano Fidêncio2021-07-121-6/+1
| | | | | | | | | | | | | | | | | Kata Containers 1.x, which is the base for this plugin, has reached its EOL on May 12th 2021*. Based on that, let's update the sos plugin to match the current Fedora RPM (kata-containers, instead of kata-runtime). Currently, kata-containers can only be used in the kubernetes world and it'll always be spawn either by CRI-O or containerd, and then it'll log to the journal using their identifier, and the responsibility of collecting the CRI runtime journal is left for the CRI runtimes. *: https://medium.com/kata-containers/about-kata-containers-releases-8b3d91d1166e Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
* [sosnode] Properly format skip-commands and skip-files on nodesJake Hunsaker2021-07-121-2/+3
| | | | | | | | Fixes an issue where options provided for `skip-commands` and `skip-files` were not properly formatted, thus causing an exception during the finalization of the node's sos command. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [report,collect] unify --map-file argumentsPavel Moravec2021-07-013-3/+3
| | | | | | | | Unify --map[-file] argument among report/collect/clean. Resolves: #2602 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [plugins] Use new path wrappersJake Hunsaker2021-06-3035-99/+85
| | | | | | | | | | Updates plugins that were using `os.path.*` methods, or `os.listdir`, to use the new wrappers provided by `sos.utilities` via the helper methods in `Plugin`. Resolves: #2551 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [utilities,Plugin] Add sysroot wrappers for common os.path methodsJake Hunsaker2021-06-303-12/+106
| | | | | | | | | | | | | | | | Adds wrapper methods to `sos.utilities` that allows the common `os` methods, such as `os.path.exists()` to account for the setting of `sysroot`. This will allow sos, and particularly plugins, to more easily and reliably function as expected when sos is run within a container. Helpers have been added directly to `Plugin` that automatically pass the set `sysroot` option, so plugin authors do not need to handle that option or directly import these path functions from `sos.utilities`. Closes: #494 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [mysql] Update collection paths for Debian/UbuntuTrent Lloyd2021-06-301-5/+17
| | | | | | | | | | | - All configuration files from /etc/mysql/ - Default error log path: /var/log/mysql/error.log - Alternative data directory location /var/lib/percona-xtradb-cluster - gvwstate.dat for galera debugging - Update the various server package names (though all seem to depend on mysql-common anyway) Signed-off-by: Trent Lloyd <trent.lloyd@canonical.com>
* [cirrus] Re-order execution of component testsJake Hunsaker2021-06-301-2/+2
| | | | | | | | Re-orders the execution of component tests to have `report` tests run last so that potential system changes made during those tests do not influence other component tests. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [mac_parser] Skip over redundant matchesJake Hunsaker2021-06-301-0/+7
| | | | | | | In the event we get a match on an already-obfuscated MAC address, skip the match instead of double-obfuscating the address. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Catch unexpected exceptions that can't be inspectedJake Hunsaker2021-06-301-0/+3
| | | | | | | If we get an exception we aren't expecting and can't investigate due to a missing `CmdResult` object being attached to the raised exception, simply re-raise that exception rather than failing on trying to inspect a non-existing object.
* [tests] Add new full-run clean test caseJake Hunsaker2021-06-302-0/+86
| | | | | | | | | | | Adds a new test case that captures a full, unrestricted, sos report and runs it through `sos clean` to enhance our confidence in `clean` performance. This is a StageTwo test as it will temporarily overwrite any existing default_mapping. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Make sos execution timeout configurableJake Hunsaker2021-06-301-1/+2
| | | | | | | | Allows test cases to set their own timeout for sos command executions, rather than applying a 300 second timeout to all test cases. 300 seconds remains the default, however. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [parsers] Catch exception for malformed jsonJake Hunsaker2021-06-302-1/+11
| | | | | | | Also catch exceptions for malformed map files when trying to load them into the parsers. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [plugins] Set default predicate instead of None for robustnessPavel Moravec2021-06-301-1/+1
| | | | | | | | | | | | | Just making the code more robustness, it could be dangerous to set pred = None and then potentially call log_skipped_cmd that expects "pred" of SoSPredicate type. Currently such a call flow can not happen, but it is worth to make the code more robust for potential future changes. Resolves: #2601 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [yum] Fix potential traceback when yum history is emptyJake Hunsaker2021-06-301-1/+1
| | | | | | | Like we did in #969 for `dnf`, fix a potential issue where we would generate a traceback in the plugin when `yum history` is empty. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [cirrus] Update CentOS Stream 8 image in GCE testingJake Hunsaker2021-06-301-1/+1
| | | | | | | Updates the image used for CentOS Stream 8 testing to the latest release for that distro. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [date,systemd] Switch 'date' root symlink to timedatectlJake Hunsaker2021-06-282-3/+4
| | | | | | | | | | Changes which collection the `date` root symlink points to. It will now reference the `timedatectl` command run via the `systemd` plugin, as it provides more complete and accurate information. Closes: #2559 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [openstack_designate] Collect current pool configurationMichael Chapman2021-06-241-0/+10
| | | | | | | Use designate-manage to grab the current pools from designate, in case they differ from the pools stored in /etc Signed-off-by: Michael Chapman <woppin@gmail.com>
* [libvirt] Gather libvirt's dnsmasq configuration filesOsher De Paz2021-06-241-1/+2
| | | | Signed-off-by: Osher De Paz <osherdepaz@gmail.com>
* [rhui] fix broken obfuscationPavel Moravec2021-06-242-0/+10
| | | | | | | | | | - /etc/ansible/facts.d/rhui_*.fact must be collected by rhui plugin to let some file to be obfuscated there - obfuscate also cookies values that can grant login access Resolves: #2593 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [rhui] call rhui-* commands with proper env and timeoutPavel Moravec2021-06-241-2/+5
| | | | | | | | | | | | | | | rhui-manager commands timeout when not being logged in, which should be reacted by adding proper cmd timeout. Adding the env.variable ensures potentially unaswered "RHUI Username:" is also printed/colected. Further, prevent collecting any *.key file from the whole /etc/pki/rhui dir. Related: #2593 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [pulpcore] improve settings.py parsingPavel Moravec2021-06-241-8/+15
| | | | | | | | | | - deal with /etc/pulp/settings.py as a one-line string - parse dbname from it as well - dont collect any *.key file from whole /etc/pki/pulp dir Related: #2593 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [plugins] Allow add_forbidden_path to apply glob recursivelyPavel Moravec2021-06-241-2/+4
| | | | | | Add option to apply glob.glob to forbidden path recursively. Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [python] collect all pips installed listsPavel Moravec2021-06-231-1/+7
| | | | | | | | Collect "pip list installed" for all versions of pip. Resolves: #2592 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [cirrus] Update avocado commands with new test directoriesJake Hunsaker2021-06-221-2/+9
| | | | | | | | | | | | | | | | With the addition of the `cleaner_tests/` and `collect_tests/` subdirs, update the CirrusCI config to include these directories, while still avoiding the `product_tests/` directory for the "base" stageone and stagetwo tasks. Additionally, install python3-pexpect for the stagetwo tests. Currently, this is only utilized to test the use of the placeholder component for `collect`. However, in the future we'll be doing actual `collect` tests which would require this to be installed anyways. Resolves: #2573 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Move report_with_mask tests to cleaner_tests directoryJake Hunsaker2021-06-221-0/+0
| | | | | | | | Moves the report_with_mask tests to be under the cleaner_tests/ directory. No changes are actually being made to the tests, this is an organization change. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Add tests to ensure help outputJake Hunsaker2021-06-224-0/+217
| | | | | | | | | | | | | In the past, there have been otherwise trivial typos and the like that have caused `--help` output to be unreliable. In the case of "help options" such as `--list-plugins` this also includes potentially unavailable detailed information about whatever is being listed. These tests are sanity checks to ensure that changes aren't regressing this behavior and that the informational output options, and `--help` directly, continue to provide the right output. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Re-organize some features between base test classesJake Hunsaker2021-06-221-93/+108
| | | | | | | | | | | | | | Moves several aspects of test setup and design from `BaseSoSReportTest` into the lower-level `BaseSoSTest`, so that adding new test classes that are not report-centric will be easier going forward. Where needed, overrides in `BaseSoSReportTest` have been added. In general, this means that sos command construction, execution, tmpdir management, and the methods for mocking and other pre-execution tasks are now in `BaseSoSTest` and the additions in `BaseSoSReportTest` are now centered around handling a generated archive. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [docs] Update README for Matrix/IRCJake Hunsaker2021-06-221-0/+12
| | | | | | | Updates the README to include information on the Matrix and IRC rooms used by SoS. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [rhui] add plugin to RHUIPavel Moravec2021-06-222-1/+55
| | | | | | | | | | Add a new/revoked plugin for RHUI (newly based on python3 and pulp-3). Edditionally, collect /etc/pki/pulp certificates except for RSA keys. Resolves: #2590 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [report] Log a warning message when trying to encrypt with --buildJake Hunsaker2021-06-211-0/+3
| | | | | | | | | | | Since --build does not produce a tarball, we cannot encrypt any collections. However, the encryption options are set in the global option group so we cannot add a report-only option to that mutex group. Instead, print a warning informing the user of this limitation. Closes: #2568 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [cleaner] Fix checksum and archive pruning from archive listJake Hunsaker2021-06-212-2/+4
| | | | | | | | Fixes an issue where checksums may have gotten into the list of archives to be cleaned, which would cause further issues later. Additionally, prevents nested sosreports from top-level archives (such as from `collect`) from being removed for being a binary file when that top-level archive gets obfuscated.