| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Adds the ability for plugins to define a default set of environment vars
to pass to all commands executed by the plugin. This may be done either
via the new `set_default_cmd_environment()` or
`add_default_cmd_environment()` methods. The former will override any
previously set values, whereas the latter will add/update/modify any
existing values.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Corrects the initial assignment of `self.primary` to `None` instead of
`False`, so that quick scanning over the code is more inline with
`Cluster` instances.
Closes: #2892
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
| |
Update the openstack plugin to collect nova metadata logs
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Adds collection of various `sq_persist` and `sg_inq` commands to the
`scsi` plugin for scsi block devices on the host system.
Also adds a docstring description to the plugin to assist with `sos
help` output.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Forbid collection of memory.kmem.slabinfo
which in case of system with lot of
containers may cause stuck kworker.
Resolves: #2889
Signed-off-by: Jan Jansky <jjansky@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Adds a `postproc()` to the `ceph_mon` plugin to obfuscate sensitive
configuration keys printed by the `ceph config-key dump` command.
Closes: #2885
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. wait for sos tmp project to be deleted (just calling delete changes
project state to Terminating, and running a new sos collect is not
possible before this project is fully deleted)
2. use --retries flag to copy sos reports from the nodes more reliably.
The flag has been recently added to kubectl, and the most reliable way
to check if it's available or not is to check command error output for
"unknown flag" substring
Signed-off-by: Nadia Pinaeva <npinaeva@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When generating sos report, md-raid plugin won't capture the
metadata information from the actual RAID device. Also, it
tries to fetch metadata information for all block devices
available in the system.
Sometimes RAID is created using the disk partition,
but sos won't collect metadata from those devices.
This patch takes the list of raid members from lsblk,
and captures the output only for these devices.
Resolves: RHBZ#2062283
Signed-off-by: Jose Castillo <jcastillo@redhat.com>
|
|
|
|
|
|
| |
Resolves: #2880
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
| |
Add ct-zone-list command for openshift-ovn
Signed-off-by: Nadia Pinaeva <npinaeva@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Commit 1bcb449 needs to be enhanced to test if self.upload_url has been
already set. Otherwise, 'NoneType' object has no attribute 'startswith'
is raised.
Resolves: #2879
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
First, update the regexes to account for possible quotes wrapping the
mac address to match.
Second, fix an edge case with these quoted mac addresses in our check
for avoiding duplicating obfuscations of already obfuscated addresses by
checking the stripped mac address instead of the raw one.
Closes: #2873
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
mon_status command is no longer available since Octopus
release. Replaced it with its ceph tell equivalent that
works in both older as well as newer Ceph releases.
[ceph_osd/mgr] Improve the method to locate the daemon's IDs.
Signed-off-by: Ponnuvel Palaniyappan <pponnuvel@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
First, relaxes the file specifications for collection by capturing the
entire `/etc/tigervnc/` directory.
Second, adds collection of service status and journal output for each
configured vnc server. Collection of `vncserver -list` is kept for
backwards compatibility.
Finally, add a short docstring for the plugin for --help output.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
| |
collectl is a tool that helps gather performance data
and perform benchmarks and monitoring of the systems'
health. The plugin captures the configuration file
and the logs in /var/log/collectl/
Signed-off-by: Jose Castillo <jcastillo@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Red Hat OpenStack uses a container based setup, log files
are found under /var/log/containers/<service>.
Config files are located under /var/lib/config-data/puppet-generated/
Signed-off-by: Matthias Runge <mrunge@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There was a gap in our testing that allows #2863 to escape our notice -
that a `Plugin()`'s `plugin_timeout` attribute would be ignored if it
wasn't set to `TIMEOUT_DEFAULT`.
As that was resolved by #2864, add a test to ensure it remains working
as expected. The expected resolution order for a plugin's whole timeout
is as follows:
1. The value set by `-k plugin.timeout`
2. The value set by `--plugin-timeout`
3. The value hardcoded in the plugin via the `plugin_timeout` attr
4. `TIMEOUT_DEFAULT`
Related: #2863
Related: #2864
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
| |
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
|
|
|
|
|
|
| |
add a note that the pam_pkcs11 is only available in RHEL7
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
When missing some credentials, do overwrite upload_url to the Red Hat
SFTP server *only* when upload-url points to the Customer Portal API
server.
Resolves: #2869
Closes: #2870
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit follows the initial change made to the username and keyword
parsers in #2823 and applies it to all parsers by default.
When a new match is found, a new `regex.Pattern()` object will now be
compiled and saved in the parser's map, and this object will be used for
ongoing obfuscations from that point forward, rather than rebuilding
regexes for every line we iterate over with that parser.
This is now built into the base `SoSMap` and leveraged by parsers,
rather than being handled directly by parsers. Further, this will be
enabled by default for all existing and new parsers. This shows decent
improvements to hostname parser performance in local testing. Note that
this functionality is explicitly disabled for the mac and ip parsers.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
First, adds parsing and formatting for an sos installation's release
version according to the loaded package manager for that node.
Adds a fallback version check for 4.2-13 for RHEL downstreams that
backport the `container-runtime` option into sos-4.2.
Carry this in upstream to account for use cases where a workstation used
to run `collect` from may be from a different stream than those used by
cluster nodes.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add command listing VRFs and their associated tables; including in
network namespaces. This information could be retrieved from reading the
`ip -d address show` output, but it is hard to see quickly. As the `ip
vrf show` output is quite small, let's include it.
If the system has two VRFs, the output will look like:
Name Table
-----------------------
vrf0 42
vrf1 43
And if no VRF is defined the output will look like:
Name Table
-----------------------
No VRF has been configured
Signed-off-by: Antoine Tenart <atenart@kernel.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The commands used to list the routing policy rules were inconsistent:
- The IPv6 routing policy rules were not retrieved in namespaces.
- The command used were inconsistent in the file (it's only cosmetic,
but making it consistent helps maintenance).
Fix this.
Signed-off-by: Antoine Tenart <atenart@kernel.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, plugin's plugin_timeout hardcoded default is superseded by
whatever --plugin-timeout value, even when this option is not used and
we eval it to TIMEOUT_DEFAULT.
In this case of not setting --plugin-timeout either -k plugin.timeout,
honour plugin's plugin_timeout instead.
Resolves: #2863
Closes: #2864
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The reserved resource approach was used by pulp-3 for a sporadic time
in early pulp-3 development only. It is abandoned and should not be
productised anywhere. So it is safe to remove the commands (together
with rq broker status that was in charge of reserved resources).
Resolves: #2865
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
ovn_central plugin is running by container with
name 'ovn-dbs-bundle*', a typo has been identified and
this cause plugin ovn_central not enabled by default as it
does not recognize any container responsible of this.
This patch fix this container name match, searching schema db
keeping backward compatibility with openvswitch.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As container runtimes can interchange container names and container IDs,
sos should also allow the use of container IDs when checking for the
presence of a given container.
In particular, this change unblocks the use of `Plugin.exec_cmd()` when
used in conjunction with `Plugin.get_container_by_name()` to pick a
container based on a provided regex that the container name may match.
Related: #2856
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
| |
Resolves: #2860
Closes: #2861
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
| |
Related to #2860
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
While `default_mapping` is typically the only file expected under
`/etc/sos/cleaner/` it is possible for other mapping files (such as
backups) to appear there.
Make the `add_forbidden_path()` spec here target the entire cleaner
directory to avoid ever capturing these map files.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
| |
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An early implementation of #2729 included expanding `TempFileUtil` and
passing it as a means to create temp files to write command output
directly to. That approach was abandoned in favor of a more robust
implementation, but the cleanup of the previous design was apparently
not complete.
Fix this by removing the inclusion of tempfile_util in our `commons`
dict.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
With the recent fix for sysroot being `None` to always being (correctly)
`/`, we should guard against situations where `sos_get_command_output()`
would now try to chroot to `/` before running any command. Incidentally,
this would also cause our unittests to fail if they were run by a
non-root user.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
data.yml keeps status of foreman-maintain activitis in progress.
foreman_maintain.yml contains foreman-maintain config.
Resolves: #2847
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The latest release of avocado-framework, 95.0, makes several changes
that will require us to investigate moving to the newer nrunner
test-runner.
For the moment, pin our CI tests to a previous version so that the
changes in newer avocado versions don't block current development.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
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>
|