aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [system] move initscripts package verification to system pluginBryn M. Reeves2017-11-011-1/+1
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [system] move glibc package verification to system pluginBryn M. Reeves2017-11-012-1/+2
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [Plugin] automatic verify for plugins with a packages listBryn M. Reeves2017-11-011-1/+6
| | | | | | | | | | | | | If a plugin defines 'packages' but not 'verify_packages', use the package list to automatically generate a list of packages to be verified when --verify is given. Only the base names are used; each entry in the package list has the '$' end-of-line match character. This prevents verification of very large numbers of packages for plugins with package names that are a common prefix (e.g. 'python-' and 'perl-'). Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [sosreport] add per-plugin package verification listsBryn M. Reeves2017-11-014-4/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new mechanism for plugins to declare a per-plugin list of packages to verify when the global --verify option is enabled. Historically this was implemented in the package manager plugin for each distribution (e.g. rpm.py for Red Hat distros and dpkg.py for the Debian family). This gives limited granularity and blocks the ability to verify only a subset of packages, or to only verify packages for a certain set of plugins. This change adds a new optional member to Plugin: verify_packages which when set will generate an additional command to be run by that plugin. The plugin calls into the PackageManager via the policy class to determine the correct package manager command to run. A plugin can request optional package verification by declaring a new 'verify_packages' member (or building one during setup()): plugin_name = 'foo' packages = ('foo', 'bar', 'baz', 'qux') verify_packages = ('foo', 'bar') Verification is only performed if the --verify switch is used. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [plugins] Don't tail gzipped files when reaching sizelimitPavel Moravec2017-11-011-1/+11
| | | | | | | | | | In case sizelimit in add_copy_spec is reached and tailit=True, we shall skip tailing a gzip archive that would be collected as damaged. Resolves: #907 Signed-off-by: Pavel Moravec <pmoravec@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [plugins] Dont apply sizelimit if --all-logs option usedPavel Moravec2017-11-012-1/+4
| | | | | | When --all-logs is used, ignore any sizelimits in add_copy_spec. Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [block] Add the output of 'lsblk -t'Jose Castillo2017-11-011-0/+1
| | | | | | | | | | | | | | | | | | | | | The output of 'lsblk -t' provides very useful information about the device's topology, like alignment offset, minimum io size, optimal io size, and others. It is equivalent to running lsblk with options: -o NAME,ALIGNMENT,MIN-IO,OPT-IO,PHY-SEC,LOG-SEC,ROTA,SCHED, RQ-SIZE,WSAME With this improvement to the block plugin we can see at one glance data available in different places like sysfs, fdisk and/or parted, as well as data not available in the sosreport nowadays, like /sys/block/<device>/queue/rotational . Fixes: #1065 Signed-off-by: Jose Castillo <jcastillo@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [origin] Add options to control oc diagnostics command invocationPep Turró Mauri2017-11-011-22/+26
| | | | | | | | | | | | Add options to control the invocation of the "oc adm diagnostics" command. These are useful in certain deployments that can't or don't want to have sosreport invoke the command, or at least need to prevent the creation of test pods. Fixes: #1098 Signed-off-by: Pep Turró Mauri <pep@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [kubernetes] Do not collect all namespaces unless requestedJon Stanley2017-10-311-27/+26
| | | | | | | | | | | Collecting all namespaces on a cluster can be extremely time consuming. Do not do this unless specifically requested, repurposing the 'all' module option. Fixes: #1108 Signed-off-by: Jon Stanley <jonstanley@gmail.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [openstack_*, logrotate] Tripleo additional directoriesMartin Schuppert2017-10-3113-43/+160
| | | | | | | | | | | | Tripleo Pike opinionated config+log paths to be collected for services, when running in containers. This is an addition to #1054 where a couple of things got missed Fixes: #1130 Signed-off-by: Martin Schuppert <mschuppe@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [openstack_[glance|heat]] run commands only if service is runningPavel Moravec2017-10-312-29/+40
| | | | | | | | | | Collect "glance-manage db_version" and similar commands from the two plugins only if the relevant services are running. Otherwise the commands get stuck and timeout. Resolves: #1124 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [postgresql] Collect data for postgreSQL from RHSCLPavel Moravec2017-10-311-52/+65
| | | | | | | | | Collect postgreSQL data also when postgreSQL is installed from Red Hat Software Collections. Resolves: #1090 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [plugins] Add class SCLPlugin for Software Collections supportPavel Moravec2017-10-311-3/+106
| | | | | | | Related to #900 and #1090 Original author: Bohuslav Kabrda <bkabrda@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [openvswitch] Collect all logsPavel Moravec2017-10-311-2/+10
| | | | | | | | Do not collect just 2 logfiles but all from the log directory. Resolves: #1116 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [boom] add plugin for the boom boot managerBryn M. Reeves2017-10-271-0/+41
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [openstack_keystone] collect /etc/keystone/domainsPavel Moravec2017-10-271-0/+1
| | | | | | | | | Collect /etc/keystone/domains valuable when keystone uses multiple ldap backends. Resolves: #1109 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [vdo] New plugin for Virtual Data OptimizerPavel Moravec2017-10-271-0/+40
| | | | | | | | Collect configs and vdo status. Resolves: #1110 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [networking] call iptables -L only when iptable_filter module is loadedPavel Moravec2017-10-271-2/+8
| | | | | | | | | | | If iptables_filter kernel module isn't loaded, dont call "iptables -vnxL" that would load that plugin. The same applies to ip6tables as well. Resolves: #1095 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [autofs] Pull autofs mapsThiago Rafael Becker2017-10-271-0/+1
| | | | | | | | | | Add `automount -m` output, as it is useful when debugging autofs issues. Fixes: #1089 Signed-off-by: Thiago Rafael Becker <thiago.becker@gmail.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [haproxy] collect haproxy overview pagePavel Moravec2017-10-271-0/+17
| | | | | | | | Collect 'curl http://$provision_ip:1993/\;csv' Resolves: #961 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [nscd] apply --all-logs optionPavel Moravec2017-10-271-1/+3
| | | | | | | | If --all-logs is specified, dont limit logs by size. Related to: #1083 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [logs] honour --all-logs every timePavel Moravec2017-10-271-10/+11
| | | | | | | | Don't limit logs by size when --all-logs is used. Related to: #1083 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [apache] plugin shall apply --all-logs optionPavel Moravec2017-10-271-16/+22
| | | | | | | | --all-logs is currently ignored by the plug-in. Related to: #1083 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [grub2] add grub2-efi to packages listBryn M. Reeves2017-10-271-1/+1
| | | | | | Fixes: #766 Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [openstack_keystone] collect domain specific configPavel Moravec2017-10-271-0/+14
| | | | | | | | Collect domain config directory if it exists. Resolves: #1086 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [pcp] collect pmlogger and also pmmgr up to 100MB every timePavel Moravec2017-10-271-22/+15
| | | | | | | | | | | | Currently, if ${PCP_LOG_DIR}/pmlogger/$(hostname) is bigger than 100MB, we dont collect anything. We should collect up to that limit every time and make the limit configurable. Also, collect ${PCP_LOG_DIR}/pmmgr/$(hostname) dir as well. Resolves: #1107 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [os_net_config] New plugin for OpenStack Net ConfigPavel Moravec2017-10-271-0/+29
| | | | | | | | To collect /etc/os_net_config directory. Resolves: #1088 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [conntrackd] Collect conntrackd config and statistics.marcli2017-10-271-0/+42
| | | | | | | Fixes: #920 Signed-off-by: Marcus Linden <mlinden@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [ovirtimageio] add --all-logs supportBryn M. Reeves2017-10-201-4/+9
| | | | | | Only collect logs by wildcard if --all-logs is given. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [ovirt_imageio] New plugin for oVirt Image I/OPavel Moravec2017-10-201-0/+51
| | | | | | | | Colecting logs and configs for the daemon and its proxy. Resolves: #1080 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [networking] collect iptables for all existing tablesPavel Moravec2017-10-201-6/+15
| | | | | | | | | Collect iptables and ip6tables for any table present in /proc/net/ip*_tables_names. Relevant to: #1092 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [firewalld] collect /var/log/firewalldPavel Moravec2017-10-201-1/+2
| | | | | | Relevant to: #1092 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [filesys] call df commands with autofs excludedPavel Moravec2017-10-201-2/+2
| | | | | | | | | To prevent timeouts of "df" commands when using a huge amount of direct mappings on autofs. Resolves: #1093 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [policies] stop execution on Ctrl+C during user inputPavel Moravec2017-10-191-2/+2
| | | | | | | | | | | | | | | | | | When pressing Ctrl+C during user input (name and case id), sosreport treats that as an empty string and starts to collect data. It must terminate instead. Catch the KeyboardIntterupt, print a newline (to avoid munging the terminal too much), and then re-raise the exception to cause the process to exit. Allow all other exceptions to propagate up and do not attempt to continue. Resolves: #1094 Signed-off-by: Pavel Moravec <pmoravec@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [networking] collect "ip address" with all detailsPavel Moravec2017-10-191-1/+1
| | | | | | | | | Call "ip -d address" to collect all details instead of "ip address" only. Resolves: #1084 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [keyutils] collect /proc/key-usersPavel Moravec2017-10-191-1/+2
| | | | | | | | Collect quota information and stats of users with a key on the system. Resolves: #1085 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [Plugin] reverse sort file list when size limitingBryn M. Reeves2017-10-191-1/+10
| | | | | | | | | Reverse sort the file list by modification time, to ensure that the most recent data is included when limits apply. Fixes: #1082 Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [openstack plugins] Tripleo specific containerized services configsMartin Schuppert2017-10-1018-105/+345
| | | | | | | | | | | | Add Tripleo Pike opinionated config paths to be collected for services, when running in containers. Each service has a config dir in /var/lib/config-data/puppet-generated on the host which gets bind mounted read only into the container. Closes #1054 Signed-off-by: Martin Schuppert <mschuppe@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [jars] Catch zipfile.BadZipfile exceptionMichal Srb2017-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | Bad ZIP files can raise zipfile.BadZipfile exception. Fixes: Traceback (most recent call last): File "/home/msrb/projects/sos/sos/sosreport.py", line 1252, in setup plug.setup() File "/home/msrb/projects/sos/sos/plugins/jars.py", line 72, in setup if Jars.is_jar(path): File "/home/msrb/projects/sos/sos/plugins/jars.py", line 98, in is_jar with zipfile.ZipFile(path) as f: File "/usr/lib64/python2.7/zipfile.py", line 770, in __init__ self._RealGetContents() File "/usr/lib64/python2.7/zipfile.py", line 842, in _RealGetContents raise BadZipfile("Bad magic number for central directory") BadZipfile: Bad magic number for central directory Signed-off-by: Michal Srb <michal@redhat.com>
* [jars] Scan only /usr/{share,lib}/java by defaultMichal Srb2017-10-101-5/+15
| | | | | | | | | | Other known locations can be added via: -k jars.all_known_locations Additional user-specified locations can be added via: -k jars.append_locations=... Signed-off-by: Michal Srb <michal@redhat.com>
* [block] remove bogus '.' and '..' checksBryn M. Reeves2017-09-041-1/+1
| | | | | | | The Python listdir() function never returns the special '.' and '..' directory entries. Do not test for them. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [nss] add new plugin for Network Security Services librariesBryn M. Reeves2017-09-011-0/+32
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [sas3ircu] add a plugin for sas3ircuKyleMahlkuch2017-08-311-0/+44
| | | | | | | | | This is a new plugin used to collect data for SAS adapters. It collects a list of adapters and then puts information on each adapter into the sosreport. Signed-off-by: Kyle Mahlkuch <Kyle.Mahlkuch@ibm.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [etcd] Use etcdctl and determine proper listening addressJake Hunsaker2017-08-311-6/+39
| | | | | | | | | | | | | | | This moves several collected outputs over from using curl to using the etcdctl command, as well as adding some addition collection. Only statistic information is now obtained via curl. Also we now attempt to determine the actual listening address based on etcd.conf, and if that is not possible the plugin assumes version-specifc defaults. Closes: #1059. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [openswan] add missing 'libreswan' to package listBryn M. Reeves2017-08-311-1/+1
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [virsh] fix missing ',' in tuple definitionBryn M. Reeves2017-08-311-1/+1
| | | | | | | A single-valued tuple needs a ',' before the closing paren to distinguish it from a value in parentheses. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [Plugin] fix bogus 're-trying in host root' messagesBryn M. Reeves2017-08-311-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | If a command is not found in Plugin.get_command_output() and the run is not configured to use an alternate sysroot (either via policy based autodetection or command line --sysroot=/path) the plugin would log messages like: [plugin:gluster] command 'gluster' not found in / - re-trying in host root This is incorrect: without an alternate sysroot the attempt should fail immediately at this point (since the 'retry' will attempt to find the command in the same namespace). This is caused by an incorrect test for alternate sysroot: if chroot and self.commons['cmdlineopts'].chroot != 'always': The 'chroot' variable is always True here, unless the caller has explicitly disabled it, or we are re-trying a command in a run with an alternate sysroot defined. Instead test that 'root' is not None and that it is not equal to '/'. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [archive] do not report IOError for virtual file systemsBryn M. Reeves2017-08-311-1/+5
| | | | | | Ignore IO errors reported by /proc and /sys. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [Plugin] add executable command enablement checksBryn M. Reeves2017-08-081-9/+18
| | | | | | | | | | | | | | | | | | | | Add a new list/tuple member to the Plugin class that contains a list of executable commands that will enable the plugin if any are present. For example, a plugin: class MyPlugin(Plugin, RedHatPlugin): commands = ('mycmd1', 'mycmd2') Will be automatically enabled if either 'mycmd1' or 'mycmd2' is present and executable in the policy defined PATH for the run. Related: #1051. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [openstack_aodh] OpenStack Alarm supportSachin Patil2017-08-081-0/+79
| | | | | | | | | | New plugin to collect OpenStack Aodh configurations and logs. Signed-off-by: Sachin Patil <psachin@redhat.com> (minor style fix) Signed-off-by: Bryn M. Reeves <bmr@redhat.com>