| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
9596473 commit added a regression allowing to set sysroot to None
when running sos report on a regular system (outside a container). In
such a case, we need to fallback to '/' sysroot.
Resolves: #2846
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Due to the runat=logpath argument, we must ensure the logpath directory
is created. Also catch properly the case when the directory has been
created before.
Resolves: #2845
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Update the libvirt plugin to collect logs from /var/log/containers,
which may be populated in certain environments, like
OpenStack TripleO
This is an addition to #1130 where a couple of things got missed
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit aims to reduce false-positive matches by the hostname
parser/map. Do this by first removing a too-broad substring check that
is better covered by a simpler check in the `_domains` internal dict,
made possible by the previous change which explicitly checks without the
tld as part of the domain string.
Second, improve the set of extensions to strip from potential matches
that would otherwise be regarded as TLDs, but are in fact not TLDs.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Add commands to collect cluster status of Northbound and
Southbound ovsdb servers.
Resolves: #2840
Signed-off-by: Hemanth Nakkina hemanth.nakkina@canonical.com
|
|
|
|
|
|
|
|
|
| |
This commit adds a negative look-behind to the regex patterns for mac
addresses so we avoid matching substrings from both non-mac-address
strings, certain ipv6 address strings, and longer strings of hextets
that we could potentially match a substring of.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This commit creates as new plugin for the
discovery tool. This tool is an inspection
and reporting tool, designed to find, identify,
and report environment data.
Fixes: RHBZ#2018549
Signed-off-by: Jose Castillo <jcastillo@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Following the previous commit of adding a `containers` key to a Plugin's
manifest entry, we will now make an entry in the relevant `containers`
entry for commands executed in containers.
Additionally, we will make a symlink from the relevant `sos_containers/`
path to the collection under `sos_commands/$plugin/`. This should allow
for easier spot analysis of a container by providing a kind of "micro
sos report" for each container collections happen from under the
`sos_containers/` top level directory.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds the ability for `add_copy_spec()` to copy files from
containers running on the host via a supported container runtime.
`add_copy_spec()` now has a `container` parameter which, if set, will
generate the command needed to copy a file from a container to our temp
directory. This will be collected after host files but before command
collection.
Runtimes have been updated with a `get_copy_command()` method that will
return the command string needed to copy a given file from a given
container to a given path on the host. Note that the `crio` runtime does
not currently provide a copy mechanism like `docker` or `podman`, so
file collections from containers will not be succesful on hosts using
that as their default runtime.
Finally, the manifest entries for plugins have been updated with a new
`containers` dict field whose entries are container names that have been
collected from. Those fields are also dicts having the same `files` and
`commands` keys/content as those in the plugin entry directly.
Closes: #2439
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
| |
After testing directly from snapcraft server, there was an
issue wrt classic snaps and paths. This update resolved this
particular issue
Signed-off-by: Arif Ali <arif.ali@canonical.com>
|
|
|
|
|
|
|
|
|
| |
In case virsh output is malformed or missing 'Name' otherwise,
catch parsing exception and continue in next for loop iteration.
Resolves: #2836
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previous ovn packages were 'ovn2xxx' and now they have
been renamed to 'ovn-2xxx'. This causes sos tool to not
recognize that the packages are installed and it won't
collect the relevant data.
This patch is changing the match to be compatible
with the previous and newer naming conventions.
Signed-off-by: Daniel Alvarez Sanchez <dalvarez@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Updates the docstrings for collect components for the new `help`
command, including minor formatting changes to make the help output more
human-friendly.
This includes docstring updates and changes to transports and cluster
profiles.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
| |
Adds helpful documentation to the docstrings for various Red Hat
policies to provide more information via the new `sos help` command.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Updates four common plugins to provide several examples of how to format
plugin documentation so that the new `help` component is able to provide
useful information on them.
Going forward, new plugins should include docstrings to provide this
help information as part of the initial review process. Existing plugins
will be updated as time allows or as plugins are updated and/or
refactored.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit marks the beginning of the addition of a new `help`
component for sos, which will be used to display more in-depth help
information surrounding all the different components of sos.
The command is intended to be invoked with a specific help topic in
mind, that mirrors our project layout. E.G. to get help on the report
component, a user would use `sos help report`, whereas to get help on a
specific plugin a user would use `sos help report.plugins.$plugin`.
This first commit includes both the initial framework for the `help`
component, as well as updating `SoSReport` and `Plugin` to provide a
basic implementation for the new subcommand. Additionally, `Policy` is
given a basic framework for existing policies to report certain default
values as well as available presets. A stub section is provided for the
base `RedHatPolicy` to serve as a redirector for the actually used
policies that subclass it.
Closes: #2205
|
|
|
|
|
|
|
|
| |
Skip parsing of modinfo output by the mac parser, as this can lead to
numerous false positive matches and unhelpfully obfuscate the signature
of modules.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The regex trys to match a single character not present
in the given list [^:|-]. The string which starts with
addresses are left out as there is
no character to match.
Adding ? to matches the previous token between zero and one time.
Resolves Issue: #2829
Signed-off-by: Nikhil Kakade <nikhilkaka5@outlook.com>
|
|
|
|
|
|
|
|
|
|
|
| |
In dynflow >=1.6.3, dynflow* tables in postgres are encoded by
msgpack which makes plain CSV dumps unreadable. In such a case,
psql-msgpack-decode wrapper tool from dynflow-utils (of any
version) must be used instead of the plain psql command.
Resolves: #2830
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Systemd has a hard limit of units that it can keep, and the limit is 128K.
Once that limit is hit (which is usually happening due to various bugs),
systemd returns E2BIG ("Argument list too long") when trying to start a
new unit. Until recently, it was not possible to figure out what is
going on without looking at the "systemctl list-units --all" output.
That's why it's nice to have it in sos report.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
This commit fixes a couple edge cases where an item empty (e.g. and
empty string '') was not being properly ignored, which in turned caused
failures in writing both obfuscations and replacement files.
This should no longer be possible.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
In some virsh errors (like unable to connect to a hypervisor),
the tool requires to communicate to TTY otherwise it can get stuck
(when called via Popen with a timeout).
Calling it on foreground prevents the stuck / waiting on cmd timeout.
Resolves: #2825
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
| |
Related to: #2825
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For parsers such as the username and keyword parsers, we don't discover
new items through parsing archives - these parsers use static lists
determined before we begin the actual obfuscation process.
As such, we can build a list of regexes for these static items once, and
then reference those regexes during execution, rather than rebuilding
the regex for each of these items for every obfuscation.
For use cases where hundreds of items, e.g. hundreds of usernames, are
being obfuscated this results in a significant performance increase.
Individual per-file gains are minor - fractions of a second - however
these gains build up over the course of the hundreds to thousands of
files a typical archive can be expected to contain.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
| |
It displays information whether VMware time sync is enabled, which
affects how ntpd/chronyd works.
Resolves: #2824
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Adapter information is not showing in
/call show events command because it
requires file=<filename> as a parameter
e.g.
/opt/MegaRAID/storcli/storcli64 /call show events file=storcli64_.call_show_events
Signed-off-by: Mahesh Potkar <maheshpotkar@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The changes to allow writing command output to a file highlighted a
short coming in add_service_status - by wrapping to `_add_cmd_output()`
instead of `add_cmd_output()`, we are not applying the default values
for kwarg parameters and thus potentially causing undesired behavior
during the actual collection.
Fix this by wrapping to `add_cmd_output()`, which will then in turn call
`_add_cmd_output()`.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit addresses a long standing ask in sos, regarding resource
consumption when sos is run with `--all-logs`.
For executions where `--all-logs` is used, or for specific commands
where `sizelimit` has been set to 0, `add_cmd_output()` and
`add_journal()` will now instruct `sos_get_command_output()` to write
output directly to a file rather than saving the output in memory.
When this occurs, the `output` key in the returned dict will be empty.
Note that this does extend to `collect_cmd_output()` or `exec_cmd()`.
Resolves: #1506
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
| |
Dell Remote Access Controller information and support data for Dell hardware
Signed-off-by: Vikas Goel <vikas.goel@gmail.com>
|
|
|
|
|
|
|
| |
PowerEdge RAID Controller management
https://www.dell.com/support/kbdoc/en-us/000177280/how-to-use-the-poweredge-raid-controller-perc-command-line-interface-cli-utility-to-manage-your-raid-controller
Signed-off-by: Vikas Goel <vikas.goel@gmail.com>
|
|
|
|
|
|
|
|
|
| |
In case cluster init fails, self.cluster = None and its cleanup
must be skipped.
Resolves: #2822
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
In case collector cluster hits an error during init, sos_version
is None what LooseVersion can't compare properly and raises exception
'LooseVersion' object has no attribute 'version'
Related: #2822
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
| |
Arguments that start with / and must contain a * are
the only ones that get checked if they can be expanded.
Signed-off-by: Bryan Quigley <code@bryanquigley.com>
|
|
|
|
|
|
|
|
|
|
| |
Adds skips for `/proc/kallsyms` which should never be obfuscated, as
well as any packaging-related log file for the IP parser. Further, do
not obfuscate the `stack` users, as that is a well-known user for many
configurations that, if obfuscated, could result in undesired string
substitutions in normal logging.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
| |
This commit improves our handling of skipping files on a per-parser
basis, by first filtering the list of parsers that `obfuscate_line()`
will iterate over by the parser's `skip_file` class attr, rather than
relying on higher-level checks.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our domain matching has up to now assumed that users would be providing
'base' domains such as 'example.com' whereby something like
'foo.bar.example.com' is a subdomain (or host) within that base domain.
However, the use case exists to provide 'foo.bar.example.com' as the
base domain, without wanting to obfuscate 'example.com' directly.
This commit fixes our handling of both loading these longer domains and
doing the 'domain is part of a domain we want to obfuscate' check.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
F35 has been out for a bit, we should update our testing matrix
accordingly.
New images have been pushed to GCP, so this change updates Cirrus to use
those new images.
Note this adds installation of pip to Fedora test VMs as well rather
than baking that into the images. Ethtool is now also explicitly
installed.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
'ss -peaonmi' does require also xsk_diag kmod that must be
added to the list of kmod predicates of the ss command.
Resolves: #2818
Related: #2816
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the event a CI test execution fails before the archive is created,
for any reason, we want to preserve the temp directory as the logs there
are still useful.
As such, add a specific env var to our test runs via avocado. Then, when
we detect a failure check for that env var to determine if we should in
fact do our cleanup or not.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Enhance the ceph_mds plugin to collect data specific
to mds nodes.
Related: #1945
Resolves: #2800
Signed-off-by: Nikhil Kshirsagar <nkshirsagar@gmail.com>
|
|
|
|
| |
Signed-off-by: Nadia Pinaeva <npinaeva@redhat.com>
|
|
|
|
|
|
| |
Resolves: #2812
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
As --estimate-only calculates disk usage based on `stat` data that
differs from outputs of other commands like `du`, enhance the warning
about reliability of the calculated estimation.
Also add a rule-of-thumb recommendation of real disk space requirements.
Resolves: #2815
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
| |
According to instructions in https://github.com/cri-o/cri-o/blob/main/tutorials/debugging.md
Signed-off-by: Peter Hunt <pehunt@redhat.com>
|
|
|
|
|
|
|
| |
- `rpm-ostree status` replaced with `rpm-ostree status -v`
- Added `rpm-ostree kargs` output
Signed-off-by: Pablo Alonso Rodriguez <palonsoro@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `--keywords` option supports spaces to allow for obfuscated phrases,
not just words. This however breaks if a phrase is added to the config
file *before* a run with the phrase in the cmdline option, due to the
safeguards we have for all other values that do not support spaces.
Add a check in our flow for updating options from the config file to not
replace illegal spaces if we're checking the `keywords` option, for
which spaces are legal.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a paritcular attempt to retrieve a remote file fails, we should
automatically retry that collection up to a certain point. This provides
`sos collect` more resiliency for the collection of sos report archives.
This change necessitates a change in how we handle the SoSNode flow for
failed sos report retrievals, and as such contains minor fixes to
transports to ensure that we do not incorrectly hit exceptions in error
handling that were not previously possible with how we exited the
SoSNode retrieval flow.
Closes: #2777
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
| |
Signed-off-by: Jeremy Coulombe <jeremy.coulombe@hotmail.fr>
|
|
|
|
|
|
|
|
|
| |
Hardware vendors choose an IPMI channel number for BMC LAN.
The current IPMI plugin is collecting data for channel 3.
Dell is using channel number 3. The number is not reserved for
a specific hardware vendor. It can be used by others too.
Signed-off-by: Vikas Goel <vikas.goel@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes an edge case that would cause us to at first not recognize that a
given hostname string is a new host in a known subdomain, but then on
the obfuscation attempt properly recognize it as such and result in an
incomplete obfuscation.
This was mostly triggered by specific patterns for build hosts within
`sos_commands/rpm/package-data`. With this refined check, these types of
matches are properly obfuscated.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|