| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
Where networking namespaces are used, there tend to be large numbers of
namespaces used. This in turn results in sos running and collecting very
large numbers of namespaced commands.
To aid in consumability, place these collections under a subdir for the
namespace under another "namespaces" subdir within the plugin directory.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Given the environments where crio is run, having `crictl inspect` output
in the main plugin directory can be a bit overwhelming. As such, put
this output into a `containers` subdir, and nest container log output in
a `containers/logs/` subdir.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
| |
Fixes a corner case where we would still attempt to create a new project
within the OCP cluster even if we weren't using the `oc` transport.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
| |
These were added in puppet-foreman_proxy_content commit 76e2a6
Signed-off-by: Taft Sanders <taftsanders@gmail.com>
|
|
|
|
|
|
| |
Included new log folder per Bugzilla 2030741
Signed-off-by: Taft Sanders <taftsanders@gmail.com>
|
|
|
|
|
|
|
| |
openshift_ovn plugin collects logs from crio containers
Fix get_container_by_name function returning container_id and not name
Signed-off-by: Nadia Pinaeva <npinaeva@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This commit fixes an issue where policies loaded for remote nodes when
using `sos collect` would override the PATH setting for the local
policy, which in turn could prevent successful execution of cluster
profile operations.
Related: #2777
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
| |
Resolves: #2792
Closes: #2791
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Initial version of the plugin.
Resolves: #2789
Related to: rhbz#2018228
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
When `cleanup()` is called for a local node, we were generating a false
warning that we couldn't remove the sos report. This removal attempt is
unnecessary since local nodes moves the sos archive during collector
archive creation, rather than copying it like we do for remote nodes.
Closes: #2769
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Fixes an issue where the use of `-a` would fail due to trying to
iterate over the key of the plugin's options dict rather than the actual
`PluginOpt` value.
Closes: #2786
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
First, don't skip the first line of `last` output, and instead add the
header from lastlog to the skip list. Additionally, add
`/etc/cron.allow` and `/etc/cron.deny` as sources for usernames that
might not appear in other locations in certain environments.
Also, make matching and replacement case insensitive.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
| |
Instead of special handling all uppercase domain conventions, use our
normal flow for obfuscation and just match the casing at the end of the
sanitization routine.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
This patch adds the directory /var/lib/vdsm/storage/transient_disks
to the list of forbidden paths, because it contains sensitive data
(cloud-init disks) or big files.
Resolves: RHBZ#2029154
Signed-off-by: Jose Castillo <jcastillo@redhat.com>
|
|
|
|
|
|
|
|
| |
Rocky Linux is an enterprise Linux distribution based on RHEL. This adds
a Rocky Linux policy, which inherits the RedHatPolicy base and uses the
RedHatPlugin tagging class.
Signed-off-by: Louis Abel <label@rockylinux.org>
|
|
|
|
|
|
|
|
| |
Updates plugins currently calling `fmt_container_cmd()` in their
`add_cmd_output()` calls to instead use the new `container` parameter
and rely on the automatic formatting.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a new `container` parameter for `Plugin.add_cmd_output()`, which if
set will format all commands passed to that call for execution in the
specified container.
`Plugin.fmt_container_cmd()` is called for this purpose, and has been
modified so that if the given container does not exist, an empty string
is returned instead, thus preventing execution on the host.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a new `--container-runtime` option that allows users to control
what default container runtime is used by plugins for container based
collections, effectively overriding policy defaults.
If no runtimes are active, this option is effectively ignored. If
however runtimes are active, but the requested one is not, raise an
exception to abort collection with an appropriate message to the user.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
| |
Signed-off-by: Nadia Pinaeva <npinaeva@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
When running a command that does not exist on the system, catch the
resulting pexpect exception and return the proper status code rather
than allowing an untrapped exception.
Closes: #2768
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
| |
Signed-off-by: Nadia Pinaeva <npinaeva@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Enhance the ceph_mgr plugin to collect more data specific to
mgr nodes. Also collect some additional manager data in the
ceph_mon plugin.
Related: #1945
Resolves: #2759
Signed-off-by: Nikhil Kshirsagar <nkshirsagar@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The determination of sysroot - being automatic, user-specified, or
controlled via environment variables in a container - has gotten muddied
over time. This has resulted in different parts of the project;
`Policy`, `Plugin`, `SoSComponent`, etc... to not always be in sync when
sysroot is not `/`, thus causing varying and unexpected/unintended
behavior.
Fix this by only determining sysroot within `Policy()` initialization,
and then using that determination across all aspects of the project that
use or reference sysroot.
This results in several changes:
- `PackageManager()` will now (again) correctly reference host package
lists when sos is run in a container.
- `ContainerRuntime()` is now able to activate when sos is running in a
container.
- Plugins will now properly use sysroot for _all_ plugin enablement
triggers.
- Plugins, Policy, and SoSComponents now all reference the
`self.sysroot` variable, rather than changing between `sysroot`.
`_host_sysroot`, and `commons['sysroot']`. `_host_sysroot` has been
removed from `Policy`.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
| |
Signed-off-by: lijingwei <lijingwei@uniontech.com>
|
|
|
|
| |
Signed-off-by: lijingwei <lijingwei@uniontech.com>
|
|
|
|
|
|
|
|
|
|
| |
When (S)FTP upload fails to write the destination file,
our "expect" code should detect it sooner than after timeout happens
and write appropriate error message.
Resolves: #2772
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Revert back the unwanted change in URI of uploading tarball to the
Red Hat Customer portal.
Related: #2772
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
| |
This commit adds `-d` to the `ip address show` executed in each of the
network namespaces on the host. This prints additonal info per each
interface, the most useful probably being VLAN information.
Signed-off-by: Michał Dulko <mdulko@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Return code 200 of POST method request must be dealt as success.
Newly required due to the SFTP API change using POST.
Related to: #2764
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Change API version from v1 to v2, which includes:
- change of URL
- different URI
- POST method for token generation instead of GET
Resolves: #2764
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
When case_id is not supplied, we ask SFTP server to store the uploaded
file under name /var/tmp/<tarball>, which is confusing.
Let remove the path from it also in case_id not supplied.
Related to: #2764
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
| |
SoSCollector does not further declare get_upload_url method
as that was moved under Policy class(es).
Resolves: #2766
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
| |
It was discovered that our extra handling for shortnames was
unintentionally case sensitive. Fix this to ensure that shortnames are
obfuscated regardless of case in all collected text.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Up until now, our sourcing of hostnames/domains for obfuscation has been
dependent upon the output of the `hostname` command. However, some
scenarios have come up where sourcing `/etc/hosts` is advantageous for
several reasons:
First, if `hostname` output is unavailable, this provides a fallback
measure.
Second, `/etc/hosts` is a common place to have short names defined which
would otherwise not be detected (or at the very least would result in a
race condition based on where/if the short name was elsewhere able to be
gleaned from an FQDN), thus leaving the potential for unobfuscated data
in an archive.
Due to both the nature of hostname obfuscation and the malleable syntax
of `/etc/hosts`, the parsing of this file needs special handling not
covered by our more generic parsing and obfuscation methods.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
This patch is to update nvidia plugin to collect
logs for Nvidia GPUs
Signed-off-by: Mamatha Inamdar <mamatha4@linux.vnet.ibm.com>
Reported-by: Borislav Stoymirski <borislav.stoymirski@bg.ibm.com>
Reported-by: Yesenia Jimenez <yesenia@us.ibm.com>
|
|
|
|
| |
Signed-off-by: Michael Cambria <mcambria@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sos report on OCP having hundreds of namespaces timeouts in networking
plugin, as it collects >10 commands for each namespace.
Let use a balanced approach in:
- increasing network.timeout
- limiting namespaces to traverse
- disabling ethtool per namespace
to ensure sos report successfully finish in a reasonable time,
collecting rasonable amount of data.
Resolves: #2754
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enhance --estimate-mode to calculate sizes of also:
- symlinks
- directories themselves
- manifest.json file
Use os.lstat() method instead of os.stat() to properly calculate the
sizes (and not destinations of symlinks, e.g.).
Print five biggest plugins instead of three as sos logs and reports do
stand as one "plugin" in the list, often.
Resolves: #2752
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Catch unhandled EOFError in collector and cleaner.
Update the behaviour in report that redundantly prints
the error message twice.
Resolves: #2751
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the `TMPDIR` env var is set, we should reference it if the user has
not provided `--tmp-dir` by the cmdline or sos.conf.
The order of precedence is now:
1. cmdline use of `--tmp-dir`
2. setting `tmp-dir` in `/etc/sos/sos.conf`
3. the `TMPDIR` environment variable
4. `/var/tmp` as a default
Additionally, we will now check if the filesystem type for our tmpdir is
tmpfs, and if so print a warning to the user about the potential
pitfalls of doing so. This information is now recorded in the manifest
as well.
Closes: #2738
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Curently, -k networking.namespace_pattern=.. is broken as the R.E. test
forgets to add the namespace in case of positive match.
Also ensure both plugopts namespace_pattern and namespaces work
together.
Resolves: #2748
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Enhance the ceph_osd plugin to collect more data specific to OSD nodes.
Related: #1945
Resolves: #2735
Signed-off-by: Nikhil Kshirsagar <nkshirsagar@gmail.com>
|