| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds helper decorators to define specific test methods for use on
specific distributions only. Currently two decorators are available:
@redhat_only Only run on fedora, centos, or rhel
@ubuntu_only Only run on ubuntu or debian
Note that these decorators are only intended for individual `test_*`
methods, and will not function to define distro-specific test classes.
These should make it easier to write plugin test cases where packaging
differences between distributions otherwise makes plugin tests either
impossible needlessly complex to write generically.
Related: #2431
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Adds a predicate to gate collection of `ip xfrm` commands, dependent on
if the `xfrm_algo` and `xfrm_user` kmods are already loaded.
Discovered during testing for #2431
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Removes a `plugin_name` override in the `DebianPsacct` plugin that was
causing issues with plugin enablement/references by the overridden name.
Related: #2431
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Moves the detection of the local system's distribution to StageOne, and
defines two constants to reference RH and Ubuntu distribution lists to
allow for distro-specific tests.
Further, make the expected_warnings_displayed test skipped if the local
test system is not a RH-family distro, as those warnings are not
expected on non RH-family systems.
Related: #2431
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
First, add a "pre-setup setup" method, in the form of `pre_sos_setup()`,
that can be used in the way the traditional `setUp()` method would be
used (but can't because that's our entry point for executing our sos
runs). This method will be executed _prior_ to any mocking.
Second, add a smoke test that enables all plugins that exist in the
local branch being tested. This will test that doing so does not
generate any exceptions and that some expected warnings from select
plugins are displayed.
Related: #2431
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds several plugin tests for plugins that can be expected to run on all
distributions, in particular these tests are including mostly Stage Two
tests.
As such, these tests are only recommended to be run on test machines.
Related: #2431
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Adds a new CirrusCI task to run our StageTwo tests, iff the stageone
task completed successfully. Note that for this task we will only
execute against the latest supported version of each distro we test.
Related: #2431
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
| |
Adds a test to ensure our timeout control is working properly.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
In events where a user-provided keyword matches a filename before, or
instead of, any file _content_, that filename would go unobfuscated due
to how we match filenames to obfuscated values.
To resolve this, pre-generate an obfuscation map during parser
initialization for each keyword provided.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commits adds a `StageTwoReportTest` from which tests that need to
do "light" mocking should be defined. As the name implies, this is the
base class for our Stage 2 tests.
"Light" mocking for our purposes is currently defined as dropping files
in locations on the test system's filesystem, which may include
replacing binaries, and installing packages for the durtation of the
test case. At the end of the test, packages are uninstalled and mocked
files are removed. In the event that a file already exists at a given
location on the test system, that file is temporarily renamed with a
'.sostesting' extension. On test clean up, once mocked files are
removed, any files renamed previously are moved back to their original
location/name.
Mocking is controlled automatically during test setup, and is based upon
test class attributes, similar to how plugin enablement is dependent
upon plugin class attributes. For Stage 2 tests cases, this includes:
`files` - a list of file names. These names should represent the
"real" location on the filesystem where the mocked
files will be placed. The mocked content should be
placed under a similar file path under tests/test_data
E.G. using `files = ['/etc/foo/bar']` will place a
copy of `tests/test_data/etc/foo/bar` under
`/etc/foo/bar` on the test system.
`packages` - a dict of packages to install. The dict keys map to
the distribution the package names are used for,
e.g. `rhel` or `ubuntu`. The values are lists of
package names, optionally with version included.
This commit includes just the framework for these tests, and no actual
Stage 2 tests are included as of yet.
Related: #2431
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Updates the filepaths in our unittests for the temp data files to
reflect their new location in the updated directory layout.
Related: #2431
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
| |
Use avocado to run our test suite instead of the removed simple.sh.
Related: #2365
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit represents the start of an overhaul of the test suite used
by sos. Note that several more commits to follow will be required in
order for the test suite to be considered stable.
The new test suite will use the avocado-framework to build out new
tests.
This first part adopts a new 'stageX' naming scheme for our tests as
follows:
stage0 -> Unittests
stage1 -> Basic function tests, no mocking allowed
stage2 -> Mocked tests for specific scenarios/regressions
stage3 -> Complex setups for layered products/environments
At the moment, these unittests are not updated for avocado, though most
should still work with `nosetest` directly.
A new set of base classes is defined in tests/sos_tests.py which provide
the foundation for actual tests cases. This approach entails new test
cases subclassing a base class, such as the new `StageOneReportTest`,
and setting the `sos_cmd` class attr to the _options_ for an sos report
run. By default `sos report --batch` will be run, and targeted to the
test job's directory as a tmpdir.
Each sos command will be executed once, and all test_* methods within a
test case that subclasses `StageOneReportTest` will be checked against
the output of that execution. Note that this diverges from avocado's
typical approach where each test_* method is performed against a brand
new instance of the class (thus meaning any setup including our sos
report run would normally be run fresh). However, after speaking with
the avocado devel team, this is still seen as a valid pattern for the
framework.
The current organizational approach is to separate the tests by
component rather than stage. For example. `tests/report_tests/` should
hold any report-centric tests, and the `plugin_tests` directory therein
should be used for plugin-specific tests. As of this commit, there are
basic functionality tests under `tests/report_tests/` and a single
plugin test under `tests/report_tests/plugin_tests/` to act as a POC.
Further, there is a `tests/vendor_tests/` directory for organizing
vendor-specific bug/feature tests that are not covered by the generic
project-wide tests. A POC test from RHBZ1928628 is available with this
commit.
Note that in order for these tests to be run properly _without_
installing the current branch to the local system, you will need to run
the following command:
`PYTHONPATH=tests/ avocado run -t stageone tests/`
Related: #2431
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Converts the `ata` plugin to using the `add_block_dev()` method instead
of generating it's own list of device paths.
Closes: #2430
Resolves: #2481
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, `parse_string_for_keys()`, called by `obfuscate_string()`
for non-regex based obfuscations, would return on the first match in the
string found for each parser.
Instead, continue iterating over all items in each parser's dataset
before returning the (now fully) obfuscated string.
Resolves: #2480
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes an issue where an upload attempt on Ubuntu systems would fail with
a traceback due to the upload archive's name not being available when we
first check to make sure we have an upload location, since the Ubuntu
default location requires an archive/file name.
Related to this, stop clobbering `upload_archive` and assign the archive
name to an `upload_archive_name` variable instead.
Closes: #2472
Resolves: #2479
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to determine the available plugins on each node, `collect`
parses the `--list` output. This relies on several multiline regexes
that are built from the headers from each section printed in that
output.
Since there are now options available to every plugin, the order of
output sections has changed, and `collect` needs to break parsing
earlier to avoid scraping non-plugin-name strings into the available
plugin list for each node.
Resolves: #2477
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Only extended life OSes are using upstart still.
http://upstart.ubuntu.com/ for more details (although it's a mostly
unmaintained site at this point).
Resolves: #2473
Signed-off-by: Bryan Quigley <code@bryanquigley.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
networkctl may be used to introspect the state
of the network links as seen by systemd-networkd.
Resolves: #2471
Signed-off-by: Eric Desrochers <eric.desrochers@canonical.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add --cmd-timeout option to configure command timeout. Plugin-specific
option of the same name (i.e. -k logs.cmd-timeout=60) can control the
timeout per plugin.
Option defaults and global/plugin-specific option preference follows the
--plugin-timeout rules.
Resolves: #2466
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Files primarily containing package information, e.g. `installed-rpms` or
`installed-debs`, were previously being skipped by all parsers. In
reality, we only need to skip these for the IP parser due to the fact
that version numbers often generate a match for IP address regexes.
This will also fix a problem where if a system was the build host for
certain packages, the hostname would remain in these files as the
hostname parser was previously not checking these files.
Closes: #2400
Resolves: #2464
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By default SSSD collects all memory cache files:
* /var/lib/sss/mc/passwd
* /var/lib/sss/mc/group
* /var/lib/sss/mc/initgroups
They all are included in 25MB size limit for sosreport.
This commits add memory cache files one - by - one,
this way 25MB size limit will be aplied per file.
Resolves: #2462
Signed-off-by: Paweł Poławski <ppolawsk@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following passwords are collected unencrypted:
node.session.auth.password
discovery.sendtargets.auth.password
This patch ofbuscates these two entries in
/etc/iscsi/iscsid.conf
Resolves: #2461
Signed-off-by: Jose Castillo <jcastillo@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This captures the basics from flatpak. It's also setup
to run just if the flatpak command is available, but
most setups will still have a "native" package manager
that can be queried but is disabled.
Resolves: #2460
Signed-off-by: Bryan Quigley <code@bryanquigley.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
This variant only works if the /ostree directory exists which
should cover Gnome OS, Endless OS, and Fedora SilverBlue.
Resolves: #2459
Signed-off-by: Bryan Quigley <code@bryanquigley.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
This patch adds nvme and devices to the list of plugins
in the storage profile.
Resolves: #2435
Signed-off-by: Jose Castillo <jcastillo@redhat.com>
Signed-off-by: Bryan Quigley <code@bryanquigley.com>
|
|
|
|
|
|
|
|
|
|
| |
Default ubuntu user uses UID 1000 by default.
Closes: #2454
Resolves: #2455
Signed-off-by: Eric Desrochers <eric.desrochers@canonical.com>
Signed-off-by: Bryan Quigley <code@bryanquigley.com>
|
|
|
|
|
|
|
|
|
|
| |
Gather logs from the service cups-browsed sent
to the journal.
Resolves: #2452
Signed-off-by: Jose Castillo <jcastillo@redhat.com>
Signed-off-by: Bryan Quigley <code@bryanquigley.com>
|
|
|
|
|
|
|
|
|
|
| |
/var/tmp/sosreport_test/ instead of
/var/tmp/sosreport/_test/
Resolves: #2457
Signed-off-by: Eric Desrochers <eric.desrochers@canonical.com>
Signed-off-by: Bryan Quigley <code@bryanquigley.com>
|
|
|
|
|
|
|
|
|
| |
dynamic_debug log files for ibmvNIC
Resolves: #2458
Signed-off-by: Mamatha Inamdar <mamatha4@linux.vnet.ibm.com>
Signed-off-by: Bryan Quigley <code@bryanquigley.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
nova-status upgrade check [1] is a tool that preforms release specific
checks ahead of an upgrade.
[1] https://docs.openstack.org/nova/latest/cli/nova-status.html
Resolves: #2438
Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Collection of glusterfind dir is achieved by /var/lib/gluster
so it doesn't be collected explicitly.
/var/lib/glusterd/glusterfind/.keys/ subdir is required to be
explicitly collected, as add_copy_spec uses glob.glob() that skips
hidden files.
Resolves: #2451
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch enables the devicemapper plugin to capture
udevcookies, which is a cookie used for all LVM and
device-mapper commands to synchronize with udev processing.
This output, in combination with the output of ipcs,
helps debug various synchronization issues.
Resolves: #2450
Signed-off-by: Jose Castillo <jcastillo@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This replaces the `coreos-metadata` package with `afterburn`, which
has been in use for multiple releases now.
Additionally, this expands the list of services queried to include a
number of relevant Ignition services that are run early during boot.
Ignition related failures are responsible for a good portion of RHCOS
related problems, so grabbing those logs is prudent.
Resolves: #2449
Signed-off-by: Micah Abbott <miabbott@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
SSSD plugin by default collects only logs and configuration.
This patch enables collecting memory cache maintained
by SSSD daemon. Cache does not contain any client sensible
data so can be safely included in the sos-report.
Resolves: #2444
Signed-off-by: Paweł Poławski <ppolawsk@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The issue is that SSSD creates individual log files for its
components. To be able to track the issue we need all of them.
With one wildcard copy set we usually get just one truncated
log file and this is not very useful for solving issues. We
need to track the request accross logs to understand the
problem. Also log file names are specific for paricular
configuration.
With this patch we list log files under /var/log/sssd and
we add them one by one.
Resolves: #2445
Signed-off-by: Tomas Halman <thalman@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recently TripleO added support for Octavia amphora log offloading.
When this feature is enabled an additional rsyslog container is started
to receive logs from amphora instances.
This change ensures that settings for the rsyslog container is also
captured in sosreport.
Resolves: #2443
Signed-off-by: Takashi Kajinami <tkajinam@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Both /etc/dirsrv/slapd*/dse.ldif{,.startOK} files contain
sensitive information :
- all the nsSymmetricKey entries : symmetric encryption key
- nsslapd-rootpw : the admin password's hash
This patch masks these entries in the files we collect.
Resolves: #2442
Signed-off-by: Jose Castillo <jcastillo@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configuration collected from /etc/opensvc
* logs collected from /var/log/opensvc
* states collected from /var/lib/opensvc and cli commands
* as secrets are encrypted with cluster secret, obfuscation is needed
* all strings matching "secret =" are obfuscated, as per example
Example
-------
root@xps13# cat ${SOSREPORT}/etc/opensvc/cluster.conf
[DEFAULT]
id = d3387ce0-e766-496b-8438-b0dd23e083fd
[cluster]
nodes = xps13
id = 5c736690-60ed-11e9-81d7-8b360f06a5a4
name = xps13
secret = ****************************
; secret = ****************************
vip@titi = titi
[array#freenas.opensvc.com]
type = freenas
api = https://freenas.opensvc.com/api/v1.0
username = root
password = system/sec/freenas.opensvc.com
[hb#2]
secret = ****************************
type = relay
timeout = 30
relay = relay.opensvc.com
Resolves: #2441
Signed-off-by: Arnaud Veron <arnaud.veron@opensvc.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Two changes applied:
- drop printing IP address of a smart proxy
- add plugopt foreman.proxyfeatures that will trigger collecting features
of all smart proxies
Closes: #2424
Resolves: #2433
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes references to sosreport, to the
preferred 'sos report'. Also adds "SEE ALSO" consistently
for all man pages, and fixes a MAINTAINER line.
Resolves: #2432
Signed-off-by: Jose Castillo <jcastillo@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
"-l scterc" prints values and description of the SCT Error Recovery
Control settings.
Resolves: #2426
Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The "/sys/block/sd*/device/timeout" and
"/sys/block/hd*/device/timeout" holds block device timeouts value in
seconds.
Resolves: #2425
Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
| |
This commit represents the release of sos-4.1
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The candlepin plugin tries to read the PostgreSQL password from
/etc/candelpin/candlepin.conf, but will fallback to an empty string if one
isn't found.
This in turn causes psql to hang indefinitely (or at least until we hit
the plugin timeout).
Add `--no-password` to the psql command to not prompt for a password if
one isn't provided via another source.
Related: #2421
Resolves: #2422
Signed-off-by: Evgeni Golov <evgeni@golov.de>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The foreman plugin tries to read the PostgreSQL password from
/etc/foreman/database.yml, but will fallback to an empty string if one
isn't found.
This in turn causes psql to hang indefinitely (or at least until we hit
the plugin timeout).
Add `--no-password` to the psql command to not prompt for a password if
one isn't provided via another source.
Closes: #2421
Signed-off-by: Evgeni Golov <evgeni@golov.de>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
The plugin didn't collect anything under /var/lib/rear,
it also didn't collect anything under /etc/rear/mappings.
Resolves: #2420
Signed-off-by: Ryan Blakley <rblakley@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
sbctl commands can only be run on a leader node, so gate the commands
from running on non-leader nodes with a SoSPredicate
Closes: #2418
Resolves: #2419
Signed-off-by: Edward Hope-Morley <edward.hope-morley@canonical.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'ubuntu-advantage' cli has been shorten to 'ua'
in version 19 and then symlink at package level
to make them both available for users as a
smooth transition.
While most stable Ubuntu releases are at version 19 and
onwards, others aren't yet. The idea is to prefer 'ua'
but fall back to the deprecated 'ubuntu-advantage' cli
as needed.
Resolves: #2417
Signed-off-by: Eric Desrochers <eric.desrochers@canonical.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, kerberos realms would not be obfuscated due to the
convention that those are written in all uppercase. While the parser
would match these, the hostname parser would not obfuscate them due to
the use of intermediary dicts that were case sensitive.
Now, match this convention and if it is found, obfuscate as a whole
domain rather than a potential FQDN with a hostname.
Closes: #2254
Resolves: #2416
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|