| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The OpenStack Placement service is being extracted from Nova [1]
duringthe Stein development cycle [2]. This change extracts the
required plugin logic from the original Nova plugin into a new
Placement plugin ahead of this extraction.
[1] https://docs.openstack.org/placement/latest/
[2] https://releases.openstack.org/stein/schedule.html
Co-Authored-by: Piotr Kopec <pkopec@redhat.com>
Resolves: #1676
Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
| |
A plugin for FRR alternative to Quagga. Path to conf is /etc/frr/.
Resolves: #1666
Signed-off-by: Filip Krska <fkrska@redhat.com>
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, in _make_leading_paths(), checking host file paths did not
account for non / sysroots, for situations where sos is run in a
container and the host's / is actually mounted under /host for example.
This would lead to copy errors when trying to copy symlinks.
This method now will use sysroot if one is set, thus avoiding copy
errors.
Resolves: #1705
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Calling _make_leading_paths for a symlink with absolute symlink target
must create the symlink relative to the source. This will prevent
creating symlinks outside sosreport build dir.
Resolves: #1710
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, sosreport does not collect files in saYYYYMMDD or
similar format. Assuming sar log dir contains only sar related data
it is safe to collect whole dir (up to size limit, from newest to
oldest files).
Resolves: #1700
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
| |
As rhn is getting obsoleted and each host has its hostname, even
redhat policy should use host name as the local name.
Resolves: #1702
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Updates the plugin to write 'kubectl get' and 'kubectl describe' output
to a subdir named for each resource we iterate over. Additionally, logs
output (when using the podlogs option) will be written to the 'pods'
subdir.
Resolves: #1628
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
| |
Updates the plugin to write command output for specific containers,
images, volumes, etc... to a subdir named for that resource.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
| |
Updates the plugin to write command output for specific containers,
images, volumes, etc... to a subdir named for that resource.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
| |
Updates the plugin to write command output for specific containers,
images, volumes, etc... to a subdir named for that resource.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Calls to add_cmd_output() now support a 'subdir' parameter which, if
set, will save command output in a subdir of the plugin's sos_commands/
directory.
Fixes: #1600
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Newer katello versions deploy certs for qpid to
/etc/pki/pulp/qpid/client.crt certs instead of
/etc/pki/katello/qpid_client_striped.crt .
Sosreport should use either of the location that exists, to successfully
run few qpid-stat commands.
Resolves: #1680
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The unpackaged plugin is the only one currently using a policy's file
list as determined by PackageManager.all_files(). As such, we should not
fail an entire sosreport run when the package file list query fails.
Accordingly, the call to all_files() to populate and store the file list
is now moved directly into the unpackaged plugin, rather than at policy
initialization.
Resolves: #1648
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Scratch containers dont have id, therefore we shall get container name
as the latest string on each line instead of 5th.
Resolves: #1647
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
| |
When external postgres DB is configured, we should query mongo
commands against that DB instead of localhost.
Resolves: #1649
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
| |
When external mongo DB is configured, we should query mongo
commands against that DB instead of localhost.
Related to: #1649
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
| |
Collect basic db stats and also collection sizes of mongo pulp_database
Resolves: #1645
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The version header is now printed before policy initialization as part
of the SoSReport() constructor instead of in the execute() message.
Fixes: #762
Resolves: #1644
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a new 'add_env_var()' method to the Plugin class, which allows
plugins to specify which environment variables should be recorded in the
sos archive. This functions as a whitelist, as only environment
variables requested by plugins will be captured. The new method accepts
either a single string, or a list of strings.
Collection of environment variables is done _after_ we have run
collect() for each plugin, and will be written to the 'environment' file
in the archive root. Only environment variables that exist will be
written, so if a plugin requests an environment variable be captured and
it does not appear in the file the chances are good that the variable is
not set on the system.
Each environment variable will only be captured once - so multiple
plugins may specify the same environment variable without an issue.
Additionally, when a plugin uses add_env_var(), the value passed as well
as an upper- and lower- cased variant of the value will be added to the
list of variables to be collected as well. This is because it is a
frequent support issue where end users set an incorrectly-cased
variable, and support representatives will want to know when this is the
case.
Because this functionality works off of a whitelist, environment
variable values are not sanitized. Note also that due to the variable
name casing functionality mentioned above, this means there is a small
chance where sensitive data stored in differently-cased variables of the
same name as common variables could be unintentionally captured.
Use the --no-env-vars option to prevent capturing any environment
variables wholesale.
Fixes: #1396
Resolves: #1643
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The 'podlogs' option was previously an all-or-nothing toggle, which
could result in incredibly large amounts of data collection when only a
few pod's logs were needed.
This change adds a 'podlogs-filter' option that allows users to provide
either a specific pod name or a regex to match pod names against, to
limit the amount of pod logs we collect.
Resolves: #1640
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a SoSCommand class to represent any command that will be collected
by sos. This replaces the previously used command tuples, which had an
ever growing length that made it difficult to quickly identify fields in
the logs.
The _add_cmd_output() method now passes SoSCommand objects to the
collect_cmds list, and _get_command_output_now() will now use the class
directly when referencing parameters supported by add_cmd_output().
Fixes: #1275
Resolves: #1639
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The most recent version of CloudForms adds postgres configuration
files at:
/etc/managiq/postgresql.conf.d/
Include these in the set of files collected by the plugin.
Resolves: #1637
Signed-off by: David Luong <dluong@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Until our utils support commands execution for unpriviledged users,
we should disable requires_root = False.
Resolves: #1625
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Collect /var/lib/mistral/config-download-latest/ansible.log which is an
important log to be able to debug issues with Ansible playbooks.
/var/lib/mistral/config-download-latest is a directory that exists
anyway on the undercloud and is the place where the ansible logs is
stored.
Note: we don't want to collect the whole /var/lib/mistral because it
contains sensitive informations like username/passwords/endpoints.
rhbz#1702806
rhbz#1702802
Resolves: #1661
Signed-off-by: Emilien Macchi <emilien@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Since PR #1530, sosreport supports all command line options. Man pages
should document the enhancement.
Resolves: #1652
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
| |
opts.noplugins is referred when parsing "tunables" section, so
the variable must be set to empty list every time.
Resolves: #1651
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Those two plugins call commands with bigger timeouts than the default
plugin timeout is. That can unexpectedly kill the plugin execution when
the commands execution took longer than the plugin timeout (but within
cmd timeout).
Resolves: #1642
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
With new enforcement of implicit data type for plugin options, the
plugopts must have proper data types of default values and plugins must work
with them accordingly (in tests or so).
Resolves: #1635
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
| |
sizelimit=None defaults to --log-size, use sizelimit=0 instead
Resolves: #1632
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Add a plugin for vdsm
Resolves: #1205
Signed-off-by: Irit Goihman <igoihman@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Irit Goihman igoihman@redhat.com
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
| |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Making origin.diag-prevent option "on" by default,
so that sosreport does not create/modify/delete
projects by default in an OpenShift cluster.
Resolves: #1624
Signed-off-by: Pablo Alonso Rodriguez <palonsor@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
For bigger foreman deployments, csv postgres queries timeout while
users are not much concerned about old tasks.
Let decrease default time span to 1 month and increase timeout for
collecting those commands.
Resolves: #1623
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
| |
When opening a file in archive e.g. for do_file_sub, we should ignore
UTF encoding errors to prevent UnicodeDecodeError.
Resolves: #1622
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
3.4 python also appears to be broken by an unnecessary use of the
chunksize argument when threading plugins landed. According to
the docs it defaults to 1, and has no effect for the
ThreadPoolExecutor class:
"For very long iterables, using a large value for chunksize can
significantly improve performance compared to the default size
of 1. With ThreadPoolExecutor, chunksize has no effect."
Related: #1603
Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes sure if we get errors (anything to stderr) in the build
it gets flagged. Today, it can be easily silently ignored.
Current build is broken by recent lgtm pull.
Resolves: #1603
Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
| |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
| |
If trying to do_file_sub on not-captured file, IOError is raised that
we have to catch like OSError.
Resolves: #1621
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
| |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
| |
A file in sos/plugins named 'amazon.py' was accidentally created
during the Amazon policy merge: remove it from the tree.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a policy for Amazon Linux. As Amazon Linux is a RHEL clone, it
inherits from the base RedHatPolicy and uses the RedHatPlugin tagging
class.
Fixes: #1563
Resolves: #1619
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Removes non-namespaced resources from being iterated over by the
namespace-sensitive loops such as describe.
Resolves: #1618
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
| |
If add_string_as_file is called with emtpy content, dont attempt to
parse it but set summary to '' directly.
Resolves: #1620
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Move the Docker service command predicate later in the file (so
as not to gate journal and ls collection), and ensure that the
'owner' argument of the SoSPredicate initialiser is set.
Resolves: #1617
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|