aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [ovn_central] Add OVN loadbalancer command outputBrian Haley2020-09-171-0/+1
| | | | | | | | | | Now that OVN has loadbalancer support we should list any entries along with other OVN details. Resolves: #2235 Signed-off-by: Brian Haley <bhaley@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [arcconf]Add support to collect arcconf adapter infomationMamatha Inamdar2020-09-171-0/+28
| | | | | | | | | | | | | | This patch is to add new arcconf plugin to collect SATA drives connected to system backplane adapter information. arcconf getconfig 1 ----> To list the logical drives and device configurations Closes: #2213 Signed-off-by: Mamatha Inamdar <mamatha4@linux.vnet.ibm.com> Reported-by: Borislav Stoymirski <borislav.stoymirski@bg.ibm.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [mvcli]Add support to collect mvCLI PCI adapter infomationMamatha Inamdar2020-09-171-0/+35
| | | | | | | | | | | | | | | | | This patch is to add new plugin mvcli to collect SATA drives connected to system backplane adapter information. infor -o vd ----> If the virtual disk was successfully created, show a new RAID virtual disk info -o pd -----> To show all physical disks and IDs: info -o hba -----> To show all host bus adapters (HBAs): smart -p 0 -----> To check for errors on a disk: Related: #2213 Signed-off-by: Mamatha Inamdar <mamatha4@linux.vnet.ibm.com> Reported-by: Borislav Stoymirski <borislav.stoymirski@bg.ibm.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [kernel]Add support to collect network debugging logsMamatha Inamdar2020-09-171-0/+1
| | | | | | | | | | This patch is to collect hybrid network debugging messages Related: #2213 Signed-off-by: Mamatha Inamdar <mamatha4@linux.vnet.ibm.com> Reported-by: Luciano Chavez <lnx1138@linux.vnet.ibm.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [iprconfig]Add support to collect RAID adapter logsMamatha Inamdar2020-09-171-0/+1
| | | | | | | | | | | This patch updates iprconfig plugin to collect IBM Power RAID adapter device driver information. Related: #2213 Signed-off-by: Mamatha Inamdar <mamatha4@linux.vnet.ibm.com> Reported-by: Borislav Stoymirski <borislav.stoymirski@bg.ibm.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [powerpc]Add support to collect hardware component logsMamatha Inamdar2020-09-171-1/+4
| | | | | | | | | | | | | | This patch updates powerpc plugin to collect Hardware and firmware information. In this patch we are reading Hardware and firmware version details through lsvpd, lscfg and lsmcode commands Related: #2213 Signed-off-by: Mamatha Inamdar <mamatha4@linux.vnet.ibm.com> Reported-by: Borislav Stoymirski <borislav.stoymirski@bg.ibm.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [collect] Add a prompt to continue after node discoveryJake Hunsaker2020-09-161-0/+7
| | | | | | | | | When not using `--batch`, sos will now prompt the user to accept the list of discovered nodes before connecting to those nodes. Resolves: #2234 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [openstack_ironic] Missing ironic-inspector configsDavid Vallee Delisle2020-09-161-39/+82
| | | | | | | | | | | | | | | | We're missing the ironic-inspector configurations, probably because they were in the RedHatPlugin class, at the bottom of the file and they were probably missed when updating this plugin. Moving them at the top with the other `add_copy_spec` will help tracking them in case something change again. Revamping also the way we grab logs to check if we're in a container first. Resolves: #2223 Signed-off-by: David Vallee Delisle <dvd@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [rabbitmq] Add information on `maybe_stuck()` processes for RMQNicolas Bock2020-09-141-0/+8
| | | | | | | | | | | | | | | | | | | | We have seen environments in which simple commands such as rabbitmqctl list_queues Get stuck and do not produce any output. We found it helpful to run rabbitmqctl eval 'rabbitmq_diagnostics:maybe_stuck().' To obtain a list of "stuck" Erlang processes for further analysis. This change adds the output of the above command to the sosreport. Depends-On: #2232 Closes: https://bugs.launchpad.net/ubuntu/+source/sosreport/+bug/1890846 Resolves: #2189 Signed-off-by: Nicolas Bock <nicolas.bock@canonical.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [container] Make quoting of container cmd optionalNicolas Bock2020-09-142-6/+19
| | | | | | | | | | | | | | | | In case of the `docker` runtime (and potentially also in case of `podman`) quoting a command that consists of multiple words separated by whitespace leads to an incorrectly quoted command that fails to execute. Whitespaces are explicitly not supported by upstream `docker` for the `docker exec` command [1]. [1] https://docs.docker.com/engine/reference/commandline/exec/#extended-description Closes: #2231 Resolves: #2232 Signed-off-by: Nicolas Bock <nicolas.bock@canonical.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [policies] Add snapped dockerd serviceNicolas Bock2020-09-141-3/+4
| | | | | | | | | | | | When the docker service is installed via snap then the systemd service is called `snap.docker.dockerd.service` and the test whether the service is running fails. This change adds the snap service name so that the `DockerContainerRuntime` can detect it. Resolves: #2230 Signed-off-by: Nicolas Bock <nicolas.bock@canonical.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [collect] Allow collect to upload via policyJake Hunsaker2020-09-094-6/+34
| | | | | | | | | | Extends the upload functionality to `sos collect`, to work the same way that it does for `report`. Uploads will default to policy definitions, then user provided overrides. Resolves: #2210 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [archive] Fix exception handling and LGTM alertsJake Hunsaker2020-09-091-4/+4
| | | | | | | | | | | | | First, consolidate a catch for IOError and OSError into a single OSError catch, as since python-3.3 IOError has been merged into OSError. This in turn resolves a LGTM alert for an unreachable exception catch. Second, disable the init-calls-subclass warning as it is being triggered by part of the test suite which for our purposes is a false-positive. Resolves: #2225 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [networkmanager] Stop collecting "password" field.Adam R Bell2020-09-091-2/+1
| | | | | | | | | | | | | "password" fields in /etc/NetworkManager/system-connections/ is being collected. This commit stops that from happening. See issue #2220 for more details. Closes: #2220 Resolves: #2226 Signed-off-by: Adam R Bell <adam.bell@canonical.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [policies] Make IndependentPlugin work and switch 17 to use itBryan Quigley2020-09-0224-65/+45
| | | | | | | | | | | | | | | Switch valid_subclasses to be something we can just add to, and default it to include IndependentPlugin. 17 plugins switched are those that generally are going to activate via files =, commands or the like. Not packages. This will allow them to run without sos being able to determine the OS release. Closes: #2018 Resolves: #2224 Signed-off-by: Bryan Quigley <code@bryanquigley.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [collect] Detect sos-4.0 and use new binaryJake Hunsaker2020-09-024-6/+12
| | | | | | | | | | | | | Updates the `collect` module to detect sos-4.0 installation, and if present update the binary called to `sos report`. As part of this change, move the update of the binary path to the policy's full filesystem path into `finalize_sos_cmd()` Closes: #2214 Resolves: #2221 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [Policy] Allow upload username/password provided via environment varsJake Hunsaker2020-09-023-13/+28
| | | | | | | | | | | | | | | The username and password used by `Policy` when `--upload` is used may now be read via environment variables to avoid sensitive information from being included in `ps` output if they were provided via command-line options instead of the interactive prompts. Upload username may now be provided via the SOSUPLOADUSER variable. Upload password may now be provided via the SOSUPLOADPASSWORD variable. Resolves: #2216 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [systemd] list all active inhibition locksEric Desrochers2020-08-311-0/+1
| | | | | | | | | | | | | | Inhibitor locks may be used to block or delay system sleep and shutdown requests from the user, as well as automatic idle handling of the OS. Documentation: https://www.freedesktop.org/software/systemd/man/systemd-inhibit.html Resolves: #2218 Signed-off-by: Eric Desrochers <eric.desrochers@canonical.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [suse] Update policy enablement checkJake Hunsaker2020-08-311-3/+5
| | | | | | | | | | Updates the policy's enablement check for the presence of /etc/SUSE-brand instead of /etc/SuSE-release. Closes: #2217 Resolves: #2219 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [docs] Small fixes for RTD online generation changesJake Hunsaker2020-08-264-19/+9
| | | | | | | | | | A few changes on the RTD side in turn need us to slightly adjust some parts of our docs in-tree so that RTD can successfully build the docs online based on current master branch. Resolves: #2209 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [ceph] collect balancer and pg-autoscale statusDan Hill2020-08-261-0/+2
| | | | | | | | | | | | | | | | | | | | Adding the following two commands to the ceph plug-in: ceph osd pool autoscale-status ceph balancer status The autoscale-status command lists each pool, its relative utilization, and any suggested changes to the PG count. The balancer status command reports any recorded or active plans. [0] https://docs.ceph.com/docs/master/rados/operations/placement-groups/ [1] https://docs.ceph.com/docs/mimic/mgr/balancer/ Closes: #2211 Resolves: #2212 Signed-off-by: Dan Hill daniel.hill@canonical.com Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [options] Fix dict order py38 incompatibilityEric Desrochers2020-08-191-1/+1
| | | | | | | | | | | | | | | python-3.8 dict changes introduce a traceback during our config file parsing for options with `-` characters in them. Fix this by changing an iteration of the dict keys from `dict.keys()` that returns a dict_keys view, to `list(dict)` which returns a list copy of the keys. Closes: #2206 Resolves: #2207 Signed-off-by: Eric Desrochers <eric.desrochers@canonical.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [build] Bump version to 4.04.0Jake Hunsaker2020-08-173-4/+7
| | | | | | This commits marks the release of sos-4.0 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [openstack_designate] Add Ubuntu supportMichael Johnson2020-08-171-1/+6
| | | | | | | | | | | This patch adds UbuntuPlugin class for the OpenStack Designate plugin. Closes: #2150 Resolves: #2201 Signed-off-by: Michael Johnson johnsomor@gmail.com Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [openstack_designate] Add list command outputMichael Johnson2020-08-171-0/+29
| | | | | | | | | | This patch adds the various "list" command output for OpenStack designate to the SOS report. Closes: #2150 Signed-off-by: Michael Johnson <johnsomor@gmail.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [openstack_designate] Add new pluginabregman2020-08-171-0/+60
| | | | | | | | | | This adds a plugin for OpenStack Designate. Closes: #2150 Resolves: #2158 Signed-off-by: abregman <abregman@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [archive] Re-order exception handling in add_fileJake Hunsaker2020-08-171-2/+2
| | | | | | | Re orders the order of exception handling within add_file(), to avoid an unreachable OSError as highlighted by LGTM. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [docs] Update READMEJake Hunsaker2020-08-171-15/+5
| | | | | | | Updates the README to reflect doc generation and setuptools install changes. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [docs|cleaner] Update parser docstring to Sphinx styleJake Hunsaker2020-08-172-14/+38
| | | | | | | | | Updates the docstring style for `SoSCleanerParser` to Sphinx style as part of the effort to update our Sphinx documentation Related: #2172 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [docs|clusters] Update docstrings to use Sphinx style formattingJake Hunsaker2020-08-172-23/+84
| | | | | | | | | Updates the docstrings for `Cluster()` to use SPhinx-style formatting as part of the effort to bring our Sphinx docs up to date. Related: #2172 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [docs|policy] Update Policy to sphinx-style docstringsJake Hunsaker2020-08-172-64/+405
| | | | | | | | | Updates the `Policy` and related docstrings to Sphinx-style as part of the work to bring the API docs up to date. Related: #2172 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [docs|plugin] Standardize docstrings on Sphinx styleJake Hunsaker2020-08-172-146/+689
| | | | | | | | | | Standardizes the docstrings within `Plugin()` to adhere to Sphinx-style annotation, to assist with the effort to improve auto documentation generation from Sphinx. Related: #2172 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [docs] Update sphinx doc generationJake Hunsaker2020-08-177-12/+47
| | | | | | | | | | | | | | Updates the sphinx configuration for 4.0 and extends the generated docs to cover parsers and clusters. Updates the location of plugins to the new structure. Updates setup.py to include sphinx build configuration, as we are no longer using make. Closes: #1991 Resolves: #2172 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [lvm2] Update LVm commands to support HA-LVMPavel Moravec2020-08-171-5/+8
| | | | | | | | | | | | To support HA-LVM deployments: - add --foreign option in pvs, lvs, vgs and vgdisplay commands - add systemid option to vgs command Resolves: #2202 Signed-off-by: Pavel Moravec <pmoravec@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [networking] remove 'ethtool -e' option for bnx2x NICssuresh25142020-08-171-1/+11
| | | | | | | | | | | Running EEPROM dump (ethtool -e) can result in bnx2x driver NICs to pause for few seconds and is not recommended in production environment. Resolves: #2188 Resolves: #2200 Signed-off-by: suresh2514 <suresh2514@gmail.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [ubuntu] Collect /var/log/ubuntu-advantage.log file(s).Adam R Bell2020-08-141-1/+11
| | | | | | | | | | | This log file is not being collected. Canonical engineers have needed to ask for the file outside of sosreport. This addition will collect the log file, as applicable, as part of sosreport. Resolves: #2199 Signed-off-by: Adam R Bell <adam.bell@canonical.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [plugins] Add tags for common collection pointsJake Hunsaker2020-08-147-13/+48
| | | | | | | | | | This patch highlights tagging requests from the Red Hat Insights team to add tags beyond the defaults added in previous commits to commonly referenced collections in select plugins. Resolves: #2192 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [Plugin] Add method to tag files collected by generic copyspecsJake Hunsaker2020-08-141-10/+61
| | | | | | | | | | | | | | | | | | | Most of the files collected by sos are collected by 'generic' copyspecs, such as those that target a parent directory and copy the contents recursively. This makes it difficult to selectively add tags to files copied from these copyspecs, without adding that tag to _every_ file collected by it. To alleviate this, add a new `add_file_tags()` method to `Plugin` that, like `add_cmd_tags()` takes a dict of file name regex keys whose values are the tag(s) to add to those files in the manifest. Note that due to how file collection occurs, this tagging is done after all collections are complete and any matches are added as _additional_ entries to the manifest, whose specification will be the regex used to apply the tag. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [Plugin] Add regex matching for adding tagsJake Hunsaker2020-08-141-5/+38
| | | | | | | | | | | | | | | | | | | | For some time now, the prevailing style in sos has been to group commands and file collections into lists, and pass those lists into single `add_copy_spec()` or `add_cmd_output()` calls. This however presents an issue when trying to retroactively add tags to these commands or files individually as the `tags` argument is applied against the whole call. To fix this, without having to break out commands or creating confusing for loops, add a new `add_cmd_tags()` method that takes a `dict` of command regex keys, whose values are the tag(s) that should be added to commands matching those regexes. As tags are determined at collection time, and not during `setup()`, this method may be called at any point during `setup()` regardless of when the `add_cmd_output()` calls are made. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [Plugin] Add default tags to command and file collectionsJake Hunsaker2020-08-141-14/+44
| | | | | | | | | | | | | | | | | | | | | | By default, now add metadata tags for the generated manifest for command and file collections. Commands will default to being tagged with the command being run. E.G. running `uname -a` will get a tag of `uname`. Commands run via `add_blockdev_cmd()` will also have the device name added to the tags. File collections will be tagged iff the copyspec used in the `add_copy_spec()` call matched a single file, in which case the tag will be the actual filename, with `-` characters converted to `_`. Excepting `.conf` files, file extensions are stripped. For these files, `_conf` is added to the filename tag. This is being used as a best-effort default behavior, and individual commands and files may still be explicitly tagged by passing those value(s) to `tags` in the appropriate collection methods. Any tags added this way will be appended to the defaults, if any defaults are applied. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [snappy] Adds root symlink to installed snaps.Adam R Bell2020-08-131-1/+1
| | | | | | | | | | | | | | | | This is to mirror the "installed-debs" root symlink from the "dpkg" plugin. Support engineers prefer the quick access of "installed-debs", but that only covers dpkg packages. Therefore, this additional root symlink will provide engineers with the snappy packages installed. It is a somewhat Ubuntu-specific change since few other systems use snappy. Like "installed-debs" in the "dpkg" plugin, this will only show up when the snappy plugin executes. Resolves: #2198 Signed-off-by: Adam R Bell <adam.bell@canonical.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [apt] Forbid /etc/apt/auth.conf.d/ directory collection.Adam R Bell2020-08-131-0/+1
| | | | | | | | | | | | | sos/report/plugins/apt.py currently forbids the collection of /etc/apt/auth.conf on a client system. However, /etc/apt/auth.conf.d/ can also be used to store apt authentication. This will prevent keys from being collected. See apt_auth.conf(5). Resolves: #2197 Signed-off-by: Adam R Bell <adam.bell@canonical.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [general] better error messageBryan Quigley2020-08-132-5/+5
| | | | | | | Resolves: #2196 Signed-off-by: Bryan Quigley <code@bryanquigley.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [general] last flake8 fixesBryan Quigley2020-08-132-3/+3
| | | | | | | Just don't make the exceptions a variable Signed-off-by: Bryan Quigley <code@bryanquigley.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [general] include error in messagesBryan Quigley2020-08-132-2/+3
| | | | | Signed-off-by: Bryan Quigley <code@bryanquigley.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [policies] drop pre 5.2 xz supportBryan Quigley2020-08-131-11/+2
| | | | | Signed-off-by: Bryan Quigley <code@bryanquigley.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [general] flake8 first passBryan Quigley2020-08-137-13/+8
| | | | | Signed-off-by: Bryan Quigley <code@bryanquigley.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [travis,style] Upgrade to 20.04 and cover more in testsBryan Quigley2020-08-1311-60/+95
| | | | | Signed-off-by: Bryan Quigley <code@bryanquigley.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tmpfiles.d] Provide a tmpfiles.d conf exampleEric Desrochers2020-08-131-0/+4
| | | | | | | | | | | | | | | | sos will now enforce /var/tmp to store its content. This example is for vendors such as Debian/Ubuntu without a current /var/tmp systemd-tmpfiles cleaning directive in place. Debian bug reference: #966621 Closes: #2178 Resolves: #2195 Signed-off-by: Eric Desrochers <eric.desrochers@canonical.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [openstack_octavia] Collect new API resourcesCarlos Goncalves2020-08-131-36/+43
| | | | | | | | | | | | | | | | OpenStack Octavia has introduced new API-level resources: - Availability Zones - Availability Zone Profiles - Flavors - Flavor Profiles - Providers - Provider Capabilities Resolves: #2185 Signed-off-by: Carlos Goncalves <cgoncalves@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>