| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Since reorganization of sosreport directory tree for 4.0 preparation,
Makefie stopped working. Let apply the reorg to also here.
Resolves: #2096
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds facilities to capture metadata information about a particular sos
run, and save it to any resulting archive as `manifest.json`. This
manifest will include component-specific information that should assist
in analysis of sos runs.
For `report`, this is an extension of existing reporting functionality,
that records information on a per-plugin basis regarding command output
and file collection. However, more information is recorded in this
collection than the JSON or HTML reporting structures that review a
finished archive.
Manifest data is added at the time of collection; for commands this includes
a breakout of command, parameters, full execution syntax, filepath relative
to archive root, and the actual return code of the command, even if non-zero.
For files, the copied files are grouped by the specification set in
`add_copy_spec()` calls, I.E. for any file pattern regex that collects
at least one file, all files collected by that regex are listed.
Additionally, this adds a `tags` parameter to `add_copy_spec()`,
`add_cmd_output()`, and `collect_cmd_output()` that if used will add
tagging information to the manifest entries for those collections. This
is intended to assist in future sos work (E.G. `sos examine`) and third
party utilities in identifying relevant/connected data that is present
in the archive. Note that all collections specified by a single call to
any of these collection methods will inherit the same tags.
For `collect` we now record the cluster type, node list, and a separate
entry for each node in the node list that includes the sos version, node
sos policy, and the archive within the collect tarball that was
collected for that host.
Closes: #1990
Resolves: #2050
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This just leaves xz with gzip as the automatic backup.
Bzip2 took the most time by far and only does marginally
better than gzip.
time 27 Size 10.72MiB --batch -z xz --log-size 1
time 27 Size 16.32MiB --batch -z gzip --log-size 1
time 40 Size 14.17MiB --batch -z bzip2 --log-size 1
time 43 Size 105.21MiB --batch -z xz --all-logs
time 64 Size 187.38MiB --batch -z gzip --all-logs
time 135 Size 182.86MiB --batch -z bzip2 --all-logs
Resolves: #2053
Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
It's possible that a deployment is using ovs-bonds rather than
dpdk bond ports. In that case, it's required to pull the iface
information as well.
Resolves: #2051
Signed-off-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
| |
The connectivity fault mgmt, qos and bond data can all be retrieved
on a per-port basis.
Signed-off-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
| |
Sometimes the permissions or selinux attributes are modified in an
unexpected way.
Signed-off-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Most instances of ovs-vsctl were run without a previous check. If
the vswitchd is in a hung state, the command may never timeout. Ensure
that most places are using the timeout option.
Signed-off-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This includes flows, ct stats, frag stats, and conntrack information
for all of the datapath types that are active. Additionally, pull the
tunnel information for datapaths.
Stop using 'ovs-dpctl' in favor of 'ovs-appctl dpctl/*' - for multiple
reasons. The 'ovs-dpctl' command doesn't support the userspace
datapath. 'ovs-dpctl' cannot pull all attribute types (including
type=offloaded) in newer OVS versions. Also, the default attribute
type is 'all' so adding type=offloaded is redundant.
Signed-off-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
| |
Pulls additional flow stats, features, forwarding information and mac
layer information.
Signed-off-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
| |
The bridge protocol support has been extended for some time,
so ensure that we actually pull this protocol information
if it is configured that way.
Signed-off-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
| |
Ensures that the get-mempool-info command will be present.
Signed-off-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Collect the output of the 'iotop' command
by specifying the number of samples in
the command line with the option 'samples',
with 0.5 seconds delay between each one.
By default we capture 20 samples.
Resolves: #2024
Signed-off-by: Jose Castillo <jcastillo@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
| |
The string 'id' is a Python keyword: do not use it as a local
variable name.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
| |
The os-release file may contain blank and comment lines. Skip
them when parsing values.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An exception in SoS._init_component() currently leads to a fairly
terse error even with --debug:
# sos report -vv --batch --debug
Could not initialize 'report': dictionary update sequence element #0 has length 1; 2 is required
By propagating the exception when --debug is given we get the full
backtrace on the terminal:
# sos report -vv --batch --debug
Could not initialize 'report': dictionary update sequence element #0 has length 1; 2 is required
Traceback (most recent call last):
File "/home/breeves/src/git/sos/bin/sos", line 21, in <module>
sos = SoS(sys.argv[1:])
File "/home/breeves/src/git/sos/sos/__init__.py", line 112, in __init__
self._init_component()
File "/home/breeves/src/git/sos/sos/__init__.py", line 153, in _init_component
raise err
File "/home/breeves/src/git/sos/sos/__init__.py", line 149, in _init_component
self.cmdline)
File "/home/breeves/src/git/sos/sos/report/__init__.py", line 118, in __init__
super(SoSReport, self).__init__(parser, args, cmdline)
File "/home/breeves/src/git/sos/sos/component.py", line 98, in __init__
self.policy = sos.policies.load(sysroot=self.opts.sysroot)
File "/home/breeves/src/git/sos/sos/policies/__init__.py", line 60, in load
if policy.check(remote=remote_check):
File "/home/breeves/src/git/sos/sos/policies/cos.py", line 30, in check
os_release = dict(line.strip().split('=') for line in fp
ValueError: dictionary update sequence element #0 has length 1; 2 is required
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commands like:
machinectl -q shell user1@ ..
hang if not called on foreground / with terminal.
Resolves: #2082
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Apply os.path.expanduser on ~[user], not ~%s .
Relates to: #2082
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a plugin for gathering information about the loaded XDP programs
on a system, using the xdp-loader tool in the xdp-tools package. This is
complementary with the existing eBPF plugin, because this plugin supports
getting status for multiple XDP programs on each interface as supported by
libxdp.
For now, this just prints the output of 'xdp-loader status' which will list
any XDP programs attached. We don't currently support structured
output (such as JSON) from xdp-tools, but should we add that in the future
we can of course update this plugin.
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Apparently I just broke travis entirely with trying allow-
downgrades.
Resolves: #2077
Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Since kernel-4, iptables / ip6tables is newly provided by nf_tables
kernel module. Therefore, collecting ip[,6]tables commands should
be gated by presence of also this kernel module.
Resolves: #2054
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com>
|
|
|
|
|
|
|
|
|
| |
Skip just collecting some SSL stuff (not required, potentially sensitive).
Resolves: #2075
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
nfsserver plugin enabledness relies on legacy init scripts. A more
appropriate way to idenfity a NFS server is via nfs-utils package
(though it could be present also on a NFS client).
As that package enables nfs plugin, it is reasonable to merge the
plugins into one.
Closes: #2061
Resolves: #2073
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
'general' plugin was replaced by 'host' plugin years ago.
Let update an example in man pages accordingly.
Resolves: #2072
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows inspection of the rule order, as well as insert/edit/delete of
the rules by that numbered id (ufw delete 23).
More details can be found here: https://help.ubuntu.com/community/UFW
Resolves: #2065
Signed-off-by: David A. Desrosiers <setuid@gmail.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The documentation references ./sosreport , but
the command now lives inside ./bin, so this
commit updates such references.
Resolves: #2060
Signed-off-by: Jose Castillo <jcastillo@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the ability to collect data/info about rootless podman/buildah
containers, in particular:
- containers_common plugopt 'rootlessusers' as a list of users to inspect
- for each user, collect:
- its containers config
- [podman|buildah] info and [UID|GID] map
- collect user-status and few user-related config files
Resolves: #2055
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Moving tmpdir specifications out of policy gave us the ability to have
logging within `Policy`, however it was unnoticed before that this
stopped the redirection from container filesystem to host filesystem
when sos was running in a container (and we wanted to save the archive
to the host and not the container).
Fix this by standardizing a check for a `HOST` environment variable,
when a `container` env var is set as well. This has been used by the Red
Hat policy for some time to determine chroot locations for when we're
running in a container, and has been working well. The `container`
environment variable should be set at container setup by modern
container runtimes.
If either the `container` or `HOST` environment variable is not set, but
we are running in a container, then we will continue to write to the
container's filesystem (while policy will still determine any chroot
requirements separately).
Resolves: #2041
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com>
|
|
|
|
|
|
|
|
| |
Related to #2048, but not a true fix.
Resolves: #2067
Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com>
|
|
|
|
|
|
|
| |
Resolves: #1853
Signed-off-by: Dominika Hodovska <dhodovsk@redhat.com>
Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Fixing convert_copyspec_scl method which returned
// instead of /. That caused in some cases that
some files was not collected by plugins.
Resolves: #2016
Signed-off-by: Jan Jansky <jjansky@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
As preparation for Satellite 7 configuration and log
collection adding collection of rh-redis32 from scl.
Resolves: #2016
Signed-off-by: Jan Jansky <jjansky@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
To fix regression in 8a2a765:
Could not initialize 'report':
local variable 'flog' referenced before assignment
Resolves: #2057
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Addresses an issue where size limiting was not being applied to whole
directory specifications, as we would only stat the directory directly
when it was returned from a glob. Now, if the given copyspec is just a
directory path, recurse into it with an explicit '*' match.
Updates the forbidden path check to account for the newly extended files
list to match against the directory-only forbidden specifications. This
may result in more log entries for deep directory structures whose
parent directory/directories is/are forbidden.
Closes: #1750
Resolves: #2035
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
| |
Resolves: #2056
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, "insights-client --offline" stdout is stored in filename like
insights-client_--offline_--output-dir_.var.tmp.sos.cbl0ox16. (and so on)
Let make the filename unified and deterministic.
Also add the trailing vim expand tabs comment.
Resolves: #2058
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com>
|
|
|
|
|
|
|
|
|
|
|
| |
systemd-resolve command starts systemd-resolved service when that is
not running; thus we should call the command only under the relevant
predicate.
Resolves: #2059
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com>
|
|
|
|
|
|
|
|
|
|
|
| |
In some use cases, "rabbitmqctl report" run in a container can hung
due to missing terminal. Let workaround it for now by running the
command with --foreground timeout option.
Resolves: #2047
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The check function in CozPolicy class hits the ValueError exception
if we have empty lines in /etc/os-release file.
Updated the list comprehension used to parse the /etc/os-release file
with a if condition to take care of empty lines.
Closes: #2045
Resolves: #2046
Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
| |
Resolves: #2043
Signed-off-by: Dr. Jason Breitweg <jason@breitweg.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Use latest api-version when querying the metadata service; Additionally
switch to use /instance/compute instead of only /instance, as this
contains more information (eg. network config)
Resolves: #2019
Signed-off-by: Oliver Falk <ofalk@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
9 exisiting plugins already works on Container-Optimized OS. Marking it
to reflect that.
Resolves: #1419
Signed-off-by: Xuewei Zhang <xueweiz@google.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Add a basic policy class for Container-Optimized OS (COS).
A new CosPlugin tagging class is introduced for COS-specific plugin
cases.
Signed-off-by: Xuewei Zhang <xueweiz@google.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Updates the release line we try to match against for identifying CoreOS
hosts to the syntax now used by Red Hat CoreOS.
Resolves: #2042
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move collection of whole /etc/containers and /usr/share/containers to
one containers_common plugin enabled by the package of the same name.
Since the package is a common dependency for buildah and podman, no regression
in default data collection happens.
Resolves: #2040
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Timing - see how long each test takes
Summary - output the key results at the end
Use /dev/shm to store temporary files
Make since command actually meaningful
Resolves: #2039
Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Removes the enablement override for the plugin and instead relies on the
default architecture checks by specifying the `s390` arch in the
`architectures` tuple.
Resolves: #2038
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com>
|
|
|
|
|
|
|
|
|
|
| |
When a plugin, such as the `powerpc` plugin, only defines an
architecture enablement trigger and no files, commands, packages, etc...
our current enablement checks would return false. When the 'normal'
trigger restrictions are all empty, but there is an architecture
trigger, now properly enable based solely on that architecture.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
| |
Resolves: #2037
Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Converts all current plugin docstrings into a `short_desc` attribute,
that is now referenced by `Plugin.get_description()`.
Closes: #1960
Resolves: #2036
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|