aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [pacemaker] Collect /etc/default/pacemaker for Debian/UbuntuBryn M. Reeves2017-05-091-2/+12
| | | | | | | | | Make /etc/default/pacemaker the default location for the Pacemaker defaults file, and have the RedHatPlugin override this to the /etc/sysconfig/pacemaker location as required. Signed-off-by: Pavel Moravec <pmoravec@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [policies/redhat] accept 'oci' as a valid container typeBryn M. Reeves2017-05-031-1/+1
| | | | | | | | | | | Currently the Red Hat container policy accepts 'container=docker' as a valid indication that we are running in a container and to enable sysroot and host sysroot checks. More recent Red Hat container infrastructure has change to setting 'container=oci', so recognise this value as well. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [plugins] work around Six string problems in HTML reportsBryn M. Reeves2017-05-031-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A workaround for Six string encoding problems involving strings that end in '\' characters was introduced for plain text reports in commit 3d23564: a similar fix is also needed for HTML reports, since the same string encoding problem can occur there too: > /usr/lib/python2.7/site-packages/six.py(647)u() -> return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") (Pdb) bt /usr/sbin/sosreport(25)<module>() -> main(sys.argv[1:]) /usr/lib/python2.7/site-packages/sos/sosreport.py(1632)main() -> sos.execute() /usr/lib/python2.7/site-packages/sos/sosreport.py(1606)execute() -> self.html_report() /usr/lib/python2.7/site-packages/sos/sosreport.py(1373)html_report() -> self._html_report() /usr/lib/python2.7/site-packages/sos/sosreport.py(1434)_html_report() -> self.handle_exception() /usr/lib/python2.7/site-packages/sos/sosreport.py(1432)_html_report() -> html = plug.report() /usr/lib/python2.7/site-packages/sos/plugins/__init__.py(930)report() -> + "/" + _to_u(cmd['file']) /usr/lib/python2.7/site-packages/sos/plugins/__init__.py(44)_to_u() -> s = six.u(s) > /usr/lib/python2.7/site-packages/six.py(647)u() -> return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") Avoid this by applying the same workaround ('\$' -> '\ $') in the existing Plugin _to_u() helper function. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [reporting] imrove readability of Six string workaroundBryn M. Reeves2017-05-031-7/+18
| | | | | | | | | | | Improve the readability of the changes to work around Six issue emphasise the fact that the buffer contains line oriented data, and introduce a helper function to test whether the string needs the workaround to be applied or not: this shortens the list comprehension which would otherwise overflow a single line due to the longer buffer variable name. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [sos] update generated __init__.pyBryn M. Reeves2017-05-021-1/+1
| | | | | | | | | | | For hysterical reasons (RPM builds), the version string stored in the module file for the sos module is substituted from a value stored in the top level Makefile: this needs to be regenerated and committed each time the version changes. Update this for 3.4. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [openstack_instack] extended packages listMartin Schuppert2017-05-021-0/+9
| | | | | | | | | | Extended packages list to verify triplo packages if --verify is specified. Resolves: #1001. Signed-off-by: Martin Schuppert <mschuppe@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [openstack_*] fix issue with --verify optionMartin Schuppert2017-05-0213-13/+13
| | | | | | | | | | If --verify option got specified, the package list was not handled properly and resulted in trace. Resolves: #1000. Signed-off-by: Martin Schuppert <mschuppe@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [virsh] Handle properly cases when virsh commands failPavel Moravec2017-04-231-7/+7
| | | | | | | | | When parsing output of "virsh -r *" commands, handle properly cases when either command fails - do not parse the output then. Resolves: #997 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [ceph] fix list formattingBryn M. Reeves2017-04-201-2/+3
| | | | | | | | Fix the formatting of the add_copy_spec() lists in ceph: make the first conform to the sos bracing and indenting rules for lists in argument tuples, and fix a missing comma in the second. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [Plugin] remove bogus checks from get_cmd_output_now()Bryn M. Reeves2017-04-191-4/+0
| | | | | | | | The underlying get_command_output() function already checks the return status of the command: checking it again in the _now() version is useless. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [Pugin] revert 77eb4ab (do not return output from failed commands)Bryn M. Reeves2017-04-191-3/+0
| | | | | | | | | | | Revert this commit: individual plugins must test the command status (if they care): plugins that attempt to access command output without testing command status are buggy and need to be fixed. Resolves: #986. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [openvswitch] Add logs for ovsdb-server and ovs-vswitchd.Kevin Traynor2017-04-131-0/+2
| | | | | Signed-off-by: Kevin Traynor <ktraynor@redhat.com> Acked-by: Flavio Leitner <fbl@redhat.com>
* [openvswitch] Add additional captures to help debug with DPDK datapath.Kevin Traynor2017-04-131-1/+7
| | | | | | | | | "ovs-appctl dpctl/show -s" for DPDK datapath stats "ovs-appctl dpif-netdev/pmd-rxq-show" for port/queue to pmd core mapping "ovs-appctl dpif-netdev/pmd-stats-show" for pmd stats Signed-off-by: Kevin Traynor <ktraynor@redhat.com> Acked-by: Flavio Leitner <fbl@redhat.com>
* [jars] fix maven_id dictionary encodingBryn M. Reeves2017-03-312-3/+13
| | | | | | | | | | | | | | | | | | | The dictionary must contain string types, not byte arrays. Causes an exception when packing strings with Python3: [sos.sosreport:setup] executing 'sosreport -vvv --batch --debug -o jars' Setting up plugins ... Traceback (most recent call last): File "./sosreport", line 25, in <module> main(sys.argv[1:]) File "/home/breeves/src/git/sos/sos/sosreport.py", line 1632, in main sos.execute() TypeError: key b'version' is not a string Resolves: #984. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [tests] update test_exe.py for python3Sandro Bonazzola2017-03-311-1/+1
| | | | | | | test_exe.py fails with nosetests-3. Updated to python 3 compatible syntax. Signed-off-by: Sandro Bonazzola <sbonazzo@redhat.com>
* [sos] bump version to 3.43.4Bryn M. Reeves2017-03-281-1/+4
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [Plugin] do not return output from failed commandsBryn M. Reeves2017-03-281-0/+4
| | | | | | | If a command returns status of '1' in Plugin.get_cmd_output_now(), do not return output even if the command wrote to stdio. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [ceph_ansible] new plugin: collect ceph-ansible site.yml and group_varsHarald Klein2017-03-281-0/+36
| | | | | | | | | Assisted by: Kyle Squizzato <ksquizza@redhat.com> Resolves: #929. Signed-off-by: Harald Klein <hari@vt100.at> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [ceph] implement log limit and add additional commandsHarald Klein2017-03-281-11/+26
| | | | | | | | | | Resolves: #926. Signed-off-by: Harald Klein <hari@vt100.at> (edits for add_copy_spec() usage) Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [grafana] add missing package list and profile entriesSachin2017-03-281-1/+3
| | | | | | | Resolves: #980. Signed-off-by: Sachin <psachin@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [openstack_ansible] Add OpenStack-Ansible pluginMajor Hayden2017-03-281-0/+47
| | | | | | | | | | This patch adds a plugin to retrieve configuration content, Ansible inventory, and cached facts from OpenStack-Ansible deployment nodes. Resolves: #922. Signed-off-by: Major Hayden <major@mhtx.net> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [virsh] Collect host, network, nwfilter, pool and more domain infoJake Hunsaker2017-03-281-5/+31
| | | | | | | | | | | | | | | This patch adds collection of host information such as memory and capabilities. Additionally, user-defined elements such as networks, nwfilters and storage pools are now collected. A listing of all elements is taken and then, if they exist, the element's xml is collected as well. Further, more domain (vm) information is collected - such as dominfo and domblklist for each domain reported by virsh. Resolves: #918. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [storageconsole] convert add_copy_spec_limit -> add_copy_specBryn M. Reeves2017-03-281-13/+10
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [salt*] convert add_copy_spec_limit -> add_copy_specBryn M. Reeves2017-03-282-13/+6
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [grafana] convert add_copy_spec_limit -> add_copy_specBryn M. Reeves2017-03-281-3/+5
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [openstack_*] convert add_copy_spec_limit -> add_copy_specBryn M. Reeves2017-03-282-12/+12
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [gnocchi] convert add_copy_spec_limit -> add_copy_specBryn M. Reeves2017-03-281-4/+4
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [plugins] remove add_copy_spec_limit() - it is now add_copy_spec()Michael Adam2017-03-281-4/+1
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* [plugins] move the glob tests togetherMichael Adam2017-03-281-4/+4
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* [plugins] remove duplicate plugin testsMichael Adam2017-03-281-11/+0
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* [plugins] let all copy_spec tests use add_copy_spec()Michael Adam2017-03-281-9/+9
| | | | | | instead of add_copy_spec_limit() Signed-off-by: Michael Adam <obnox@samba.org>
* [plugins] let all plugins use add_copy_spec() instead of add_copy_spec_limit()Michael Adam2017-03-2840-174/+129
| | | | | | | | The difference between add_copy_spec() has been removed. This is in preparation of removing the add_copy_spec_limit() special case altogether. Signed-off-by: Michael Adam <obnox@samba.org>
* [plugins] extend the signature of add_copy_spec() to match add_copy_spec_limit()Michael Adam2017-03-281-2/+2
| | | | | | This is in preparation of converging to one add_copy_spec() function Signed-off-by: Michael Adam <obnox@samba.org>
* [plugins] implement add_copy_spec() by calling add_copy_spec_limit()Michael Adam2017-03-281-14/+1
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* [plugins] Add tests for add_copy_spec_limit() with multiple copyspecsMichael Adam2017-03-281-0/+8
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* [plugins] use _expand_copy_spec in add_copy_spec_limitMichael Adam2017-03-281-1/+1
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* [plugins] make add_copy_spec_limit understand lists of copyspecsMichael Adam2017-03-281-31/+42
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* [plugins] add tests for add_copy_spec_limit()Michael Adam2017-03-281-0/+13
| | | | | | | - a test with a single file without limit - a test with a single glob without limit Signed-off-by: Michael Adam <obnox@samba.org>
* [plugins] add test for multiple arguments to add_copy_spec()Michael Adam2017-03-282-0/+5
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* [plugins] move comment structuring the add_copy_spec_limit testsMichael Adam2017-03-281-2/+2
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* [plugins] add an extra blank line for separation in plugin_testsMichael Adam2017-03-281-0/+1
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* [plugins] fix trailing whitespace in plugin_testsMichael Adam2017-03-281-1/+1
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* [plugins] Make the test_glob_file_over_limit test reliable by using a tmpdirMichael Adam2017-03-281-6/+6
| | | | | | | | Originally,f there were other files matching the glob of /tmp/tmp* then the test would fail. By using a tmpdir, we make sure that we know what files to expect. Signed-off-by: Michael Adam <obnox@samba.org>
* [plugins] add optional dir arg to create_file in plugin_testsMichael Adam2017-03-281-2/+2
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* [gnocchi] add_cmd_output block to be run only when ENVs setMartin Schuppert2017-03-281-14/+16
| | | | | | | | | | add_cmd_output now gets only called if the needed ENV variables are set to be able to connect to an OpenStack env. Resolves: #956. Signed-off-by: Martin Schuppert <mschuppe@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [reporting] workaround six mishandling of '\$' stringsBryn M. Reeves2017-03-281-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a problem with six's handling of strings that end with a backslash: https://bitbucket.org/gutworth/six/issues/60/sixu-mishandles-string-ending-in-backslash This leads to an ugly exception during reporting if any filename ends with this character: Traceback (most recent call last): File "/usr/sbin/sosreport", line 25, in <module> main(sys.argv[1:]) File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1632, in main sos.execute() File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1607, in execute self.plain_report() File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1358, in plain_report output = PlainTextReport(report).unicode() File "/usr/lib/python2.7/site-packages/sos/reporting.py", line 151, in unicode else six.u(i)), buf)) File "/usr/lib/python2.7/site-packages/sos/reporting.py", line 151, in <lambda> else six.u(i)), buf)) File "/usr/lib/python2.7/site-packages/six.py", line 647, in u return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 25: \ at end of string Avoid this problem by re-packing the buffer and adding a single ' ' character to the end of any string ending with '\'. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [collectd] add missing package listBryn M. Reeves2017-03-281-0/+2
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [makefiles] use rm -f when cleaning up *.pyc filesBryn M. Reeves2017-03-271-1/+1
| | | | | | | | | | | $ make rpm rm: remove write-protected regular file './sos/sosreport.pyc'? y rm: remove write-protected regular file './sos/policies/__pycache__/debian.cpython-35.pyc'? ^CMakefile:74: recipe for target 'clean' failed make: *** [clean] Interrupt Gets old very fast.. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [utilities] make sos_get_command_output() python3 compatibleBryn M. Reeves2017-03-271-1/+1
| | | | | | | | | The iteritems() member has been removed in python3. Since the environment loop in sos_get_command_output() is not expected to be run with very large inputs use .items() instead, which is compatible with both python2 and python3. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [jars] use bytestrings when operating on property filesBryn M. Reeves2017-03-271-2/+2
| | | | | | | For compatibility with python3, when using startswith() or split() with data read from a file, use bytes rather than a string. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>