| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
OpenStack deployments do not need to collect all logs by default.
Resolves: #1841
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
On some newer grub2 versions, grub2-config removes extra args in
$kernel_opts until --no-grubenv-update option is used.
Test if the option is present in "grub2-config --help" and if so, use it.
Resolves: #1682
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a predicate type in form
cmd_outputs={'cmd': 'foo --help', 'output': 'bar'}
that checks whether output of given command contains given string.
Multiple commands/outputs can be provided in a list.
Related to: #1682
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The check in `Plugin.test_predicate()` relies on a 'is not None' test,
which on py2 invokes a call to `SoSPredicate.__nonzero__()` which in
turns runs our evaluation of the predicate. On py3 however, this test is
an explicit check to see if the object is `NoneType`. As such,
`__nonzero__()` never runs and the predicate defaults to always
evaluating ad `True`. This effectively removed any gating for command
execution on py3.
By overriding `SoSPredicate.__bool__()` to wrap `__nonzero__()` we can
ensure that predicate evaluation is performed properly on both py2 and
py3 runtimes.
Closes: #1839
Resolves: #1840
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Obfuscate proxy password in /etc/rhsm/rhsm.conf on line:
proxy_password = someSecret
Resolves: #1837
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The _TarFile wrapper in sos.archive is only needed for python 2.6
and earlier: remove it since we no longer support this version.
Closes: #1834
Resolves: #1838
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
If sos is being run in emergency or rescue mode on a RH family system,
then automatically load the cantboot preset by default, instead of other
package-based presets.
Resolves: #1831
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit c4d06c5 fixes an LGTM warning about the placement of the
else clause in the for loop of Plugin.set_option() but introduces
a regression setting valid plugin options:
# sosreport -vv --batch --debug --build -k rpm.rpmva=on
sosreport (version 3.8)
set sysroot to '/' (default)
[plugin:ovn_central] could not run 'podman ps': command not found
[plugin:ovn_central] could not run 'docker ps': command not found
no such option "rpmva" for plugin (rpm)
no such option "rpmva" for plugin (rpm)
The 'else' here is invalid: rather than applying to the existing
if statement inside the loop body the 'return False' should happen
unconditionally if the loop exits without finding any match.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
| |
globstr is assigned but never used
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Also, removed link to donot.css as it doesn't exist.
Resolves: #1830
Signed-off-by: Mikel Olasagasti Uranga <mikel@olasagasti.info>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
| |
Resolves: #1829
Signed-off-by: Mikel Olasagasti Uranga <mikel@olasagasti.info>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Mikel Olasagasti Uranga <mikel@olasagasti.info>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
| |
Related: #1829
Signed-off-by: Mikel Olasagasti Uranga <mikel@olasagasti.info>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
| |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Remove the from import of 'import_plugin()', and use a single
import for the whole of 'sos.plugins' in sos.sosreport.
Resolves: #1828
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
| |
Moves the call to load_all_services() out from the base __init__()
of InitSystem() and into SystemdInit(), as highlighted by LGTM.com
analysis.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
| |
Removes several unused imports identified by LGTM.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
| |
Removes a check against the log-size option that is not subsequently
used later in the plugin.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Adds a blacklist to prevent sos from trying to copy volumes when those
volumes are configured to be saved under /etc/cinder/volumes.
Fixes: #1056
Resolves: #1827
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Updates the plugin for Red Hat systems to only use the OCP kubeconfig
file, /etc/origin/master/admin.kubeconfig, if it is actually present.
Resolves: #1826
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
| |
If --all-logs is specified, the nfsganesha plugin will now gather the
rotated log files from /var/log/ganesha, not just the current log file.
Fixes: #1016
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Since FHS 3.0, the system information data since boot are located in
/run. Sosreport shall collect the data directly, without the need to
follow symlink from /var/run to /run that exists just for the sake
of legacy reasons.
Resolves: #1824
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
| |
Related: #1818
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
| |
Resolves: #1793
Signed-off-by: William Bradford Clark <wclark@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Extends the SoSPredicate class to accept and check a list of packages to
gate command or file collection on if those packages are present on the
system.
Resolves: #1785
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following 5 files are usually over the default 25mb limit:
ansible_tower.log
automation.log
evm.log
production.log
top_output.log
Those 5 files interfere with the *.log glob to behave as users
expect. These 5 files were broken out to miq_main_log_files.
Resolves: #1779
Signed-off by: David Luong <dluong@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
| |
Resolves: #1815
Signed-off-by: Pablo Iranzo Gómez <Pablo.Iranzo@gmail.com>
|
|
|
|
|
|
|
| |
Resolves: #1814
Signed-off-by: Pablo Iranzo Gómez <Pablo.Iranzo@gmail.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Updates numerous plugins to no longer use `get_command_output()`,
`call_ext_prog()`, or `check_ext_prog()` - instead only using
`collect_cmd_output()` where the content needs to be saved to the
archive, and `exec_cmd()` where it does not.
For the vast majority of plugins, these calls were able to be changed
in-place with little to no further alteration of plugin code outside of
no longer making indenpendent open() calls to files created, as the
content of those files is now directly available. Exceptions are noted
below.
For the dlm, gfs2, and kvm plugins the only use of get_command_output()
was to mount /sys/kernel/debugfs which in modern distributions is no
longer needed, so those plugins have had that functionality entirely
removed instead of being ported to the new `exec_cmd()`.
For the networking plugin, many of the checks are handled by
SoSPredicates, and so those command collections now use Predicates
rather than being gated by individual `exec_cmd()` calls.
Resolves: #1807
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Removed `call_ext_prog()`, `check_ext_prog()`, and
`get_command_output()` in favor of consolidating Plugin command
collection into 3 public methods: `add_cmd_output()`,
`collect_cmd_output()`, and `exec_cmd()`.
- `add_cmd_output()` remains unchanged and is the interface to use when
plugins should collect command output during their collect() phase.
- `collect_cmd_output()` will now return the content of a command's
execution as well as the filename within the sos archive. This replaces
`get_cmd_output_now()` and the rename aims to being a bit more
standardization to the API names. `add_cmd_output()` calls will
eventually be served by `collect_cmd_output()` during `collect()`.
- `exec_cmd()` will run a command immediately, and return its output,
without saving it to the archive. This serves to replace the
`*_ext_prog()`, and `get_command_output()` calls.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
LGTM warns about unmatchable caret and dollar symbols in ovirt's
DB_PASS_FILES since they are surrounded by leading and trailing
whitespace.
Resolves: #1823
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
| |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
| |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
| |
Resolves: #1806
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
These commands are rather pulp-related and they are required to be
collected also on Satellite6 Capsules where no katello but pulp
is present.
Resolves: #1805
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
| |
Presence or values of the variables is crucial in some foreman-installer issues.
Resolves: #1804
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
| |
mongo-server can distributed via SCL. Different package names, config
and log locations shall be captured in that case as well.
Resolves: #1803
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move `last` plugin to a new plugin called `login` that contains what
last plugin was collecting and add `/etc/login.defs` and
`/etc/default/useradd` files from shadow-utils package for now.
Closes #1808
Resolves: #1810
Signed-off-by: Mikel Olasagasti Uranga <mikel@olasagasti.info>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Updates the vdsm plugin to use add_service_status() for vdsmd and
supervdsmd.
Resolves: #1799
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From the source, currently it's on legacy
legacy - 'sosreport-tux.123456-20171224185433'
friendly - 'sosreport-tux-mylabel-123456-2017-12-24-ezcfcop.tar.xz'
This also makes adding a label actually do something.
Resolves: #1819
Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The RHV preset was previously not being automatically enabled on manager
or hypervisor systems.
This adds a check for the appropriate packages and enables the preset if
either are present.
Resolves: #1798
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We would like sosreports to check if the following packages
have been modified:
cfme
cfme-appliance
cfme-gemset
cfme-appliance-tools
cfme-appliance-common
We would check this by running an rpm -V against them.
This would expedite support's process of elimination.
This has been done by modifying policies/redhat.py,
which the RH_CFME preset has been added to to check
the integrity of the packges upon run of sos automatically
rather than having manual --verify prompt.
Resolves: #1797
Signed-off by: David Luong <dluong@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Check for connectivity to the snap store "api.snapcraft.io".
Will be very useful to have as customers start upgrading to
release where snaps are mandatory.
Resolves: #1796
Signed-off-by: Eric Desrochers <eric.desrochers@canonical.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Since the snap path for kubctl is always valid on Ubuntu don't
test for the presence of the config file in setup().
Related: #1795
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Separate the Red Hat and Ubuntu versions of the kubernetes plugin
to account for differences in packaging and configuration paths.
Related: #1654.
Resolves: #1795.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Kernel livepatch support is available since, kernel version v4.0.
Collect information relating to livepatch available under the path
/sys/kernel/livepatch/. Each of the subdirectories following the path
is a kernel livepatching module and hosts the information about the
current patching state of the functions to be livepatched by the
module.
Resolves: #1794
Signed-off-by: Kamalesh Babulal <kamalesh@linux.ibm.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Empty directories too provide some valid and helpful information in the
path copied, for example, Kernel livepatching subsystem exports the
functions being livepatched as empty directories instead of a file.
Similarly disable directory of apparmor, which indicates the status of
the profile.
The current code copies a directory to the archive only if it contains
files and skips in the case of an empty directory. This patch, copies
such skipped directory too.
Signed-off-by: Kamalesh Babulal <kamalesh@linux.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Collect foreman database sizes only in foreman plugin - in the more
detailed format that katello plugin did.
Further, stop collecting katello_repositories table as that can be bigger
while providing less valuable information.
Resolves: #1791
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This will help us to know if /etc/mtab is a symblink to
/proc/self/mounts. Helps in troubleshooting known issues
of systemd and df.
Resolves: #1790
Signed-off-by: Kenneth D'souza <kennethdsouza94@gmail.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current regex will replace the entire string after password=
with * including the mount options.
This patch fixes this issue by stopping the replacement when ","
(mount option separator)is detected.
Before patch:
//cifs-server/share /mnt cifs username=user1,password=********
After patch:
//cifs-sever/share /mnt cifs username=user1,password=********,nounix,vers=1.0 0 0
Resolves: #1789
Signed-off-by: Kenneth D'souza <kennethdsouza94@gmail.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|