| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit follows up on the previous changes from #2555 by fully
dropping the `--master` option in favor of `--primary`, `--manager`, and
`--controller`.
Internal references have been updated as well, using the term `primary`
across all instances. Note that within OCP cluster profile, 'primary'
labeling and option setting still relies on the 'master' label/role
reported by the environment, as that remains the term used to identify
such nodes.
Resolves: #2329
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Updates the Foreman tests to use new images created for Foreman 2.5.
Additionally, adds an option to the prep script to prevent new Debian
release suite changes from causing the prep scripts to abort the tests.
For out purposes, suite changes are not important during test runs as
these images are built on known versions.
Resolves: #2656
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
| |
Signed-off-by: lijingwei <lijingwei@uniontech.com>
|
|
|
|
|
|
| |
Drops the pylintrc file from the repo, as it has been unused for years.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
For better complexity of code i am proposing
check for len(fields) >= 7 as we later in code
getting fields[7] values.
Resolves: #2647
Signed-off-by: Jan Jansky <jjansky@redhat.com>
|
|
|
|
|
|
| |
This commit marks the relase of sos-4.2
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch solves the situation where the
command:
/usr/sap/hostctrl/exe/saphostctrl
-function ListInstances
returns:
No instances found
And a non-zero return code.
Signed-off-by: Jose Castillo <jcastillo@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes the handling of plugin options passed by `sos collect` to each
node by first aligning the SoSOption name to those of `report`
(`plugopts`), and second re-arranges the handling of plugin options and
preset options passed by the user when also using `--only-plugins` so
that the former are preserved and passed only with the `--only-plugins`
option value.
Resolves: #2641
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a `report` or `collect` run would use `--clean` or `--mask` to do
in-line obfuscation of collected reports, sos would not read the config
section for clean - it would only be read if `sos clean` was called
directly. As such, users would need to manually specify config file
values for each run.
Alleviate this gap by reading the config section for `clean` if either
of the cleaner options are used. Do this before we apply cmdline options
so that we maintain our order of precedence.
Related: RHBZ#1950350
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently TripleO supports using additional yaml files to define
resource overrides.
- hieradata_override
- net_config_override
Because these files are useful when checking configurations in
an undercloud node, this change makes sosreport capture these yaml
files. The undercloud.conf file is parsed to look up these yaml files.
Signed-off-by: Takashi Kajinami <tkajinam@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously new test cases had to be written in such a way that they
could be run on any supported distribution, even if their individual
tests were all marked for specific distributions. Use of the distro-only
decorators would fail when applied to test cases as a whole due to how
test instantiation errors are handled.
To address this, provide a distro check within `BaseSoSTest` so that
tests can be made distro-specific and we can signal to avocado to skip
all tests within that test case without failing the test suite entirely.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
| |
Signed-off-by: Matt Criswell <mcriswell@mirantis.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a test that ensures we are properly extracting and cleaning an
already existing archive (one is being included under tests/test_data/
now), much the same as we test for a proper `sos report --clean` run.
As part of this, some aspects of the `full_report_run.py` test are moved
into the base test classes, and the new `existing_archive.py` test will
explicitly run `sos clean` instead of `sos report`.
The included archive for obfuscation testing is taken from a stock
Fedora 34 VM with a known configuration which is reflected in the items
being tested for.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit inserts a nested ProcessPoolExecutor into the extraction
workflow for archives that are being obfuscated by `sos clean`.
Previously, the extraction was handled inside the same thread as the
rest of the obfuscation routines for each archive. However, it has been
found that when very large archives are manipulated concurrently,
performance can take a massive hit during the extraction process. This
is due to GIL limitations.
In this aspect 'very large archives' implies many tens of thousands of
files - e.g. 50K+. Because TarFile uses a 10K internal buffer, we end up
spinning a lot of time processing each file via the interpreter.
By shunting each extraction off into a new process space, we can avoid
the GIL issues altogether.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
- obfuscate "rhui_manager_password: xxx" in /root/.rhui/answers.yaml*
- no need to collect or obfuscate anything from /etc/ansible/facts.d
- newly detect the plugin via /etc/rhui/rhui-tools.conf file or rhui-manager
command (only)
Resolves: #2637
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
| |
/etc/pulp/server/plugins.conf.d/
Resolves: #2564
Signed-off-by: Barbora Vassova bvassova@redhat.com
|
|
|
|
| |
Signed-off-by: Vikas Goel <vikas.goel@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When plugin options use a magic value as a placeholder for logic checks
used during collections, those magic values can be confusing to users
when reported via `--list`.
This was originally limited to the timeout-related options, and was
mitigated by a note in the option description. However, this approach is
not maintainable as more plugin options implement magic values to allow
complex determination of what the actual value should be during an
execution - for example, with the new `--namespaces` option and plugin
options allowing users to override that global value.
Fix the former by implementing a `TIMEOUT_DEFAULT` constant. Fix the
latter by reassigning the internal magic value from `None` to the
implied value of `0`.
Related: #2547
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Adds plugin options to the `conntrack` and `ebpf` plugins to limit the
number of namespaces they will iterate over, allowing plugin specific
options to override the global `--namespaces` option.
Resolves: #2547
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a global `--namespaces` option that can be used to limit the
number of namespaces all plugins will iterate over. If a plugin provides
a specific plugin option, such as the `networking.namespaces` option,
then if set that plugin option will override the global option value.
The global option defaults to not limiting namespaces, matching current
behavior.
Closes: #2092
Resolves: #2547
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Alongside of that, unify list of collected ethtool short options
with list of tags added.
Resolves: #2634
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
AD/LDAP users are not reported into `lastlog` generally, however they
are reported in `last`. Conversely, `last` does not report local users
who have not logged in but still exist.
In order to obfuscate both kinds of users, we need to look at both
sources.
For this, first allow parsers to specify multiple prep files. Second,
update the username parser to search through all `lastlog` collections
as well as the `last` collection.
Also includes a small update to the username parser's prep loading logic
to ensure we are iterating over each username discovered only once.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
| |
Signed-off-by: Vikas Goel <vikas.goel@gmail.com>
|
|
|
|
| |
Signed-off-by: Vikas Goel <vikas.goel@gmail.com>
|
|
|
|
| |
Signed-off-by: Vikas Goel <vikas.goel@gmail.com>
|
|
|
|
| |
Signed-off-by: Vikas Goel <vikas.goel@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: liugang <liuganga@uniontech.com>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Removes an old dependency on python-libxml2 that has not been required
for some time.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
Sos report uses --plugin-option or --plugopts.
Relevant: #2606
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
Unify --map[-file] argument among report/collect/clean.
Resolves: #2602
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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.
|