diff --git a/.gitignore b/.gitignore index 23ce7a6..31fc852 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ sos-2.2.tar.gz /sos-3.0.tar.gz +/sos-3.1.tar.gz diff --git a/0001-Fix-cluster-module-crm_report-support.patch b/0001-Fix-cluster-module-crm_report-support.patch new file mode 100644 index 0000000..795b82c --- /dev/null +++ b/0001-Fix-cluster-module-crm_report-support.patch @@ -0,0 +1,81 @@ +From 4ab4b086c1011997246c40d4c97079c3c001031c Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Fri, 31 Jan 2014 15:08:28 +0000 +Subject: [PATCH 01/61] Fix cluster module crm_report support + +The cluster plugin used an obsolete sos-2.2 method to determine +the command output directory. This causes an excaption at runtime +since the referenced properties no longer exist. + +The crm_report script also expects a --from date and will not +collect data unless this is passed. Default to passing a value 72 +hours before the current time and add a 'crm_from' option to the +cluster module to allow the user to override this. + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/cluster.py | 27 +++++++++++++++++++-------- + 1 file changed, 19 insertions(+), 8 deletions(-) + +diff --git a/sos/plugins/cluster.py b/sos/plugins/cluster.py +index 50e0e0b..c2ce42b 100644 +--- a/sos/plugins/cluster.py ++++ b/sos/plugins/cluster.py +@@ -13,16 +13,17 @@ + ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + from sos.plugins import Plugin, RedHatPlugin +-import re ++import re, os + from glob import glob ++from datetime import datetime, timedelta + + class Cluster(Plugin, RedHatPlugin): + """cluster suite and GFS related information + """ + + plugin_name = 'cluster' +- option_list = [("gfslockdump", +- 'gather output of gfs lockdumps', 'slow', False), ++ option_list = [("gfslockdump", 'gather output of gfs lockdumps', 'slow', False), ++ ("crm_from", 'specify the --from parameter passed to crm_report', 'fast', False), + ('lockdump', 'gather dlm lockdumps', 'slow', False)] + + packages = [ +@@ -83,9 +84,21 @@ class Cluster(Plugin, RedHatPlugin): + self.add_cmd_output("dlm_tool dump") + self.add_cmd_output("dlm_tool ls -n") + self.add_cmd_output("mkqdisk -L") +- crm_dest = os.path.join(self.cInfo['cmddir'], +- self.name(), 'crm_report') +- self.collectExtOutput("crm_report -S --dest %s" % crm_dest) ++ # crm_report needs to be given a --from "YYYY-MM-DD HH:MM:SS" start ++ # time in order to collect data. ++ crm_from = (datetime.today() ++ - timedelta(hours=72)).strftime("%Y-%m-%d %H:%m:%S") ++ if self.get_option('crm_from') != False: ++ if re.match(r'\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}', ++ str(self.getOption('crm_from'))): ++ crm_from = self.getOption('crm_from') ++ else: ++ self.soslog.error("crm_from parameter '%s' is not a valid date" ++ % self.getOption('crm_from')) ++ ++ crm_dest = os.path.join(self.get_cmd_dir(), 'crm_report') ++ self.add_cmd_output('crm_report -S -d --dest %s --from "%s"' ++ % (crm_dest, crm_from)) + + def do_lockdump(self): + status, output, time = self.call_ext_prog("dlm_tool ls") +@@ -106,8 +119,6 @@ class Cluster(Plugin, RedHatPlugin): + self.do_file_sub(cluster_conf, + r"(\s*\ +Date: Fri, 31 Jan 2014 15:25:15 +0000 +Subject: [PATCH 02/61] Remove obsolete diagnostics code from ldap plugin + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/ldap.py | 12 ------------ + 1 file changed, 12 deletions(-) + +diff --git a/sos/plugins/ldap.py b/sos/plugins/ldap.py +index 361de73..f1032a9 100644 +--- a/sos/plugins/ldap.py ++++ b/sos/plugins/ldap.py +@@ -22,18 +22,6 @@ class Ldap(Plugin): + plugin_name = "ldap" + ldap_conf = "/etc/openldap/ldap.conf" + +- def get_ldap_opts(self): +- # capture /etc/openldap/ldap.conf options in dict +- # FIXME: possibly not hardcode these options in? +- ldapopts=["URI","BASE","TLS_CACERTDIR"] +- results={} +- tmplist=[] +- for i in ldapopts: +- t=self.do_regex_find_all(r"^(%s)\s+(.*)" % i,self.ldap_conf) +- for x in t: +- results[x[0]]=x[1].rstrip("\n") +- return results +- + def setup(self): + super(Ldap, self).setup() + self.add_copy_spec("/etc/ldap.conf") +-- +1.7.11.7 + diff --git a/0003-Ensure-superclass-postproc-method-is-called-in-ldap-.patch b/0003-Ensure-superclass-postproc-method-is-called-in-ldap-.patch new file mode 100644 index 0000000..81e116b --- /dev/null +++ b/0003-Ensure-superclass-postproc-method-is-called-in-ldap-.patch @@ -0,0 +1,39 @@ +From 3c52bbd14c881748998c0edfb328c8c0ca92842f Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Fri, 31 Jan 2014 15:43:44 +0000 +Subject: [PATCH 03/61] Ensure superclass postproc method is called in ldap + plugin + +Since the ldap plugins add files and post-processing methods at +multiple class levels (Ldap, RedHatLdap etc.) derived classes +must explicitly call their parent class's postproc() method to +apply all substitutions to collected data. + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/ldap.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/sos/plugins/ldap.py b/sos/plugins/ldap.py +index f1032a9..79d8394 100644 +--- a/sos/plugins/ldap.py ++++ b/sos/plugins/ldap.py +@@ -45,6 +45,7 @@ class RedHatLdap(Ldap, RedHatPlugin): + ]) + + def postproc(self): ++ super(RedHatLdap, self).postproc() + self.do_file_sub("/etc/nslcd.conf", + r"(\s*bindpw\s*)\S+", r"\1********") + self.do_file_sub("/etc/pam_ldap.conf", +@@ -77,6 +78,7 @@ class DebianLdap(Ldap, DebianPlugin, UbuntuPlugin): + suggest_filename="access_control_lists") + + def postproc(self): ++ super(RedHatLdap, self).postproc() + self.do_cmd_output_sub( + "ldapsearch -Q -LLL -Y EXTERNAL -H ldapi:/// -b cn=config '(!(objectClass=olcSchemaConfig))'", + r"(olcRootPW\: \s*)\S+", r"\1********") +-- +1.7.11.7 + diff --git a/0004-Fix-cluster-postproc-regression.patch b/0004-Fix-cluster-postproc-regression.patch new file mode 100644 index 0000000..33fca95 --- /dev/null +++ b/0004-Fix-cluster-postproc-regression.patch @@ -0,0 +1,29 @@ +From 43268795e09c91ef7cc8dbef3cb1ddfc5c2bf686 Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Fri, 31 Jan 2014 16:03:31 +0000 +Subject: [PATCH 04/61] Fix cluster postproc regression + +Commit 4ab4b08 inadvertently removed the postprocessing rules for +luci configuration. Revert that part of the commit. + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/cluster.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/sos/plugins/cluster.py b/sos/plugins/cluster.py +index c2ce42b..0fc4ded 100644 +--- a/sos/plugins/cluster.py ++++ b/sos/plugins/cluster.py +@@ -119,6 +119,8 @@ class Cluster(Plugin, RedHatPlugin): + self.do_file_sub(cluster_conf, + r"(\s*\ +Date: Mon, 3 Feb 2014 11:48:46 +0000 +Subject: [PATCH 05/61] Fix get_option() use in cluster plugin + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/cluster.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/sos/plugins/cluster.py b/sos/plugins/cluster.py +index 0fc4ded..eeacdab 100644 +--- a/sos/plugins/cluster.py ++++ b/sos/plugins/cluster.py +@@ -90,11 +90,11 @@ class Cluster(Plugin, RedHatPlugin): + - timedelta(hours=72)).strftime("%Y-%m-%d %H:%m:%S") + if self.get_option('crm_from') != False: + if re.match(r'\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}', +- str(self.getOption('crm_from'))): +- crm_from = self.getOption('crm_from') ++ str(self.get_option('crm_from'))): ++ crm_from = self.get_option('crm_from') + else: + self.soslog.error("crm_from parameter '%s' is not a valid date" +- % self.getOption('crm_from')) ++ % self.get_option('crm_from')) + + crm_dest = os.path.join(self.get_cmd_dir(), 'crm_report') + self.add_cmd_output('crm_report -S -d --dest %s --from "%s"' +-- +1.7.11.7 + diff --git a/0006-Fix-verbose-file-logging.patch b/0006-Fix-verbose-file-logging.patch new file mode 100644 index 0000000..01d2122 --- /dev/null +++ b/0006-Fix-verbose-file-logging.patch @@ -0,0 +1,44 @@ +From 0338a955a930286beaa7b66c5167be9b15d34d78 Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Mon, 3 Feb 2014 12:09:57 +0000 +Subject: [PATCH 06/61] Fix verbose file logging + +Prior versions of sos enable debug logging to the embedded log +file (sos_logs/sos.log) when a single '-v' is given. Restore this +behaviour and ensure that command-not-found messages are reported +at 'info' rather than 'warning' level. + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/__init__.py | 2 +- + sos/sosreport.py | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py +index 7c63631..8df430d 100644 +--- a/sos/plugins/__init__.py ++++ b/sos/plugins/__init__.py +@@ -488,7 +488,7 @@ class Plugin(object): + self.soslog.warning("command '%s' timed out after %ds" + % (prog, timeout)) + if status == 127: +- self.soslog.warning("could not run '%s': command not found" % prog) ++ self.soslog.info("could not run '%s': command not found" % prog) + return (status, output, runtime) + + def call_ext_prog(self, prog, timeout=300): +diff --git a/sos/sosreport.py b/sos/sosreport.py +index 4b52572..0faa364 100644 +--- a/sos/sosreport.py ++++ b/sos/sosreport.py +@@ -659,6 +659,7 @@ class SoSReport(object): + flog.setLevel(logging.DEBUG) + elif self.opts.verbosity and self.opts.verbosity > 0: + console.setLevel(logging.INFO) ++ flog.setLevel(logging.DEBUG) + else: + console.setLevel(logging.WARNING) + self.soslog.addHandler(console) +-- +1.7.11.7 + diff --git a/0007-Always-treat-rhevm-vdsmlogs-option-as-string.patch b/0007-Always-treat-rhevm-vdsmlogs-option-as-string.patch new file mode 100644 index 0000000..695046c --- /dev/null +++ b/0007-Always-treat-rhevm-vdsmlogs-option-as-string.patch @@ -0,0 +1,33 @@ +From 03662edf4405ab66c0284a76bf68662c1657d5ab Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Mon, 3 Feb 2014 12:26:45 +0000 +Subject: [PATCH 07/61] Always treat rhevm vdsmlogs option as string + +The rhevm plugin has a 'vdsmlogs' option to pass in a set of log +files to be collected. When run with '-a' (or with +'-krhevm.vdsmlogs) this evaluates to 'True' (a bool) and causes +an exception when this is passed to add_copy_specs(). + +Always treat the value as a string. + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/rhevm.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sos/plugins/rhevm.py b/sos/plugins/rhevm.py +index 39b32f4..8068e05 100644 +--- a/sos/plugins/rhevm.py ++++ b/sos/plugins/rhevm.py +@@ -13,7 +13,7 @@ class RhevM(Plugin, RedHatPlugin): + self.add_copy_spec("/etc/rhevm") + self.add_copy_spec("/var/log/rhevm") + if self.get_option("vdsmlogs"): +- self.add_copy_spec(self.get_option("vdsmlogs")) ++ self.add_copy_spec(str(self.get_option("vdsmlogs"))) + + def postproc(self): + """ +-- +1.7.11.7 + diff --git a/0008-Add-rhsm-debug-collection-to-yum-plugin.patch b/0008-Add-rhsm-debug-collection-to-yum-plugin.patch new file mode 100644 index 0000000..ea2535a --- /dev/null +++ b/0008-Add-rhsm-debug-collection-to-yum-plugin.patch @@ -0,0 +1,26 @@ +From 3b727c296b86172a64dae83cb02a42fe4c5c6af9 Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Mon, 3 Feb 2014 13:03:04 +0000 +Subject: [PATCH 08/61] Add rhsm-debug collection to yum plugin + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/yum.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/sos/plugins/yum.py b/sos/plugins/yum.py +index 867302c..a9ae4e4 100644 +--- a/sos/plugins/yum.py ++++ b/sos/plugins/yum.py +@@ -48,6 +48,8 @@ class Yum(Plugin, RedHatPlugin): + "/var/log/rhsm/rhsmcertd.log"]) + self.add_cmd_output("subscription-manager list --installed") + self.add_cmd_output("subscription-manager list --consumed") ++ self.add_cmd_output("rhsm-debug system --destination %s" ++ % self.get_cmd_dir()) + + if self.get_option("yumlist"): + # List various information about available packages +-- +1.7.11.7 + diff --git a/0009-Make-get_cmd_output_now-behaviour-match-2.2.patch b/0009-Make-get_cmd_output_now-behaviour-match-2.2.patch new file mode 100644 index 0000000..52065e9 --- /dev/null +++ b/0009-Make-get_cmd_output_now-behaviour-match-2.2.patch @@ -0,0 +1,35 @@ +From a9bf294a6898bb1defb396c0c0bca29234855db6 Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Mon, 3 Feb 2014 14:36:46 +0000 +Subject: [PATCH 09/61] Make get_cmd_output_now() behaviour match 2.2 + +The equivalent method in sos-2.2, collectOutputNow() returned an +absolute path to the collected file. Since the archive changes in +3.0 this now returns a path relative to the root of the archive. + +This breaks existing users of the interface that try to open and +process the content of the collected file (e.g. gluster). + +Return a join of the archive path and file path to the caller. + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/__init__.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py +index 8df430d..7130c7a 100644 +--- a/sos/plugins/__init__.py ++++ b/sos/plugins/__init__.py +@@ -593,7 +593,7 @@ class Plugin(object): + time_passed = time() - start_time + self.proflog.debug("output: %-75s time: %f" % (exe, time_passed)) + +- return outfn ++ return os.path.join(self.archive.get_archive_path(), outfn) + + # For adding output + def add_alert(self, alertstring): +-- +1.7.11.7 + diff --git a/0010-Include-geo-replication-status-in-gluster-plugin.patch b/0010-Include-geo-replication-status-in-gluster-plugin.patch new file mode 100644 index 0000000..0baf562 --- /dev/null +++ b/0010-Include-geo-replication-status-in-gluster-plugin.patch @@ -0,0 +1,34 @@ +From 722f87787eaf8b50d16a3964892b16880c8bdbbb Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Mon, 3 Feb 2014 15:17:55 +0000 +Subject: [PATCH 10/61] Include geo-replication status in gluster plugin + +Add the output of 'gluster volume geo-replication status' for +each discovered gluster volume to the report. + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/gluster.py | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/sos/plugins/gluster.py b/sos/plugins/gluster.py +index 7c54fa0..02dbac3 100644 +--- a/sos/plugins/gluster.py ++++ b/sos/plugins/gluster.py +@@ -102,6 +102,13 @@ class Gluster(Plugin, RedHatPlugin): + self.add_copy_spec('/tmp/glusterdump.options') + self.add_copy_spec(self.statedump_dir) + ++ volume_file = self.get_cmd_output_now("gluster volume info", ++ "gluster_volume_info") ++ if volume_file: ++ for volname in self.get_volume_names(volume_file): ++ self.add_cmd_output("gluster volume geo-replication %s status" ++ % volname) ++ + self.add_cmd_output("gluster volume status") + # collect this last as some of the other actions create log entries + self.add_copy_spec("/var/log/glusterfs") +-- +1.7.11.7 + diff --git a/0011-postgresql-minor-fixes.patch b/0011-postgresql-minor-fixes.patch new file mode 100644 index 0000000..592b80e --- /dev/null +++ b/0011-postgresql-minor-fixes.patch @@ -0,0 +1,132 @@ +From ec82bf842d2c8537bf020909cfd406ec0ec3f023 Mon Sep 17 00:00:00 2001 +From: Sandro Bonazzola +Date: Tue, 4 Feb 2014 15:15:10 +0000 +Subject: [PATCH 11/61] postgresql: minor fixes + +- pep8 / style fixes +- Avoid redefining built-in 'file' + +Signed-off-by: Sandro Bonazzola +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/postgresql.py | 60 ++++++++++++++++++++++++++++++----------------- + 1 file changed, 39 insertions(+), 21 deletions(-) + +diff --git a/sos/plugins/postgresql.py b/sos/plugins/postgresql.py +index 0a8e5ac..478faff 100644 +--- a/sos/plugins/postgresql.py ++++ b/sos/plugins/postgresql.py +@@ -4,6 +4,7 @@ import tempfile + from sos.plugins import Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin + from sos.utilities import find + ++ + class PostgreSQL(Plugin): + """PostgreSQL related information""" + +@@ -14,26 +15,31 @@ class PostgreSQL(Plugin): + tmp_dir = None + + option_list = [ +- ("pghome", 'PostgreSQL server home directory.', '', '/var/lib/pgsql'), +- ("username", 'username for pg_dump', '', 'postgres'), +- ("password", 'password for pg_dump', '', ''), +- ("dbname", 'database name to dump for pg_dump', '', ''), ++ ('pghome', 'PostgreSQL server home directory.', '', '/var/lib/pgsql'), ++ ('username', 'username for pg_dump', '', 'postgres'), ++ ('password', 'password for pg_dump', '', ''), ++ ('dbname', 'database name to dump for pg_dump', '', ''), + ] + + def pg_dump(self): + dest_file = os.path.join(self.tmp_dir, "sos_pgdump.tar") + old_env_pgpassword = os.environ.get("PGPASSWORD") + os.environ["PGPASSWORD"] = self.get_option("password") +- (status, output, rtime) = self.call_ext_prog("pg_dump %s -U %s -w -f %s -F t" % +- (self.get_option("dbname"), +- self.get_option("username"), +- dest_file)) ++ (status, output, rtime) = self.call_ext_prog( ++ "pg_dump %s -U %s -w -f %s -F t" % ( ++ self.get_option("dbname"), ++ self.get_option("username"), ++ dest_file ++ ) ++ ) + if old_env_pgpassword is not None: + os.environ["PGPASSWORD"] = old_env_pgpassword + if (status == 0): + self.add_copy_spec(dest_file) + else: +- self.add_alert("ERROR: Unable to execute pg_dump. Error(%s)" % (output)) ++ self.add_alert( ++ "ERROR: Unable to execute pg_dump. Error(%s)" % (output) ++ ) + + def setup(self): + if self.get_option("dbname"): +@@ -41,13 +47,16 @@ class PostgreSQL(Plugin): + self.tmp_dir = tempfile.mkdtemp() + self.pg_dump() + else: +- self.add_alert("WARN: password must be supplied to dump a database.") ++ self.add_alert( ++ "WARN: password must be supplied to dump a database." ++ ) + + def postproc(self): + import shutil + if self.tmp_dir: + shutil.rmtree(self.tmp_dir) + ++ + class RedHatPostgreSQL(PostgreSQL, RedHatPlugin): + """PostgreSQL related information for Red Hat distributions""" + +@@ -55,14 +64,27 @@ class RedHatPostgreSQL(PostgreSQL, RedHatPlugin): + super(RedHatPostgreSQL, self).setup() + + # Copy PostgreSQL log files. +- for file in find("*.log", self.get_option("pghome")): +- self.add_copy_spec(file) ++ for filename in find("*.log", self.get_option("pghome")): ++ self.add_copy_spec(filename) + # Copy PostgreSQL config files. +- for file in find("*.conf", self.get_option("pghome")): +- self.add_copy_spec(file) ++ for filename in find("*.conf", self.get_option("pghome")): ++ self.add_copy_spec(filename) ++ ++ self.add_copy_spec( ++ os.path.join( ++ self.get_option("pghome"), ++ "data", ++ "PG_VERSION" ++ ) ++ ) ++ self.add_copy_spec( ++ os.path.join( ++ self.get_option("pghome"), ++ "data", ++ "postmaster.opts" ++ ) ++ ) + +- self.add_copy_spec(os.path.join(self.get_option("pghome"), "data" , "PG_VERSION")) +- self.add_copy_spec(os.path.join(self.get_option("pghome"), "data" , "postmaster.opts")) + + class DebianPostgreSQL(PostgreSQL, DebianPlugin, UbuntuPlugin): + """PostgreSQL related information for Debian/Ubuntu distributions""" +@@ -78,8 +100,4 @@ class DebianPostgreSQL(PostgreSQL, DebianPlugin, UbuntuPlugin): + self.add_copy_spec("/var/lib/postgresql/*/main/PG_VERSION") + self.add_copy_spec("/var/lib/postgresql/*/main/postmaster.opts") + +- +- +- +- +- ++# vim: expandtab tabstop=4 shiftwidth=4 +-- +1.7.11.7 + diff --git a/0012-postgresql-add-logs-about-errors-warnings.patch b/0012-postgresql-add-logs-about-errors-warnings.patch new file mode 100644 index 0000000..31ce0b9 --- /dev/null +++ b/0012-postgresql-add-logs-about-errors-warnings.patch @@ -0,0 +1,68 @@ +From 7c53bbe37e1841777a95331ccaf6a43f39e23f86 Mon Sep 17 00:00:00 2001 +From: Sandro Bonazzola +Date: Tue, 4 Feb 2014 15:15:51 +0000 +Subject: [PATCH 12/61] postgresql: add logs about errors / warnings + +give more info to support about what happened while +collecting the report. + +Signed-off-by: Sandro Bonazzola +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/postgresql.py | 23 +++++++++++++++++++++-- + 1 file changed, 21 insertions(+), 2 deletions(-) + +diff --git a/sos/plugins/postgresql.py b/sos/plugins/postgresql.py +index 478faff..0aa67a1 100644 +--- a/sos/plugins/postgresql.py ++++ b/sos/plugins/postgresql.py +@@ -33,10 +33,13 @@ class PostgreSQL(Plugin): + ) + ) + if old_env_pgpassword is not None: +- os.environ["PGPASSWORD"] = old_env_pgpassword ++ os.environ["PGPASSWORD"] = str(old_env_pgpassword) + if (status == 0): + self.add_copy_spec(dest_file) + else: ++ self.soslog.error( ++ "Unable to execute pg_dump. Error(%s)" % (output) ++ ) + self.add_alert( + "ERROR: Unable to execute pg_dump. Error(%s)" % (output) + ) +@@ -47,14 +50,30 @@ class PostgreSQL(Plugin): + self.tmp_dir = tempfile.mkdtemp() + self.pg_dump() + else: ++ self.soslog.warning( ++ "password must be supplied to dump a database." ++ ) + self.add_alert( + "WARN: password must be supplied to dump a database." + ) ++ else: ++ self.soslog.warning( ++ "dbname must be supplied to dump a database." ++ ) ++ self.add_alert( ++ "WARN: dbname must be supplied to dump a database." ++ ) + + def postproc(self): + import shutil + if self.tmp_dir: +- shutil.rmtree(self.tmp_dir) ++ try: ++ shutil.rmtree(self.tmp_dir) ++ except shutil.Error: ++ self.soslog.exception( ++ "Unable to remove %s." % (self.tmp_dir) ++ ) ++ self.add_alert("ERROR: Unable to remove %s." % (self.tmp_dir)) + + + class RedHatPostgreSQL(PostgreSQL, RedHatPlugin): +-- +1.7.11.7 + diff --git a/0013-postgresql-added-license-and-copyright.patch b/0013-postgresql-added-license-and-copyright.patch new file mode 100644 index 0000000..7e2a475 --- /dev/null +++ b/0013-postgresql-added-license-and-copyright.patch @@ -0,0 +1,41 @@ +From b2cc567aa3c6671de9992375032dedeec9d2d4bd Mon Sep 17 00:00:00 2001 +From: Sandro Bonazzola +Date: Tue, 4 Feb 2014 15:18:24 +0000 +Subject: [PATCH 13/61] postgresql: added license and copyright + +Signed-off-by: Sandro Bonazzola +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/postgresql.py | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +diff --git a/sos/plugins/postgresql.py b/sos/plugins/postgresql.py +index 0aa67a1..df14f86 100644 +--- a/sos/plugins/postgresql.py ++++ b/sos/plugins/postgresql.py +@@ -1,3 +1,22 @@ ++## Copyright (C) 2014 Red Hat, Inc., Sandro Bonazzola ++## Copyright (C) 2013 Chris J Arges ++## Copyright (C) 2012-2013 Red Hat, Inc., Bryn M. Reeves ++## Copyright (C) 2011 Red Hat, Inc., Jesse Jaggars ++ ++### This program is free software; you can redistribute it and/or modify ++## it under the terms of the GNU General Public License as published by ++## the Free Software Foundation; either version 2 of the License, or ++## (at your option) any later version. ++ ++## This program is distributed in the hope that it will be useful, ++## but WITHOUT ANY WARRANTY; without even the implied warranty of ++## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++## GNU General Public License for more details. ++ ++## You should have received a copy of the GNU General Public License ++## along with this program; if not, write to the Free Software ++## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ + import os + import tempfile + +-- +1.7.11.7 + diff --git a/0014-postgresql-allow-use-TCP-socket.patch b/0014-postgresql-allow-use-TCP-socket.patch new file mode 100644 index 0000000..ae36e48 --- /dev/null +++ b/0014-postgresql-allow-use-TCP-socket.patch @@ -0,0 +1,56 @@ +From cfef4d7ee758bffe6242c0d342261300a0e8194c Mon Sep 17 00:00:00 2001 +From: Sandro Bonazzola +Date: Tue, 4 Feb 2014 15:19:19 +0000 +Subject: [PATCH 14/61] postgresql: allow use TCP socket + +allow to use TCP socket and not only UNIX socket +for connecting to postgresql database + +Signed-off-by: Sandro Bonazzola +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/postgresql.py | 20 +++++++++++++++----- + 1 file changed, 15 insertions(+), 5 deletions(-) + +diff --git a/sos/plugins/postgresql.py b/sos/plugins/postgresql.py +index df14f86..cc51195 100644 +--- a/sos/plugins/postgresql.py ++++ b/sos/plugins/postgresql.py +@@ -38,19 +38,29 @@ class PostgreSQL(Plugin): + ('username', 'username for pg_dump', '', 'postgres'), + ('password', 'password for pg_dump', '', ''), + ('dbname', 'database name to dump for pg_dump', '', ''), ++ ('dbhost', 'database hostname/IP (do not use unix socket)', '', ''), ++ ('dbport', 'database server port number', '', '5432') + ] + + def pg_dump(self): + dest_file = os.path.join(self.tmp_dir, "sos_pgdump.tar") + old_env_pgpassword = os.environ.get("PGPASSWORD") + os.environ["PGPASSWORD"] = self.get_option("password") +- (status, output, rtime) = self.call_ext_prog( +- "pg_dump %s -U %s -w -f %s -F t" % ( +- self.get_option("dbname"), ++ if self.get_option("dbhost"): ++ cmd = "pg_dump -U %s -h %s -p %s -w -f %s -F t %s" % ( + self.get_option("username"), +- dest_file ++ self.get_option("dbhost"), ++ self.get_option("dbport"), ++ dest_file, ++ self.get_option("dbname") + ) +- ) ++ else: ++ cmd = "pg_dump -C -U %s -w -f %s -F t %s " % ( ++ self.get_option("username"), ++ dest_file, ++ self.get_option("dbname") ++ ) ++ (status, output, rtime) = self.call_ext_prog(cmd) + if old_env_pgpassword is not None: + os.environ["PGPASSWORD"] = str(old_env_pgpassword) + if (status == 0): +-- +1.7.11.7 + diff --git a/0015-Pass-no-archive-to-rhsm-debug-script.patch b/0015-Pass-no-archive-to-rhsm-debug-script.patch new file mode 100644 index 0000000..9af36c7 --- /dev/null +++ b/0015-Pass-no-archive-to-rhsm-debug-script.patch @@ -0,0 +1,31 @@ +From f57c793a07e86c1659b2f5c6b49b93f5007c139c Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Tue, 4 Feb 2014 15:43:56 +0000 +Subject: [PATCH 15/61] Pass --no-archive to rhsm-debug script + +Versions of subscription-manager since 1.10.11-2.el7 support the +--no-archive option to disable creation of a zip archive. Pass +this to the script to have the output stored in a directory in +the archive. + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/yum.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sos/plugins/yum.py b/sos/plugins/yum.py +index a9ae4e4..81788f1 100644 +--- a/sos/plugins/yum.py ++++ b/sos/plugins/yum.py +@@ -48,7 +48,7 @@ class Yum(Plugin, RedHatPlugin): + "/var/log/rhsm/rhsmcertd.log"]) + self.add_cmd_output("subscription-manager list --installed") + self.add_cmd_output("subscription-manager list --consumed") +- self.add_cmd_output("rhsm-debug system --destination %s" ++ self.add_cmd_output("rhsm-debug system --no-archive --destination %s" + % self.get_cmd_dir()) + + if self.get_option("yumlist"): +-- +1.7.11.7 + diff --git a/0016-Ensure-unused-fds-are-closed-when-calling-subprocess.patch b/0016-Ensure-unused-fds-are-closed-when-calling-subprocess.patch new file mode 100644 index 0000000..51ba6ef --- /dev/null +++ b/0016-Ensure-unused-fds-are-closed-when-calling-subprocess.patch @@ -0,0 +1,81 @@ +From a96a5e8397b465f556c5a10274a4c7248e737fbf Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Tue, 4 Feb 2014 11:37:15 +0000 +Subject: [PATCH 16/61] Ensure unused fds are closed when calling subprocesses + via Popen + +When sos communicates with a child process using Popen all IO +takes place on stdin/stdout/stderr (or a subset). No other open +file descriptors should be inherited by the child. + +Make all calls to Popen set close_fds=True. + +Signed-off-by: Bryn M. Reeves +--- + sos/archive.py | 6 +++++- + sos/plugins/emc.py | 3 ++- + sos/policies/redhat.py | 3 ++- + sos/utilities.py | 2 +- + 4 files changed, 10 insertions(+), 4 deletions(-) + +diff --git a/sos/archive.py b/sos/archive.py +index f1d4d1f..9e6029b 100644 +--- a/sos/archive.py ++++ b/sos/archive.py +@@ -252,7 +252,11 @@ class TarFileArchive(FileCacheArchive): + cmd = "%s -1" % cmd + try: + command = shlex.split("%s %s" % (cmd, self.name())) +- p = Popen(command, stdout=PIPE, stderr=PIPE, bufsize=-1) ++ p = Popen(command, ++ stdout=PIPE, ++ stderr=PIPE, ++ bufsize=-1, ++ close_fds=True) + stdout, stderr = p.communicate() + if stdout: + log.info(stdout.decode('utf-8')) +diff --git a/sos/plugins/emc.py b/sos/plugins/emc.py +index 6eac7d0..5a2495e 100644 +--- a/sos/plugins/emc.py ++++ b/sos/plugins/emc.py +@@ -196,7 +196,8 @@ class Emc(Plugin, RedHatPlugin): + while CLARiiON_IP_loop == "stay_in": + ans = raw_input("CLARiiON SP IP Address or [Enter] to exit: ") + ## Check to make sure the CLARiiON SP IP address provided is valid +- p = Popen("navicli -h %s getsptime" % (ans,), shell=True, stdout=PIPE, stderr=PIPE) ++ p = Popen("navicli -h %s getsptime" % (ans,), ++ shell=True, stdout=PIPE, stderr=PIPE, close_fds=True) + out, err = p.communicate() + if p.returncode == 0: + CLARiiON_IP_address_list.append(ans) +diff --git a/sos/policies/redhat.py b/sos/policies/redhat.py +index 5b3a446..4e5b363 100644 +--- a/sos/policies/redhat.py ++++ b/sos/policies/redhat.py +@@ -68,7 +68,8 @@ class RedHatPolicy(LinuxPolicy): + shell=True, + stdout=PIPE, + stderr=PIPE, +- bufsize=-1) ++ bufsize=-1, ++ close_fds=True) + out, err = p.communicate() + if err: + return ret +diff --git a/sos/utilities.py b/sos/utilities.py +index 7a8674a..a9aca74 100644 +--- a/sos/utilities.py ++++ b/sos/utilities.py +@@ -159,7 +159,7 @@ def sos_get_command_output(command, timeout=300): + + p = Popen(command, shell=True, + stdout=PIPE, stderr=STDOUT, +- bufsize=-1, env = cmd_env) ++ bufsize=-1, env = cmd_env, close_fds = True) + stdout, stderr = p.communicate() + return (p.returncode, stdout.decode('utf-8'), 0) + else: +-- +1.7.11.7 + diff --git a/0017-Fix-gluster-volume-name-extraction.patch b/0017-Fix-gluster-volume-name-extraction.patch new file mode 100644 index 0000000..03ffb97 --- /dev/null +++ b/0017-Fix-gluster-volume-name-extraction.patch @@ -0,0 +1,31 @@ +From aa0a14db011c59116beb51413ee9a0b253e04f1a Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Mon, 10 Feb 2014 15:07:36 +0000 +Subject: [PATCH 17/61] Fix gluster volume name extraction + +The get_volume_names() function in the gluster plugin tries to +extract volume names from the output of the "gluster volume info" +command using a slice range. The range start should be 12 to +account for the "Volume Name:" label at the start of the line. + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/gluster.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sos/plugins/gluster.py b/sos/plugins/gluster.py +index 02dbac3..4286b59 100644 +--- a/sos/plugins/gluster.py ++++ b/sos/plugins/gluster.py +@@ -39,7 +39,7 @@ class Gluster(Plugin, RedHatPlugin): + for line in fp.readlines(): + if not line.startswith("Volume Name:"): + continue +- volname = line[14:-1] ++ volname = line[12:-1] + out.append(volname) + fp.close() + return out +-- +1.7.11.7 + diff --git a/0018-Add-distupgrade-plugin.patch b/0018-Add-distupgrade-plugin.patch new file mode 100644 index 0000000..e731d0f --- /dev/null +++ b/0018-Add-distupgrade-plugin.patch @@ -0,0 +1,65 @@ +From 7f6d34d154b9fe110c168a5b44083d8e35bb2068 Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Mon, 10 Feb 2014 15:27:24 +0000 +Subject: [PATCH 18/61] Add distupgrade plugin + +Add a new plugin to collect data relating to completed or +attempted distribution upgrades. Currently supports the Red Hat +set of tools and files but other distributions can supply their +own filelists or override setup() to perform other distribution +specific actions. + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/distupgrade.py | 39 +++++++++++++++++++++++++++++++++++++++ + 1 file changed, 39 insertions(+) + create mode 100644 sos/plugins/distupgrade.py + +diff --git a/sos/plugins/distupgrade.py b/sos/plugins/distupgrade.py +new file mode 100644 +index 0000000..b45d099 +--- /dev/null ++++ b/sos/plugins/distupgrade.py +@@ -0,0 +1,39 @@ ++## Copyright (C) 2014 Red Hat, Inc., Bryn M. Reeves ++ ++### This program is free software; you can redistribute it and/or modify ++## it under the terms of the GNU General Public License as published by ++## the Free Software Foundation; either version 2 of the License, or ++## (at your option) any later version. ++ ++## This program is distributed in the hope that it will be useful, ++## but WITHOUT ANY WARRANTY; without even the implied warranty of ++## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++## GNU General Public License for more details. ++ ++## You should have received a copy of the GNU General Public License ++## along with this program; if not, write to the Free Software ++## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ ++import os ++from sos.plugins import Plugin, RedHatPlugin ++ ++class DistUpgrade(Plugin): ++ """ Distribution upgrade data """ ++ ++ plugin_name = "distupgrade" ++ ++ files = None ++ ++ def setup(self): ++ self.add_copy_specs(list(self.files)) ++ ++class RedHatDistUpgrade(DistUpgrade, RedHatPlugin): ++ ++ files = ( ++ "/var/log/upgrade.log", ++ "/var/log/redhat_update_tool.log", ++ "/root/preupgrade/all-xccdf*", ++ "/root/preupgrade/kickstart" ++ ) ++ ++ +-- +1.7.11.7 + diff --git a/0019-Fix-command-output-substitution-exception.patch b/0019-Fix-command-output-substitution-exception.patch new file mode 100644 index 0000000..42ff946 --- /dev/null +++ b/0019-Fix-command-output-substitution-exception.patch @@ -0,0 +1,49 @@ +From c48b762c2e98ee05a17375af7427af702f9c9925 Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Tue, 11 Feb 2014 16:53:16 +0000 +Subject: [PATCH 19/61] Fix command output substitution exception + +If a comand has a substitution registered via do_cmd_output_sub() +but no data was collected (e.g. command not found) the postproc +code will throw an exception as the return value ('replacements') +is never assigned. + +Initialise replacements to None before scanning the list of run +commands and return this if no substitutions were made. + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/__init__.py | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py +index 7130c7a..9b643ab 100644 +--- a/sos/plugins/__init__.py ++++ b/sos/plugins/__init__.py +@@ -181,6 +181,7 @@ class Plugin(object): + if not self.executed_commands: + return 0 + ++ replacements = None + try: + for called in self.executed_commands: + # was anything collected? +@@ -194,12 +195,12 @@ class Plugin(object): + regexp, subst, readable.read()) + if replacements: + self.archive.add_string(result, path) +- else: +- replacements = 0 ++ + except Exception as e: + msg = 'regex substitution failed for %s in plugin %s with: "%s"' + self.soslog.error(msg % (called['exe'], self.name(), e)) +- replacements = 0 ++ replacements = None ++ + if self.commons['cmdlineopts'].profiler: + time_passed = time() - start_time + self.proflog.debug("subst: %-75s time: %f" +-- +1.7.11.7 + diff --git a/0020-Improve-error-message-when-cluster.crm_from-is-inval.patch b/0020-Improve-error-message-when-cluster.crm_from-is-inval.patch new file mode 100644 index 0000000..66474ff --- /dev/null +++ b/0020-Improve-error-message-when-cluster.crm_from-is-inval.patch @@ -0,0 +1,38 @@ +From 61e8147e436533c5ccb75a6061a4fcc7368970b6 Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Tue, 11 Feb 2014 16:56:37 +0000 +Subject: [PATCH 20/61] Improve error message when cluster.crm_from is invalid + +If a user passes a non-date string value as the crm_from parameter +of the cluster plugin an error message is logged: + + crm_from parameter 'True' is not a valid date + +The plugin continues to run and uses the default value (T-72hrs) +as the value of crm_from. Make this clear in the message displayed +to users: + + crm_from parameter 'True' is not a valid date: using default + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/cluster.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/sos/plugins/cluster.py b/sos/plugins/cluster.py +index eeacdab..8d73dc1 100644 +--- a/sos/plugins/cluster.py ++++ b/sos/plugins/cluster.py +@@ -93,7 +93,8 @@ class Cluster(Plugin, RedHatPlugin): + str(self.get_option('crm_from'))): + crm_from = self.get_option('crm_from') + else: +- self.soslog.error("crm_from parameter '%s' is not a valid date" ++ self.soslog.error( ++ "crm_from parameter '%s' is not a valid date: using default" + % self.get_option('crm_from')) + + crm_dest = os.path.join(self.get_cmd_dir(), 'crm_report') +-- +1.7.11.7 + diff --git a/0021-Remove-useless-check_enabled-from-sar-plugin.patch b/0021-Remove-useless-check_enabled-from-sar-plugin.patch new file mode 100644 index 0000000..8d9749a --- /dev/null +++ b/0021-Remove-useless-check_enabled-from-sar-plugin.patch @@ -0,0 +1,38 @@ +From 2591ac0719c256af3ed3b392f5bc5972ed3a1104 Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Fri, 14 Feb 2014 16:54:15 +0000 +Subject: [PATCH 21/61] Remove useless check_enabled() from sar plugin + +The sar plugin implemented a check_enabled() to catch cases where +the plugin is force-enabled on a system with no sar installation. + +This is better handled by runtime checking in setup() which the +plugin also does. Kill the check and its annoying error message. + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/sar.py | 8 -------- + 1 file changed, 8 deletions(-) + +diff --git a/sos/plugins/sar.py b/sos/plugins/sar.py +index 1086208..cf53d5b 100644 +--- a/sos/plugins/sar.py ++++ b/sos/plugins/sar.py +@@ -28,14 +28,6 @@ class Sar(Plugin,): + # size-limit SAR data collected by default (MB) + sa_size = 20 + +- def check_enabled(self): +- # check to see if we are force-enabled with no sar installation +- if not os.path.exists(self.sa_path) or not os.path.isdir(self.sa_path): +- self.soslog.info("sar directory %s does not exist" % self.sa_path +- + " or is not a directory") +- return False +- return True +- + def setup(self): + if self.get_option("all_sar"): + self.sa_size = 0 +-- +1.7.11.7 + diff --git a/0022-Eliminate-hard-coded-var-log-sa-paths-in-sar-plugin.patch b/0022-Eliminate-hard-coded-var-log-sa-paths-in-sar-plugin.patch new file mode 100644 index 0000000..816db87 --- /dev/null +++ b/0022-Eliminate-hard-coded-var-log-sa-paths-in-sar-plugin.patch @@ -0,0 +1,40 @@ +From 80e251f4c30d9f8263c472e07d18a4b0b21ebf4e Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Fri, 14 Feb 2014 17:20:25 +0000 +Subject: [PATCH 22/61] Eliminate hard-coded /var/log/sa paths in sar plugin + +The Sar plugin classes define a self.sa_path - use it consistently +throughout the plugin when generating strings containing the path. + +Suggested by David Kutalek. + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/sar.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/sos/plugins/sar.py b/sos/plugins/sar.py +index cf53d5b..470d82f 100644 +--- a/sos/plugins/sar.py ++++ b/sos/plugins/sar.py +@@ -32,14 +32,14 @@ class Sar(Plugin,): + if self.get_option("all_sar"): + self.sa_size = 0 + +- self.add_copy_spec_limit("/var/log/sa/sar[0-9]*", ++ self.add_copy_spec_limit("%s/sar[0-9]*" % self.sa_path, + sizelimit = self.sa_size) +- self.add_copy_spec_limit("/var/log/sa/sa[0-9]*", ++ self.add_copy_spec_limit("%s/sa[0-9]*" % self.sa_path, + sizelimit = self.sa_size) + try: + dirList = os.listdir(self.sa_path) + except: +- self.soslog.warning("sar: could not list /var/log/sa") ++ self.soslog.warning("sar: could not list %s" % self.sa_path) + return + # find all the sa file that don't have an existing sar file + for fname in dirList: +-- +1.7.11.7 + diff --git a/0023-Scrub-ldap_default_authtok-password-in-sssd-plugin.patch b/0023-Scrub-ldap_default_authtok-password-in-sssd-plugin.patch new file mode 100644 index 0000000..e9a917b --- /dev/null +++ b/0023-Scrub-ldap_default_authtok-password-in-sssd-plugin.patch @@ -0,0 +1,38 @@ +From fec14d2d9e0114e959d9626ca1457cd578c1d029 Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Fri, 14 Feb 2014 20:12:14 +0000 +Subject: [PATCH 23/61] Scrub ldap_default_authtok password in sssd plugin + +The file sssd.conf collected by the sssd plugin may contain an +ldap password. Add a postproc() method to replace the string with +blanks. + +Signed-off-by: Bryn M. Reeeves +--- + sos/plugins/sssd.py | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/sos/plugins/sssd.py b/sos/plugins/sssd.py +index b28f4b4..0d201f4 100644 +--- a/sos/plugins/sssd.py ++++ b/sos/plugins/sssd.py +@@ -24,7 +24,15 @@ class Sssd(Plugin): + packages = ('sssd',) + + def setup(self): +- self.add_copy_specs(["/etc/sssd", "/var/log/sssd/*"]) ++ self.add_copy_specs([ ++ "/etc/sssd/sssd.conf", ++ "/var/log/sssd/*" ++ ]) ++ ++ def postproc(self): ++ self.do_file_sub("/etc/sssd/sssd.conf", ++ r"(\s*ldap_default_authtok\s*=\s*)\S+", ++ r"\1********") + + class RedHatSssd(Sssd, RedHatPlugin): + """sssd-related Diagnostic Information on Red Hat based distributions +-- +1.7.11.7 + diff --git a/0024-Replace-package-check-with-file-check-in-anacron.patch b/0024-Replace-package-check-with-file-check-in-anacron.patch new file mode 100644 index 0000000..687b243 --- /dev/null +++ b/0024-Replace-package-check-with-file-check-in-anacron.patch @@ -0,0 +1,33 @@ +From 3dac227dde7af1168fa3c668836d7dde711981bd Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Mon, 3 Mar 2014 13:56:23 +0000 +Subject: [PATCH 24/61] Replace package check with file check in anacron + +The anacron facility may be provided by packages named 'anacron', +'chronie-anacron' etc. They all use a common /etc/anacrontab file +so check for this instead. + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/anacron.py | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/sos/plugins/anacron.py b/sos/plugins/anacron.py +index a60c85e..e9595a8 100644 +--- a/sos/plugins/anacron.py ++++ b/sos/plugins/anacron.py +@@ -21,7 +21,9 @@ class Anacron(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + + plugin_name = 'anacron' + +- packages = ('anacron',) ++ # anacron may be provided by anacron, cronie-anacron etc. ++ # just look for the configuration file which is common ++ files = ('/etc/anacrontab',) + + def setup(self): +- self.add_copy_spec("/etc/anacrontab") ++ self.add_copy_specs(list(self.files)) +-- +1.7.11.7 + diff --git a/0025-Remove-the-rhevm-plugin.patch b/0025-Remove-the-rhevm-plugin.patch new file mode 100644 index 0000000..c049307 --- /dev/null +++ b/0025-Remove-the-rhevm-plugin.patch @@ -0,0 +1,51 @@ +From 3758b10e367117945148c797b4b709d77277b84b Mon Sep 17 00:00:00 2001 +From: Lee Yarwood +Date: Tue, 4 Mar 2014 16:18:00 +0000 +Subject: [PATCH 25/61] Remove the rhevm plugin. + +This functionality is now provided by the ovirt-log-collector project [1] and independently shipped +VDSM sos plugin [2]. + +[1] http://gerrit.ovirt.org/gitweb?p=ovirt-log-collector.git +[2] http://gerrit.ovirt.org/gitweb?p=vdsm.git;a=tree;f=vdsm/sos;hb=HEAD + +Signed-off-by: Lee Yarwood +--- + sos/plugins/rhevm.py | 25 ------------------------- + 1 file changed, 25 deletions(-) + delete mode 100644 sos/plugins/rhevm.py + +diff --git a/sos/plugins/rhevm.py b/sos/plugins/rhevm.py +deleted file mode 100644 +index 8068e05..0000000 +--- a/sos/plugins/rhevm.py ++++ /dev/null +@@ -1,25 +0,0 @@ +-from sos.plugins import Plugin, RedHatPlugin +- +-# Class name must be the same as file name and method names must not change +-class RhevM(Plugin, RedHatPlugin): +- """RHEV-Manager related information""" +- +- plugin_name = 'rhevm' +- +- option_list = [("vdsmlogs", 'Directory containing all of the SOS logs from the RHEV hypervisor(s)', '', False)] +- +- def setup(self): +- # Copy rhevm config files. +- self.add_copy_spec("/etc/rhevm") +- self.add_copy_spec("/var/log/rhevm") +- if self.get_option("vdsmlogs"): +- self.add_copy_spec(str(self.get_option("vdsmlogs"))) +- +- def postproc(self): +- """ +- Obfuscate passwords. +- """ +- +- self.do_file_sub("/etc/rhevm/rhevm-config/rhevm-config.properties", +- r"Password.type=(.*)", +- r'Password.type=********') +-- +1.7.11.7 + diff --git a/0026-powerpc-Move-VPD-related-tool-under-common-code.patch b/0026-powerpc-Move-VPD-related-tool-under-common-code.patch new file mode 100644 index 0000000..a0efa0a --- /dev/null +++ b/0026-powerpc-Move-VPD-related-tool-under-common-code.patch @@ -0,0 +1,45 @@ +From 6fb9d5df14b3b0e21db458fd5fcd10691bb9fd0e Mon Sep 17 00:00:00 2001 +From: Vasant Hegde +Date: Tue, 11 Mar 2014 11:07:51 +0000 +Subject: [PATCH 26/61] powerpc: Move VPD related tool under common code + +VPD related tools (lsvpd, lscfg, lsmcode) is supported on both +pSeries and PowerNV platform. Hence moving these commands under +common code. + +Also added support to grab vpd database (/var/lib/lsvpd). + +Signed-off-by: Vasant Hegde +--- + sos/plugins/powerpc.py | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) +--- + sos/plugins/powerpc.py | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/sos/plugins/powerpc.py b/sos/plugins/powerpc.py +index dfaacb9..8fd6b4f 100644 +--- a/sos/plugins/powerpc.py ++++ b/sos/plugins/powerpc.py +@@ -52,14 +52,15 @@ class PowerPC(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): + self.add_cmd_output("ppc64_cpu --run-mode") + self.add_cmd_output("ppc64_cpu --frequency") + self.add_cmd_output("ppc64_cpu --dscr") ++ self.add_cmd_output("lscfg -vp") ++ self.add_cmd_output("lsmcode -A") ++ self.add_cmd_output("lsvpd --debug") ++ self.add_copy_spec("/var/lib/lsvpd/") + + if ispSeries: + self.add_copy_spec("/proc/ppc64/lparcfg") + self.add_copy_spec("/proc/ppc64/eeh") + self.add_copy_spec("/proc/ppc64/systemcfg") +- self.add_cmd_output("lscfg -vp") +- self.add_cmd_output("lsmcode -A") +- self.add_cmd_output("lsvpd --debug") + self.add_cmd_output("lsvio -des") + self.add_cmd_output("servicelog --dump") + self.add_cmd_output("servicelog_notify --list") +-- +1.7.11.7 + diff --git a/0027-Add-PowerNV-specific-debug-data.patch b/0027-Add-PowerNV-specific-debug-data.patch new file mode 100644 index 0000000..ef5ef48 --- /dev/null +++ b/0027-Add-PowerNV-specific-debug-data.patch @@ -0,0 +1,33 @@ +From a66d4fccfe093dfa29dfaa4808f361bc7063c742 Mon Sep 17 00:00:00 2001 +From: Vasant Hegde +Date: Tue, 11 Mar 2014 12:18:26 +0000 +Subject: [PATCH 27/61] Add PowerNV specific debug data + +This patch adds support to collect more debug files on +PowerNV platform. + +Signed-off-by: Vasant Hegde +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/powerpc.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) +--- + sos/plugins/powerpc.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/sos/plugins/powerpc.py b/sos/plugins/powerpc.py +index 8fd6b4f..9681094 100644 +--- a/sos/plugins/powerpc.py ++++ b/sos/plugins/powerpc.py +@@ -72,4 +72,7 @@ class PowerPC(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): + + if isPowerNV: + self.add_copy_spec("/proc/ppc64/") +- ++ self.add_copy_spec("/sys/kernel/debug/powerpc/") ++ if os.path.isdir("/var/log/dump"): ++ self.add_cmd_output("ls -l /var/log/dump") ++ +-- +1.7.11.7 + diff --git a/0028-Fix-remaining-use-of-obsolete-get_cmd_dir-in-plugins.patch b/0028-Fix-remaining-use-of-obsolete-get_cmd_dir-in-plugins.patch new file mode 100644 index 0000000..9c7ae57 --- /dev/null +++ b/0028-Fix-remaining-use-of-obsolete-get_cmd_dir-in-plugins.patch @@ -0,0 +1,44 @@ +From 877f93bcd469b939ec044539b9ea4a0d33e9f177 Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Tue, 11 Mar 2014 15:27:31 +0000 +Subject: [PATCH 28/61] Fix remaining use of obsolete 'get_cmd_dir()' in + plugins + +The get_cmd_dir() method was renamed to get_cmd_path(). Fix the +two remaining uses in yum and cluster plugins. + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/cluster.py | 2 +- + sos/plugins/yum.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sos/plugins/cluster.py b/sos/plugins/cluster.py +index 8d73dc1..7957498 100644 +--- a/sos/plugins/cluster.py ++++ b/sos/plugins/cluster.py +@@ -97,7 +97,7 @@ class Cluster(Plugin, RedHatPlugin): + "crm_from parameter '%s' is not a valid date: using default" + % self.get_option('crm_from')) + +- crm_dest = os.path.join(self.get_cmd_dir(), 'crm_report') ++ crm_dest = os.path.join(self.get_cmd_path(), 'crm_report') + self.add_cmd_output('crm_report -S -d --dest %s --from "%s"' + % (crm_dest, crm_from)) + +diff --git a/sos/plugins/yum.py b/sos/plugins/yum.py +index 81788f1..aa8cb18 100644 +--- a/sos/plugins/yum.py ++++ b/sos/plugins/yum.py +@@ -49,7 +49,7 @@ class Yum(Plugin, RedHatPlugin): + self.add_cmd_output("subscription-manager list --installed") + self.add_cmd_output("subscription-manager list --consumed") + self.add_cmd_output("rhsm-debug system --no-archive --destination %s" +- % self.get_cmd_dir()) ++ % self.get_cmd_path()) + + if self.get_option("yumlist"): + # List various information about available packages +-- +1.7.11.7 + diff --git a/0029-Update-systemd-support.patch b/0029-Update-systemd-support.patch new file mode 100644 index 0000000..1a56ea1 --- /dev/null +++ b/0029-Update-systemd-support.patch @@ -0,0 +1,35 @@ +From 7146472eb85bb4ea39a244ca252e66478b3e30dd Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Wed, 12 Mar 2014 13:02:39 +0000 +Subject: [PATCH 29/61] Update systemd support + +- Drop support for 'systemctl dump' as this no longer exists. +- Add 'systemctl list-units' for convenience +- add systemctl show-environment + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/systemd.py | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/sos/plugins/systemd.py b/sos/plugins/systemd.py +index 915c8fc..38be63e 100644 +--- a/sos/plugins/systemd.py ++++ b/sos/plugins/systemd.py +@@ -27,10 +27,11 @@ class Systemd(Plugin, RedHatPlugin): + + def setup(self): + self.add_cmd_output("systemctl show --all") ++ self.add_cmd_output("systemctl list-units") + self.add_cmd_output("systemctl list-units --failed") +- self.add_cmd_output("systemctl list-unit-files") + self.add_cmd_output("systemctl list-units --all") +- self.add_cmd_output("systemctl dump") ++ self.add_cmd_output("systemctl list-unit-files") ++ self.add_cmd_output("systemctl show-environment") + self.add_cmd_output("systemd-delta") + self.add_cmd_output("journalctl --verify") + self.add_cmd_output("journalctl --all --this-boot --no-pager") +-- +1.7.11.7 + diff --git a/0030-Add-tuned-plugin.patch b/0030-Add-tuned-plugin.patch new file mode 100644 index 0000000..7939fa8 --- /dev/null +++ b/0030-Add-tuned-plugin.patch @@ -0,0 +1,53 @@ +From c55c58cf2dabf93c924c839c8ed045c18e31ba1c Mon Sep 17 00:00:00 2001 +From: Peter Portante +Date: Wed, 29 Jan 2014 21:50:27 -0500 +Subject: [PATCH 30/61] Add tuned plugin + +Resolves Issue #232. + +Signed-off-by: Peter Portante +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/tuned.py | 30 ++++++++++++++++++++++++++++++ + 1 file changed, 30 insertions(+) + create mode 100644 sos/plugins/tuned.py + +diff --git a/sos/plugins/tuned.py b/sos/plugins/tuned.py +new file mode 100644 +index 0000000..60c22bc +--- /dev/null ++++ b/sos/plugins/tuned.py +@@ -0,0 +1,30 @@ ++## Copyright (C) 2014 Red Hat, Inc., Peter Portante ++ ++### This program is free software; you can redistribute it and/or modify ++## it under the terms of the GNU General Public License as published by ++## the Free Software Foundation; either version 2 of the License, or ++## (at your option) any later version. ++ ++## This program is distributed in the hope that it will be useful, ++## but WITHOUT ANY WARRANTY; without even the implied warranty of ++## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++## GNU General Public License for more details. ++ ++## You should have received a copy of the GNU General Public License ++## along with this program; if not, write to the Free Software ++## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ ++from sos.plugins import Plugin, RedHatPlugin ++ ++class Tuned(Plugin, RedHatPlugin): ++ """Tuned related information ++ """ ++ packages = ('tuned',) ++ plugin_name = 'tuned' ++ ++ def setup(self): ++ self.add_cmd_output("tuned-adm list") ++ self.add_cmd_output("tuned-adm active") ++ self.add_cmd_output("tuned-adm recommend") ++ self.add_copy_spec("/var/log/tuned/tuned.log") ++ +-- +1.7.11.7 + diff --git a/0031-Clean-up-get_cmd_path-make_cmd_path-make_cmd_dirs-me.patch b/0031-Clean-up-get_cmd_path-make_cmd_path-make_cmd_dirs-me.patch new file mode 100644 index 0000000..07e4ef2 --- /dev/null +++ b/0031-Clean-up-get_cmd_path-make_cmd_path-make_cmd_dirs-me.patch @@ -0,0 +1,173 @@ +From ef4e4b60eeaef33fa5e4ee074c6736cd3412397b Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Wed, 12 Mar 2014 16:27:34 +0000 +Subject: [PATCH 31/61] Clean up get_cmd_path/make_cmd_path/make_cmd_dirs mess + +Clean up the Plugin helper methods for handling command output +paths. This better matches the proposal in Issue #181 and +simplifies code for plugins that need to generate their own +paths under sos_commands//. + +- Rename get_cmd_path() to get_cmd_output_path() +- Add an optional 'name' parameter to specify a subdirectory + name in the plugin's sos_commands// directory. +- Default to creating directories if they do not exist + +Finally fix up all existing users of get_cmd_path() to use the +new interface and remove handrolled uses of os.path.join(...) for +generating these paths. + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/__init__.py | 26 +++++++++----------------- + sos/plugins/cluster.py | 2 +- + sos/plugins/foreman.py | 6 ++---- + sos/plugins/katello.py | 6 ++---- + sos/plugins/lvm2.py | 2 +- + sos/plugins/rhui.py | 8 +------- + sos/plugins/satellite.py | 2 +- + sos/plugins/yum.py | 2 +- + 8 files changed, 18 insertions(+), 36 deletions(-) + +diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py +index 9b643ab..efb6950 100644 +--- a/sos/plugins/__init__.py ++++ b/sos/plugins/__init__.py +@@ -512,26 +512,18 @@ class Plugin(object): + """Run a program and collect the output""" + self.collect_cmds.append( (exe, suggest_filename, root_symlink, timeout) ) + +- def get_cmd_path(self): ++ def get_cmd_output_path(self, name=None, make=True): + """Return a path into which this module should store collected + command output + """ +- return os.path.join(self.archive.get_tmp_dir(), +- 'sos_commands', self.name()) +- +- def make_cmd_path(self, path): +- """Return a string representing an absolute path within this +- plug-in's command output directory by apending the relative path +- name 'path'. +- """ +- return os.path.join(self.get_cmd_path(), path) +- +- +- def make_cmd_dirs(self, path): +- """Recursively create new subdirectories under this plug-in's +- command output path. +- """ +- os.makedirs(self.make_cmd_path(path)) ++ cmd_output_path = os.path.join(self.archive.get_tmp_dir(), ++ 'sos_commands', self.name()) ++ if name: ++ cmd_output_path = os.path.join(cmd_output_path, name) ++ if make: ++ os.makedirs(cmd_output_path) ++ ++ return cmd_output_path + + def file_grep(self, regexp, *fnames): + """Returns lines matched in fnames, where fnames can either be +diff --git a/sos/plugins/cluster.py b/sos/plugins/cluster.py +index 7957498..0b839fa 100644 +--- a/sos/plugins/cluster.py ++++ b/sos/plugins/cluster.py +@@ -97,7 +97,7 @@ class Cluster(Plugin, RedHatPlugin): + "crm_from parameter '%s' is not a valid date: using default" + % self.get_option('crm_from')) + +- crm_dest = os.path.join(self.get_cmd_path(), 'crm_report') ++ crm_dest = self.get_cmd_output_path(name='crm_report') + self.add_cmd_output('crm_report -S -d --dest %s --from "%s"' + % (crm_dest, crm_from)) + +diff --git a/sos/plugins/foreman.py b/sos/plugins/foreman.py +index ab4dfcb..a2f2881 100644 +--- a/sos/plugins/foreman.py ++++ b/sos/plugins/foreman.py +@@ -25,7 +25,5 @@ class Foreman(Plugin, RedHatPlugin): + packages = ('foreman') + + def setup(self): +- foreman_debug_path = os.path.join( +- self.get_cmd_path(),"foreman-debug") +- self.add_cmd_output("%s -q -a -d %s" +- % ("foreman-debug", foreman_debug_path)) ++ self.add_cmd_output("%s -q -a -d %s" % ("foreman-debug", ++ self.get_cmd_output_path(name="foreman-debug"))) +diff --git a/sos/plugins/katello.py b/sos/plugins/katello.py +index 1999388..acf5d90 100644 +--- a/sos/plugins/katello.py ++++ b/sos/plugins/katello.py +@@ -25,7 +25,5 @@ class Katello(Plugin, RedHatPlugin): + packages = ('katello', 'katello-common', 'katello-headpin') + + def setup(self): +- katello_debug_path = os.path.join( +- self.get_cmd_path(),"katello-debug") +- self.add_cmd_output("%s --notar -d %s" +- % ("katello-debug", katello_debug_path)) ++ self.add_cmd_output("katello-debug --notar -d %s" ++ % self.get_cmd_output_path(name="katello-debug")) +diff --git a/sos/plugins/lvm2.py b/sos/plugins/lvm2.py +index 1a4d589..102df26 100644 +--- a/sos/plugins/lvm2.py ++++ b/sos/plugins/lvm2.py +@@ -34,7 +34,7 @@ class Lvm2(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + if metadata: + lvmdump_opts = "-a -m" + cmd = lvmdump_cmd % (lvmdump_opts, +- os.path.join(self.get_cmd_path(), "lvmdump")) ++ self.get_cmd_output_path(name="lvmdump")) + self.add_cmd_output(cmd) + + def setup(self): +diff --git a/sos/plugins/rhui.py b/sos/plugins/rhui.py +index a291515..f0413b4 100644 +--- a/sos/plugins/rhui.py ++++ b/sos/plugins/rhui.py +@@ -32,13 +32,7 @@ class Rhui(Plugin, RedHatPlugin): + else: + cds = "" + +- rhui_debug_dst_path = os.path.join(self.get_cmd_path(), +- self.commons['cmddir'], self.name()) +- try: +- os.mkdir(rhui_debug_dst_path) +- except: +- return +- ++ rhui_debug_dst_path = self.get_cmd_output_path() + self.add_cmd_output("python %s %s --dir %s" + % (self.rhui_debug_path, cds, rhui_debug_dst_path), + suggest_filename="rhui-debug") +diff --git a/sos/plugins/satellite.py b/sos/plugins/satellite.py +index 7f4aafd..474933a 100644 +--- a/sos/plugins/satellite.py ++++ b/sos/plugins/satellite.py +@@ -78,7 +78,7 @@ class Satellite(Plugin, RedHatPlugin): + "/etc/tomcat6/", "/var/log/tomcat6/"]) + if os.path.exists("spacewalk-debug"): + self.add_cmd_output("spacewalk-debug --dir %s" +- % os.path.join(self.get_cmd_path())) ++ % self.get_cmd_output_path(name="spacewalk-debug")) + + if self.proxy: + self.add_copy_specs(["/etc/squid", "/var/log/squid"]) +diff --git a/sos/plugins/yum.py b/sos/plugins/yum.py +index aa8cb18..c978842 100644 +--- a/sos/plugins/yum.py ++++ b/sos/plugins/yum.py +@@ -49,7 +49,7 @@ class Yum(Plugin, RedHatPlugin): + self.add_cmd_output("subscription-manager list --installed") + self.add_cmd_output("subscription-manager list --consumed") + self.add_cmd_output("rhsm-debug system --no-archive --destination %s" +- % self.get_cmd_path()) ++ % self.get_cmd_output_path()) + + if self.get_option("yumlist"): + # List various information about available packages +-- +1.7.11.7 + diff --git a/0032-Fix-broken-binary-detection-in-satellite-plugin.patch b/0032-Fix-broken-binary-detection-in-satellite-plugin.patch new file mode 100644 index 0000000..484e211 --- /dev/null +++ b/0032-Fix-broken-binary-detection-in-satellite-plugin.patch @@ -0,0 +1,35 @@ +From 15f46d44afa055edc169670303c81fb97dcfd0ae Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Wed, 12 Mar 2014 17:57:34 +0000 +Subject: [PATCH 32/61] Fix broken binary detection in satellite plugin + +The satellite plugin attempts to check for the existence of the +'satellite-debug' binary before running it. This was broken by +the mass conversion to PATH for running external commands. + +Remove the check and just attempt to run the command regardless. + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/satellite.py | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/sos/plugins/satellite.py b/sos/plugins/satellite.py +index 474933a..28c8bca 100644 +--- a/sos/plugins/satellite.py ++++ b/sos/plugins/satellite.py +@@ -76,9 +76,8 @@ class Satellite(Plugin, RedHatPlugin): + if self.satellite: + self.add_copy_specs(["/etc/tnsnames.ora", "/etc/jabberd", + "/etc/tomcat6/", "/var/log/tomcat6/"]) +- if os.path.exists("spacewalk-debug"): +- self.add_cmd_output("spacewalk-debug --dir %s" +- % self.get_cmd_output_path(name="spacewalk-debug")) ++ self.add_cmd_output("spacewalk-debug --dir %s" ++ % self.get_cmd_output_path(name="spacewalk-debug")) + + if self.proxy: + self.add_copy_specs(["/etc/squid", "/var/log/squid"]) +-- +1.7.11.7 + diff --git a/0033-Rename-validatePlugin-to-validate_plugin.patch b/0033-Rename-validatePlugin-to-validate_plugin.patch new file mode 100644 index 0000000..10372e1 --- /dev/null +++ b/0033-Rename-validatePlugin-to-validate_plugin.patch @@ -0,0 +1,44 @@ +From db8839351479c60234bb6873394d93b56f0174eb Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Wed, 12 Mar 2014 19:36:02 +0000 +Subject: [PATCH 33/61] Rename validatePlugin to validate_plugin + +This one somehow didn't get the memo about camelCase not being +cool any more in sos. Rename the method to comply with pep8 and +not be so ugly. + +Signed-off-by: Bryn M. Reeves +--- + sos/policies/__init__.py | 2 +- + sos/sosreport.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sos/policies/__init__.py b/sos/policies/__init__.py +index c272e5c..b91d0fd 100644 +--- a/sos/policies/__init__.py ++++ b/sos/policies/__init__.py +@@ -198,7 +198,7 @@ No changes will be made to system configuration. + return tempfile.gettempdir() + return opt_tmp_dir + +- def validatePlugin(self, plugin_class): ++ def validate_plugin(self, plugin_class): + """ + Verifies that the plugin_class should execute under this policy + """ +diff --git a/sos/sosreport.py b/sos/sosreport.py +index 0faa364..fe78abd 100644 +--- a/sos/sosreport.py ++++ b/sos/sosreport.py +@@ -763,7 +763,7 @@ class SoSReport(object): + tuple(self.policy.valid_subclasses)) + + for plugin_class in plugin_classes: +- if not self.policy.validatePlugin(plugin_class): ++ if not self.policy.validate_plugin(plugin_class): + self.soslog.warning(_("plugin %s does not validate, skipping") % plug) + if self.opts.verbosity > 0: + self._skip(plugin_class, _("does not validate")) +-- +1.7.11.7 + diff --git a/0034-Update-policy_tests.py-for-validate_plugin-change.patch b/0034-Update-policy_tests.py-for-validate_plugin-change.patch new file mode 100644 index 0000000..101861e --- /dev/null +++ b/0034-Update-policy_tests.py-for-validate_plugin-change.patch @@ -0,0 +1,50 @@ +From 3eb24386719ee06c9e726550065c5427f1021c6f Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Thu, 13 Mar 2014 10:48:36 +0000 +Subject: [PATCH 34/61] Update policy_tests.py for validate_plugin change + +The policy_tests unit tests call validatePlugin(). Update them to +use the new name. + +Signed-off-by: Bryn M. Reeves +--- + tests/policy_tests.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/tests/policy_tests.py b/tests/policy_tests.py +index aa74da7..764af83 100644 +--- a/tests/policy_tests.py ++++ b/tests/policy_tests.py +@@ -21,25 +21,25 @@ class PolicyTests(unittest.TestCase): + p = FauxPolicy() + p.valid_subclasses = [] + +- self.assertTrue(p.validatePlugin(FauxPlugin)) ++ self.assertTrue(p.validate_plugin(FauxPlugin)) + + def test_redhat(self): + p = FauxPolicy() + p.valid_subclasses = [RedHatPlugin] + +- self.assertTrue(p.validatePlugin(FauxRedHatPlugin)) ++ self.assertTrue(p.validate_plugin(FauxRedHatPlugin)) + + def test_debian(self): + p = FauxPolicy() + p.valid_subclasses = [DebianPlugin] + +- self.assertTrue(p.validatePlugin(FauxDebianPlugin)) ++ self.assertTrue(p.validate_plugin(FauxDebianPlugin)) + + def test_fails(self): + p = FauxPolicy() + p.valid_subclasses = [] + +- self.assertFalse(p.validatePlugin(FauxDebianPlugin)) ++ self.assertFalse(p.validate_plugin(FauxDebianPlugin)) + + def test_can_import(self): + self.assertTrue(import_policy('redhat') is not None) +-- +1.7.11.7 + diff --git a/0035-Match-plugins-against-policies.patch b/0035-Match-plugins-against-policies.patch new file mode 100644 index 0000000..6debc83 --- /dev/null +++ b/0035-Match-plugins-against-policies.patch @@ -0,0 +1,150 @@ +From 4d1351efbd09220c36e889e222c40fe3ae68958a Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Wed, 12 Mar 2014 20:25:19 +0000 +Subject: [PATCH 35/61] Match plugins against policies + +Fixes Issue #238. + +When tagging classes are used to enable plugins on multiple +platforms it is possible for there to be more than one valid class +instance for a given policy. For e.g.: + + class DebianFooPlugin(Plugin, DebianPlugin): + /// + class UbuntuFooPlugin(Plugin, UbuntuPlugin): + /// + +Since UbuntuPolicy includes both DebianPlugin and UbuntuPlugin in +its valid_subclasses list both classes pass the validity test and +both are added to the loaded_plugins list. This causes plugins +to run twice: + +2014-03-12 19:57:50,974 DEBUG: copying file /var/log/mail.log to /var/log/mail.log +2014-03-12 19:57:50,975 DEBUG: added /var/log/mail.log to FileCacheArchive /tmp/sosreport-u1210-vm1-20140312195750 +2014-03-12 19:57:51,293 DEBUG: copying file /var/log/mail.log to /var/log/mail.log +2014-03-12 19:57:51,294 DEBUG: added /var/log/mail.log to FileCacheArchive /tmp/sosreport-u1210-vm1-20140312195750 + +Fix this by adding a match_plugin() method to the policy base +class and prefer plugins that are subclasses of the first entry +in the list. This patch also reverses the order of the +valid_subclasses list for the UbuntuPolicy to ensure preference +is given to native plugins: + + self.valid_subclasses = [UbuntuPlugin, DebianPlugin] + +Signed-off-by: Bryn M. Reeves +--- + sos/policies/__init__.py | 10 +++++++++ + sos/policies/ubuntu.py | 2 +- + sos/sosreport.py | 53 +++++++++++++++++++++++++----------------------- + 3 files changed, 39 insertions(+), 26 deletions(-) + +diff --git a/sos/policies/__init__.py b/sos/policies/__init__.py +index b91d0fd..08ce8b4 100644 +--- a/sos/policies/__init__.py ++++ b/sos/policies/__init__.py +@@ -198,6 +198,16 @@ No changes will be made to system configuration. + return tempfile.gettempdir() + return opt_tmp_dir + ++ def match_plugin(self, plugin_classes): ++ if len(plugin_classes) > 1: ++ for p in plugin_classes: ++ # Give preference to the first listed tagging class ++ # so that e.g. UbuntuPlugin is chosen over DebianPlugin ++ # on an Ubuntu installation. ++ if issubclass(p, self.valid_subclasses[0]): ++ return p ++ return plugin_classes[0] ++ + def validate_plugin(self, plugin_class): + """ + Verifies that the plugin_class should execute under this policy +diff --git a/sos/policies/ubuntu.py b/sos/policies/ubuntu.py +index c9a8177..3039f43 100644 +--- a/sos/policies/ubuntu.py ++++ b/sos/policies/ubuntu.py +@@ -12,7 +12,7 @@ class UbuntuPolicy(DebianPolicy): + + def __init__(self): + super(UbuntuPolicy, self).__init__() +- self.valid_subclasses = [DebianPlugin, UbuntuPlugin] ++ self.valid_subclasses = [UbuntuPlugin, DebianPlugin] + + @classmethod + def check(self): +diff --git a/sos/sosreport.py b/sos/sosreport.py +index fe78abd..13a46bf 100644 +--- a/sos/sosreport.py ++++ b/sos/sosreport.py +@@ -761,39 +761,42 @@ class SoSReport(object): + try: + plugin_classes = import_plugin(plugbase, + tuple(self.policy.valid_subclasses)) +- +- for plugin_class in plugin_classes: +- if not self.policy.validate_plugin(plugin_class): +- self.soslog.warning(_("plugin %s does not validate, skipping") % plug) +- if self.opts.verbosity > 0: +- self._skip(plugin_class, _("does not validate")) ++ if not len(plugin_classes): ++ # no valid plugin classes for this policy ++ continue ++ ++ plugin_class = self.policy.match_plugin(plugin_classes) ++ if not self.policy.validate_plugin(plugin_class): ++ self.soslog.warning(_("plugin %s does not validate, skipping") % plug) ++ if self.opts.verbosity > 0: ++ self._skip(plugin_class, _("does not validate")) + continue + +- if plugin_class.requires_root and not self._is_root: +- self.soslog.info(_("plugin %s requires root permissions to execute, skipping") % plug) +- self._skip(plugin_class, _("requires root")) +- continue ++ if plugin_class.requires_root and not self._is_root: ++ self.soslog.info(_("plugin %s requires root permissions to execute, skipping") % plug) ++ self._skip(plugin_class, _("requires root")) ++ continue + +- # plug-in is valid, let's decide whether run it or not +- self.plugin_names.append(plugbase) ++ # plug-in is valid, let's decide whether run it or not ++ self.plugin_names.append(plugbase) + +- if self._is_skipped(plugbase): +- self._skip(plugin_class, _("skipped")) +- continue ++ if self._is_skipped(plugbase): ++ self._skip(plugin_class, _("skipped")) ++ continue + +- if self._is_inactive(plugbase, plugin_class): +- self._skip(plugin_class, _("inactive")) +- continue ++ if self._is_inactive(plugbase, plugin_class): ++ self._skip(plugin_class, _("inactive")) ++ continue + +- if self._is_not_default(plugbase, plugin_class): +- self._skip(plugin_class, _("not default")) +- continue ++ if self._is_not_default(plugbase, plugin_class): ++ self._skip(plugin_class, _("not default")) ++ continue + +- if self._is_not_specified(plugbase): +- self._skip(plugin_class, _("not specified")) +- continue ++ if self._is_not_specified(plugbase): ++ self._skip(plugin_class, _("not specified")) ++ continue + +- self._load(plugin_class) ++ self._load(plugin_class) + except Exception as e: + self.soslog.warning(_("plugin %s does not install, skipping: %s") % (plug, e)) + if self.raise_plugins: +-- +1.7.11.7 + diff --git a/0036-Do-not-collect-isos-in-cobbler-plugin.patch b/0036-Do-not-collect-isos-in-cobbler-plugin.patch new file mode 100644 index 0000000..9473816 --- /dev/null +++ b/0036-Do-not-collect-isos-in-cobbler-plugin.patch @@ -0,0 +1,24 @@ +From 3ff674035d8962bf3ca3320900fccc6619af7a3d Mon Sep 17 00:00:00 2001 +From: Adam Stokes +Date: Fri, 14 Mar 2014 15:03:29 -0400 +Subject: [PATCH 36/61] Do not collect isos in cobbler plugin + +In Ubuntu isos are being added to the tarball, do not do that. + +Signed-off-by: Adam Stokes +--- + sos/plugins/cobbler.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/sos/plugins/cobbler.py b/sos/plugins/cobbler.py +index e3d289e..b754813 100644 +--- a/sos/plugins/cobbler.py ++++ b/sos/plugins/cobbler.py +@@ -39,3 +39,4 @@ class DebianCobbler(Cobbler, DebianPlugin, UbuntuPlugin): + self.add_copy_spec("/etc/cobbler") + self.add_copy_spec("/var/log/cobbler") + self.add_copy_spec("/var/lib/cobbler") ++ self.add_forbidden_path("/var/lib/cobbler/isos") +-- +1.7.11.7 + diff --git a/0037-Call-rhsm-debug-with-the-sos-switch.patch b/0037-Call-rhsm-debug-with-the-sos-switch.patch new file mode 100644 index 0000000..60d1806 --- /dev/null +++ b/0037-Call-rhsm-debug-with-the-sos-switch.patch @@ -0,0 +1,26 @@ +From f617db3b8232c5864726c60b11a91162409d867f Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Thu, 20 Mar 2014 18:56:58 +0000 +Subject: [PATCH 37/61] Call rhsm-debug with the --sos switch + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/yum.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sos/plugins/yum.py b/sos/plugins/yum.py +index c978842..b05c0fe 100644 +--- a/sos/plugins/yum.py ++++ b/sos/plugins/yum.py +@@ -48,7 +48,7 @@ class Yum(Plugin, RedHatPlugin): + "/var/log/rhsm/rhsmcertd.log"]) + self.add_cmd_output("subscription-manager list --installed") + self.add_cmd_output("subscription-manager list --consumed") +- self.add_cmd_output("rhsm-debug system --no-archive --destination %s" ++ self.add_cmd_output("rhsm-debug system --sos --no-archive --destination %s" + % self.get_cmd_output_path()) + + if self.get_option("yumlist"): +-- +1.7.11.7 + diff --git a/0038-Fix-plugin_test-exception-on-six.PY2.patch b/0038-Fix-plugin_test-exception-on-six.PY2.patch new file mode 100644 index 0000000..391beba --- /dev/null +++ b/0038-Fix-plugin_test-exception-on-six.PY2.patch @@ -0,0 +1,32 @@ +From eb2b77cc38130882db71b73a5a026a454d261684 Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Tue, 25 Mar 2014 17:26:11 +0000 +Subject: [PATCH 38/61] Fix plugin_test exception on six.PY2 + +Replace explicit test for six.PY2 with try/exception handling of +StringIO import. + +Signed-off-by: Bryn M. Reeves +--- + tests/plugin_tests.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/plugin_tests.py b/tests/plugin_tests.py +index c4b540f..31ffae4 100644 +--- a/tests/plugin_tests.py ++++ b/tests/plugin_tests.py +@@ -4,9 +4,9 @@ import tempfile + + # PYCOMPAT + import six +-if six.PY2: ++try: + from StringIO import StringIO +-else: ++except: + from io import StringIO + + from sos.plugins import Plugin, regex_findall, sos_relative_path, mangle_command +-- +1.7.11.7 + diff --git a/0039-Remove-profile-support.patch b/0039-Remove-profile-support.patch new file mode 100644 index 0000000..b46de42 --- /dev/null +++ b/0039-Remove-profile-support.patch @@ -0,0 +1,244 @@ +From 4553f0942c00b47342deea7fc47bb9822484a65e Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Tue, 25 Mar 2014 17:28:31 +0000 +Subject: [PATCH 39/61] Remove --profile support + +The handrolled profile logging support in sos hasn't been widely +used in a long time and is a problem better solved with external +profiling and coverage tools. + +Rip out all the support and documentation. This shortens and +simplifies numerous Plugin class methods. + +Fixes Issue #244. + +Signed-off-by: Bryn M. Reeves +--- + man/en/sosreport.1 | 5 +---- + sos/plugins/__init__.py | 30 ------------------------------ + sos/sosreport.py | 35 +---------------------------------- + tests/plugin_tests.py | 4 +--- + 4 files changed, 3 insertions(+), 71 deletions(-) + +diff --git a/man/en/sosreport.1 b/man/en/sosreport.1 +index c800576..e189433 100644 +--- a/man/en/sosreport.1 ++++ b/man/en/sosreport.1 +@@ -11,7 +11,7 @@ sosreport \- Collect and package diagnostic and support data + [--report] [--config-file conf] [--batch]\fR + [--build] [--name name] [--ticket-number number] + [--debug] [--tmp-dir directory]\fR +- [--profile] [--help]\fR ++ [--help]\fR + .SH DESCRIPTION + \fBsosreport\fR generates a compressed tar archive of diagnostic + information from the running system. The archive may be stored +@@ -84,9 +84,6 @@ archive as a temporary file or directory tree. + Enable interactive debugging using the python debugger. Exceptions in + sos or plug-in code will cause a trap to the pdb shell. + .TP +-.B \--profile +-Enable profiler logging. +-.TP + .B \--help + Display usage message. + .SH MAINTAINER +diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py +index efb6950..cf2a710 100644 +--- a/sos/plugins/__init__.py ++++ b/sos/plugins/__init__.py +@@ -137,7 +137,6 @@ class Plugin(object): + self.collect_cmds = [] + + self.soslog = self.commons['soslog'] if 'soslog' in self.commons else logging.getLogger('sos') +- self.proflog = self.commons['proflog'] if 'proflog' in self.commons else logging.getLogger('sosprofile') + + # get the option list into a dictionary + for opt in self.option_list: +@@ -171,9 +170,6 @@ class Plugin(object): + + This function returns the number of replacements made. + ''' +- if self.commons['cmdlineopts'].profiler: +- start_time = time() +- + globstr = '*' + cmd + '*' + self.soslog.debug("substituting '%s' for '%s' in commands matching %s" + % (subst, regexp, globstr)) +@@ -200,11 +196,6 @@ class Plugin(object): + msg = 'regex substitution failed for %s in plugin %s with: "%s"' + self.soslog.error(msg % (called['exe'], self.name(), e)) + replacements = None +- +- if self.commons['cmdlineopts'].profiler: +- time_passed = time() - start_time +- self.proflog.debug("subst: %-75s time: %f" +- % (globstr, time_passed)) + return replacements + + def do_file_sub(self, srcpath, regexp, subst): +@@ -215,9 +206,6 @@ class Plugin(object): + + This function returns the number of replacements made. + ''' +- if self.commons['cmdlineopts'].profiler: +- start_time = time() +- + try: + path = self._get_dest_for_srcpath(srcpath) + self.soslog.debug("substituting '%s' for '%s' in %s" +@@ -234,10 +222,6 @@ class Plugin(object): + msg = 'regex substitution failed for %s in plugin %s with: "%s"' + self.soslog.error(msg % (path, self.name(), e)) + replacements = 0 +- if self.commons['cmdlineopts'].profiler: +- time_passed = time() - start_time +- self.proflog.debug("subst : %-75s time: %f" +- % (srcpath, time_passed)) + return replacements + + def do_regex_find_all(self, regex, fname): +@@ -314,10 +298,6 @@ class Plugin(object): + /etc/my_file.conf the file would end up at + /configurations/my_file.conf. + ''' +- +- if self.commons['cmdlineopts'].profiler: +- start_time = time() +- + if self._path_in_path_list(srcpath, self.forbidden_paths): + self.soslog.debug("%s is in the forbidden path list" % srcpath) + return '' +@@ -358,9 +338,6 @@ class Plugin(object): + 'dstpath':dest, + 'symlink':"no"}) + +- if self.commons['cmdlineopts'].profiler: +- time_passed = time() - start_time +- self.proflog.debug("copied: %-75s time: %f" % (srcpath, time_passed)) + except Exception as e: + self.soslog.error("Unable to copy %s to %s" % (srcpath, dest)) + self.soslog.error(traceback.format_exc()) +@@ -560,9 +537,6 @@ class Plugin(object): + """Execute a command and save the output to a file for inclusion in the + report. + """ +- if self.commons['cmdlineopts'].profiler: +- start_time = time() +- + # pylint: disable-msg = W0612 + status, shout, runtime = self.get_command_output(exe, timeout=timeout) + if (status == 127): +@@ -582,10 +556,6 @@ class Plugin(object): + self.executed_commands.append({'exe': exe, 'file':outfn_strip}) # save in our list + self.commons['xmlreport'].add_command(cmdline=exe,exitcode=status,f_stdout=outfn_strip,runtime=runtime) + +- if self.commons['cmdlineopts'].profiler: +- time_passed = time() - start_time +- self.proflog.debug("output: %-75s time: %f" % (exe, time_passed)) +- + return os.path.join(self.archive.get_archive_path(), outfn) + + # For adding output +diff --git a/sos/sosreport.py b/sos/sosreport.py +index 13a46bf..afa5371 100644 +--- a/sos/sosreport.py ++++ b/sos/sosreport.py +@@ -220,7 +220,6 @@ class SoSOptions(object): + _config_file = "" + _tmp_dir = "" + _report = True +- _profiler = False + _compression_type = 'auto' + + _options = None +@@ -431,19 +430,6 @@ class SoSOptions(object): + self._report = value + + @property +- def profiler(self): +- if self._options != None: +- return self._options.profiler +- return self._profiler +- +- @profiler.setter +- def profiler(self, value): +- self._check_options_initialized() +- if not isinstance(value, bool): +- raise TypeError("SoSOptions.profiler expects a boolean") +- self._profiler = value +- +- @property + def compression_type(self): + if self._options != None: + return self._options.compression_type +@@ -508,9 +494,6 @@ class SoSOptions(object): + parser.add_option("--no-report", action="store_true", + dest="report", + help="Disable HTML/XML reporting", default=False) +- parser.add_option("--profile", action="store_true", +- dest="profiler", +- help="turn on profiling", default=False) + parser.add_option("-z", "--compression-type", dest="compression_type", + help="compression technology to use [auto, zip, gzip, bzip2, xz] (default=auto)", + default="auto") +@@ -563,7 +546,6 @@ class SoSReport(object): + 'rptdir': self.rptdir, + 'tmpdir': self.tmpdir, + 'soslog': self.soslog, +- 'proflog' : self.proflog, + 'policy': self.policy, + 'verbosity': self.opts.verbosity, + 'xmlreport': self.xml_report, +@@ -680,32 +662,17 @@ class SoSReport(object): + ui_console.setLevel(logging.INFO) + self.ui_log.addHandler(ui_console) + +- # profile logging +- if self.opts.profiler: +- self.proflog = logging.getLogger('sosprofile') +- self.proflog.setLevel(logging.DEBUG) +- self.sos_profile_log_file = self.get_temp_file() +- plog = logging.FileHandler(self.sos_profile_log_file.name) +- plog.setFormatter(logging.Formatter('%(message)s')) +- plog.setLevel(logging.DEBUG) +- self.proflog.addHandler(plog) +- else: +- self.proflog = logging.getLogger('sosprofile') +- self.proflog.setLevel(logging.FATAL) +- + def _finish_logging(self): + logging.shutdown() + + # the logging module seems to persist in the jython/jboss/eap world + # so the handlers need to be removed +- for logger in [logging.getLogger(x) for x in ('sos', 'sosprofile', 'sos_ui')]: ++ for logger in [logging.getLogger(x) for x in ('sos', 'sos_ui')]: + for h in logger.handlers: + logger.removeHandler(h) + + if getattr(self, "sos_log_file", None): + self.archive.add_file(self.sos_log_file.name, dest=os.path.join('sos_logs', 'sos.log')) +- if getattr(self, "sos_profile_log_file", None): +- self.archive.add_file(self.sos_profile_log_file.name, dest=os.path.join('sos_logs', 'profile.log')) + if getattr(self, "sos_ui_log_file", None): + self.archive.add_file(self.sos_ui_log_file.name, dest=os.path.join('sos_logs', 'ui.log')) + +diff --git a/tests/plugin_tests.py b/tests/plugin_tests.py +index 31ffae4..0f8ef5d 100644 +--- a/tests/plugin_tests.py ++++ b/tests/plugin_tests.py +@@ -89,9 +89,7 @@ class EnablerPlugin(Plugin): + + + class MockOptions(object): +- +- profiler = False +- ++ pass + + + class PluginToolTests(unittest.TestCase): +-- +1.7.11.7 + diff --git a/0040-Dead-code-removal-sos_relative_path.patch b/0040-Dead-code-removal-sos_relative_path.patch new file mode 100644 index 0000000..4ab2e65 --- /dev/null +++ b/0040-Dead-code-removal-sos_relative_path.patch @@ -0,0 +1,78 @@ +From e708041c050245bf05a7205e6661f8402e8e6a66 Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Wed, 26 Mar 2014 12:22:29 +0000 +Subject: [PATCH 40/61] Dead code removal: sos_relative_path() + +The function is defined and even has test cases. But no callers.. +Remove the function and the test cases that exercise it. + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/__init__.py | 15 --------------- + tests/plugin_tests.py | 17 +---------------- + 2 files changed, 1 insertion(+), 31 deletions(-) + +diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py +index cf2a710..d420cd0 100644 +--- a/sos/plugins/__init__.py ++++ b/sos/plugins/__init__.py +@@ -58,21 +58,6 @@ def common_prefix(l1, l2, common = None): + return (common, [l1, l2]) + return common_prefix(l1[1:], l2[1:], common+[l1[0]]) + +-def sos_relative_path(path1, path2, sep=os.path.sep, pardir=os.path.pardir): +- '''Return a relative path from path1 equivalent to path path2. In +- particular: the empty string, if path1 == path2; path2, if path1 and path2 +- have no common prefix. +- ''' +- try: +- common, (u1, u2) = common_prefix(path1.split(sep), path2.split(sep)) +- except AttributeError: +- return path2 +- +- if not common: +- return path2 # leave path absolute if nothing at all in common +- return sep.join( [pardir]*len(u1) + u2 ) +- +- + def regex_findall(regex, fname): + '''Return a list of all non overlapping matches in the string(s)''' + try: +diff --git a/tests/plugin_tests.py b/tests/plugin_tests.py +index 0f8ef5d..5eb1304 100644 +--- a/tests/plugin_tests.py ++++ b/tests/plugin_tests.py +@@ -9,7 +9,7 @@ try: + except: + from io import StringIO + +-from sos.plugins import Plugin, regex_findall, sos_relative_path, mangle_command ++from sos.plugins import Plugin, regex_findall, mangle_command + from sos.archive import TarFileArchive, ZipFileArchive + import sos.policies + +@@ -114,21 +114,6 @@ class PluginToolTests(unittest.TestCase): + matches = regex_findall(r".*", 1) + self.assertEquals(matches, []) + +- def test_rel_path(self): +- path1 = "/usr/lib/foo" +- path2 = "/usr/lib/boo" +- self.assertEquals(sos_relative_path(path1, path2), "../boo") +- +- def test_abs_path(self): +- path1 = "usr/lib/foo" +- path2 = "foo/lib/boo" +- self.assertEquals(sos_relative_path(path1, path2), "foo/lib/boo") +- +- def test_bad_path(self): +- path1 = None +- path2 = "foo/lib/boo" +- self.assertEquals(sos_relative_path(path1, path2), "foo/lib/boo") +- + def test_mangle_command(self): + self.assertEquals("foo", mangle_command("/usr/bin/foo")) + self.assertEquals("foo_-x", mangle_command("/usr/bin/foo -x")) +-- +1.7.11.7 + diff --git a/0041-Dead-code-removal-DirTree.patch b/0041-Dead-code-removal-DirTree.patch new file mode 100644 index 0000000..fec2b9f --- /dev/null +++ b/0041-Dead-code-removal-DirTree.patch @@ -0,0 +1,146 @@ +From 6b3b56ee17e14a0f0de8a16a6a52b3708d01146b Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Wed, 26 Mar 2014 12:24:33 +0000 +Subject: [PATCH 41/61] Dead code removal: DirTree + +The DirTree class has remained unused since it was implemented. +Remove the definition and associated test cases. + +Signed-off-by: Bryn M. Reeves +--- + sos/utilities.py | 89 ------------------------------------------------ + tests/utilities_tests.py | 11 +----- + 2 files changed, 1 insertion(+), 99 deletions(-) + +diff --git a/sos/utilities.py b/sos/utilities.py +index a9aca74..8602a52 100644 +--- a/sos/utilities.py ++++ b/sos/utilities.py +@@ -185,95 +185,6 @@ def shell_out(cmd): + Does not handle exceptions.""" + return sos_get_command_output(cmd)[1] + +-class DirTree(object): +- """Builds an ascii representation of a directory structure""" +- +- def __init__(self, top_directory): +- self.directory_count = 0 +- self.file_count = 0 +- self.buffer = [] +- self.top_directory = top_directory +- self._build_tree() +- +- def buf(self, s): +- self.buffer.append(s) +- +- def printtree(self): +- print (six.u(self)) +- +- def as_string(self): +- return self.__str__() +- +- def __str__(self): +- return "\n".join(self.buffer) +- +- def _build_tree(self): +- self.buf(os.path.abspath(self.top_directory)) +- self.tree_i(self.top_directory, first=True) +- +- def _get_user(self, stats): +- try: +- import pwd +- return pwd.getpwuid(stats.st_uid)[0] +- except: +- return six.u(stats.st_uid) +- +- def _get_group(self, stats): +- try: +- import grp +- return grp.getgrgid(stats.st_gid)[0] +- except: +- return six.u(stats.st_uid) +- +- def _format(self, path): +- """Conditionally adds detail to paths""" +- stats = os.stat(path) +- details = { +- "filename": os.path.basename(path), +- "user": self._get_user(stats), +- "group": self._get_group(stats), +- "filesize": convert_bytes(stats.st_size), +- } +- return ("[%(user)s %(group)s %(filesize)s] " % details, "%(filename)s" % details) +- +- def tree_i(self, dir_, padding='', first=False, fmt="%-30s %s%s%s"): +- if not first: +- details, filename = self._format(os.path.abspath(dir_)) +- line = fmt % (details, padding[:-1], "+-- ", filename) +- self.buf(line) +- padding += ' ' +- +- count = 0 +- files = os.listdir(dir_) +- files.sort(key=str.lower) +- for f in files: +- count += 1 +- path = os.path.join(dir_, f) +- +- if f.startswith("."): +- pass +- elif os.path.isfile(path): +- self.file_count += 1 +- details, filename = self._format(path) +- line = fmt % (details, padding, "+-- ", filename) +- self.buf(line) +- elif os.path.islink(path): +- self.buf(padding + +- '+-- ' + +- f + +- ' -> ' + os.path.basename(os.path.realpath(path))) +- if os.path.isdir(path): +- self.directory_count += 1 +- else: +- self.file_count += 1 +- elif os.path.isdir(path): +- self.directory_count += 1 +- if count == len(files): +- self.tree_i(path, padding + ' ') +- else: +- self.tree_i(path, padding + '|') +- +- + class ImporterHelper(object): + """Provides a list of modules that can be imported in a package. + Importable modules are located along the module __path__ list and modules +diff --git a/tests/utilities_tests.py b/tests/utilities_tests.py +index 04c5241..da0987f 100644 +--- a/tests/utilities_tests.py ++++ b/tests/utilities_tests.py +@@ -5,7 +5,7 @@ import unittest + import six + from six import StringIO + +-from sos.utilities import grep, DirTree, checksum, get_hash_name, is_executable, sos_get_command_output, find, tail, shell_out ++from sos.utilities import grep, checksum, get_hash_name, is_executable, sos_get_command_output, find, tail, shell_out + import sos + + TEST_DIR = os.path.dirname(__file__) +@@ -43,15 +43,6 @@ class TailTest(unittest.TestCase): + self.assertEquals(t, six.b(expected)) + + +-class DirTreeTest(unittest.TestCase): +- +- def test_makes_tree(self): +- # I'll admit, this a pretty lame test, but it will at least sniff out +- # some syntax issues +- t = DirTree(os.path.dirname(sos.__file__)).as_string() +- self.assertTrue('sos' in t) +- +- + class ChecksumTest(unittest.TestCase): + + def test_simple_hash(self): +-- +1.7.11.7 + diff --git a/0042-Dead-code-removal-utilities.checksum.patch b/0042-Dead-code-removal-utilities.checksum.patch new file mode 100644 index 0000000..ef15e25 --- /dev/null +++ b/0042-Dead-code-removal-utilities.checksum.patch @@ -0,0 +1,72 @@ +From 9c88a8ff071c9a74e3b412bd4f4ef19cd9248611 Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Wed, 26 Mar 2014 12:40:17 +0000 +Subject: [PATCH 42/61] Dead code removal: utilities.checksum() + +Has test case but no callers. Delete it. + +Signed-off-by: Bryn M. Reeves +--- + sos/utilities.py | 15 --------------- + tests/utilities_tests.py | 12 ------------ + 2 files changed, 27 deletions(-) + +diff --git a/sos/utilities.py b/sos/utilities.py +index 8602a52..1a56f9f 100644 +--- a/sos/utilities.py ++++ b/sos/utilities.py +@@ -63,19 +63,6 @@ def fileobj(path_or_file, mode='r'): + else: + return closing(path_or_file) + +-def checksum(file_, chunk_size=128, algorithm=None): +- """Returns the checksum of the supplied filename. The file is read in +- chunk_size blocks""" +- if not algorithm: +- algorithm = get_hash_name() +- digest = hashlib.new(algorithm) +- with fileobj(file_, 'rb') as fd: +- data = fd.read(chunk_size) +- while data: +- digest.update(six.b(data)) +- data = fd.read(chunk_size) +- return digest.hexdigest() +- + def get_hash_name(): + """Returns the algorithm used when computing a hash""" + import sos.policies +@@ -101,8 +88,6 @@ def convert_bytes(bytes_, K=1 << 10, M=1 << 20, G=1 << 30, T=1 << 40): + else: + return '%d' % bytes_ + +- +- + def find(file_pattern, top_dir, max_depth=None, path_pattern=None): + """generator function to find files recursively. Usage: + +diff --git a/tests/utilities_tests.py b/tests/utilities_tests.py +index da0987f..395fde1 100644 +--- a/tests/utilities_tests.py ++++ b/tests/utilities_tests.py +@@ -43,18 +43,6 @@ class TailTest(unittest.TestCase): + self.assertEquals(t, six.b(expected)) + + +-class ChecksumTest(unittest.TestCase): +- +- def test_simple_hash(self): +- self.assertEquals(checksum(StringIO('this is a test'), algorithm="sha256"), +- '2e99758548972a8e8822ad47fa1017ff72f06f3ff6a016851f45c398732bc50c') +- +- def test_hash_loading(self): +- # not the greatest test, since we are asking the policy to pick for us +- name = get_hash_name() +- self.assertTrue(name in ('md5', 'sha256')) +- +- + class ExecutableTest(unittest.TestCase): + + def test_nonexe_file(self): +-- +1.7.11.7 + diff --git a/0043-Add-vim-tags-to-all-python-source-files.patch b/0043-Add-vim-tags-to-all-python-source-files.patch new file mode 100644 index 0000000..e6957a1 --- /dev/null +++ b/0043-Add-vim-tags-to-all-python-source-files.patch @@ -0,0 +1,1830 @@ +From 747189c07e5536151de3e656bc8fa5d23d8baf3c Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Wed, 26 Mar 2014 13:07:13 +0000 +Subject: [PATCH 43/61] Add vim tags to all python source files + +Fixes Issue #243. + +Signed-off-by: Bryn M. Reeves +--- + __run__.py | 2 ++ + example_plugins/example.py | 2 ++ + setup.py | 2 ++ + sos/__init__.py | 2 ++ + sos/archive.py | 2 ++ + sos/plugins/__init__.py | 2 ++ + sos/plugins/abrt.py | 2 ++ + sos/plugins/acpid.py | 2 ++ + sos/plugins/anaconda.py | 2 ++ + sos/plugins/anacron.py | 2 ++ + sos/plugins/apache.py | 2 ++ + sos/plugins/apparmor.py | 2 ++ + sos/plugins/apport.py | 2 ++ + sos/plugins/apt.py | 2 ++ + sos/plugins/ata.py | 2 ++ + sos/plugins/auditd.py | 2 ++ + sos/plugins/autofs.py | 2 ++ + sos/plugins/azure.py | 2 ++ + sos/plugins/block.py | 2 ++ + sos/plugins/boot.py | 2 ++ + sos/plugins/ceph.py | 2 ++ + sos/plugins/cgroups.py | 2 ++ + sos/plugins/cluster.py | 2 ++ + sos/plugins/cobbler.py | 2 ++ + sos/plugins/corosync.py | 2 ++ + sos/plugins/cron.py | 2 ++ + sos/plugins/cs.py | 2 ++ + sos/plugins/cups.py | 2 ++ + sos/plugins/devicemapper.py | 2 ++ + sos/plugins/dhcp.py | 2 ++ + sos/plugins/distupgrade.py | 2 ++ + sos/plugins/dmraid.py | 2 ++ + sos/plugins/dovecot.py | 2 ++ + sos/plugins/dpkg.py | 2 ++ + sos/plugins/ds.py | 2 ++ + sos/plugins/emc.py | 2 ++ + sos/plugins/filesys.py | 2 ++ + sos/plugins/foreman.py | 2 ++ + sos/plugins/gdm.py | 2 ++ + sos/plugins/general.py | 2 ++ + sos/plugins/gluster.py | 2 ++ + sos/plugins/grub.py | 2 ++ + sos/plugins/grub2.py | 2 ++ + sos/plugins/hardware.py | 2 ++ + sos/plugins/hts.py | 2 ++ + sos/plugins/i18n.py | 2 ++ + sos/plugins/infiniband.py | 2 ++ + sos/plugins/ipa.py | 2 ++ + sos/plugins/ipsec.py | 2 ++ + sos/plugins/iscsi.py | 2 ++ + sos/plugins/iscsitarget.py | 2 ++ + sos/plugins/java.py | 2 ++ + sos/plugins/juju.py | 2 ++ + sos/plugins/katello.py | 2 ++ + sos/plugins/kdump.py | 2 ++ + sos/plugins/kernel.py | 2 ++ + sos/plugins/kernelrt.py | 2 ++ + sos/plugins/krb5.py | 2 ++ + sos/plugins/kvm.py | 2 ++ + sos/plugins/landscape.py | 2 ++ + sos/plugins/ldap.py | 2 ++ + sos/plugins/libraries.py | 2 ++ + sos/plugins/libvirt.py | 2 ++ + sos/plugins/lilo.py | 2 ++ + sos/plugins/logrotate.py | 2 ++ + sos/plugins/logs.py | 2 ++ + sos/plugins/lsbrelease.py | 2 ++ + sos/plugins/lvm2.py | 2 ++ + sos/plugins/maas.py | 2 ++ + sos/plugins/md.py | 2 ++ + sos/plugins/memory.py | 2 ++ + sos/plugins/mrggrid.py | 2 ++ + sos/plugins/mrgmessg.py | 2 ++ + sos/plugins/multipath.py | 2 ++ + sos/plugins/mysql.py | 2 ++ + sos/plugins/named.py | 2 ++ + sos/plugins/networking.py | 2 ++ + sos/plugins/neutron.py | 2 ++ + sos/plugins/nfs.py | 2 ++ + sos/plugins/nfsserver.py | 2 ++ + sos/plugins/nis.py | 2 ++ + sos/plugins/nscd.py | 2 ++ + sos/plugins/ntp.py | 2 ++ + sos/plugins/oddjob.py | 2 ++ + sos/plugins/openhpi.py | 2 ++ + sos/plugins/openshift.py | 2 ++ + sos/plugins/openssl.py | 2 ++ + sos/plugins/openstack_ceilometer.py | 2 ++ + sos/plugins/openstack_cinder.py | 2 ++ + sos/plugins/openstack_glance.py | 2 ++ + sos/plugins/openstack_heat.py | 2 ++ + sos/plugins/openstack_horizon.py | 2 ++ + sos/plugins/openstack_keystone.py | 2 ++ + sos/plugins/openstack_neutron.py | 2 ++ + sos/plugins/openstack_nova.py | 2 ++ + sos/plugins/openstack_swift.py | 2 ++ + sos/plugins/openswan.py | 2 ++ + sos/plugins/pam.py | 2 ++ + sos/plugins/pci.py | 2 ++ + sos/plugins/postfix.py | 2 ++ + sos/plugins/postgresql.py | 3 ++- + sos/plugins/powerpc.py | 2 ++ + sos/plugins/ppp.py | 2 ++ + sos/plugins/procenv.py | 2 ++ + sos/plugins/process.py | 2 ++ + sos/plugins/processor.py | 2 ++ + sos/plugins/psacct.py | 2 ++ + sos/plugins/pxe.py | 2 ++ + sos/plugins/qpid.py | 2 ++ + sos/plugins/quagga.py | 2 ++ + sos/plugins/radius.py | 2 ++ + sos/plugins/rhui.py | 2 ++ + sos/plugins/rpm.py | 2 ++ + sos/plugins/s390.py | 2 ++ + sos/plugins/samba.py | 2 ++ + sos/plugins/sanlock.py | 2 ++ + sos/plugins/sar.py | 2 ++ + sos/plugins/satellite.py | 2 ++ + sos/plugins/scsi.py | 2 ++ + sos/plugins/selinux.py | 2 ++ + sos/plugins/sendmail.py | 2 ++ + sos/plugins/smartcard.py | 2 ++ + sos/plugins/snmp.py | 2 ++ + sos/plugins/soundcard.py | 2 ++ + sos/plugins/squid.py | 2 ++ + sos/plugins/ssh.py | 2 ++ + sos/plugins/sssd.py | 2 ++ + sos/plugins/startup.py | 2 ++ + sos/plugins/sunrpc.py | 2 ++ + sos/plugins/system.py | 2 ++ + sos/plugins/systemd.py | 2 ++ + sos/plugins/systemtap.py | 2 ++ + sos/plugins/sysvipc.py | 2 ++ + sos/plugins/tftpserver.py | 2 ++ + sos/plugins/tomcat.py | 2 ++ + sos/plugins/tuned.py | 2 ++ + sos/plugins/udev.py | 2 ++ + sos/plugins/upstart.py | 2 ++ + sos/plugins/usb.py | 2 ++ + sos/plugins/veritas.py | 2 ++ + sos/plugins/vmware.py | 2 ++ + sos/plugins/vsftpd.py | 2 ++ + sos/plugins/x11.py | 2 ++ + sos/plugins/xen.py | 2 ++ + sos/plugins/xfs.py | 2 ++ + sos/plugins/xinetd.py | 2 ++ + sos/plugins/yum.py | 2 ++ + sos/policies/__init__.py | 2 ++ + sos/policies/debian.py | 2 ++ + sos/policies/osx.py | 2 ++ + sos/policies/redhat.py | 3 ++- + sos/policies/ubuntu.py | 2 ++ + sos/policies/windows.py | 2 ++ + sos/reporting.py | 2 ++ + sos/sosreport.py | 2 ++ + sos/utilities.py | 2 ++ + tests/archive_tests.py | 2 ++ + tests/importer_tests.py | 2 ++ + tests/option_tests.py | 2 ++ + tests/plugin_tests.py | 2 ++ + tests/policy_tests.py | 2 ++ + tests/report_tests.py | 2 ++ + tests/sosreport_pexpect.py | 2 ++ + tests/test_exe.py | 2 ++ + tests/utilities_tests.py | 2 ++ + 165 files changed, 330 insertions(+), 2 deletions(-) + +diff --git a/__run__.py b/__run__.py +index 663ee14..0f46807 100755 +--- a/__run__.py ++++ b/__run__.py +@@ -15,3 +15,5 @@ from sos.sosreport import main + import sys + + main(sys.argv[1:]) ++ ++# vim: et ts=4 sw=4 +diff --git a/example_plugins/example.py b/example_plugins/example.py +index e13d92b..31e8c78 100755 +--- a/example_plugins/example.py ++++ b/example_plugins/example.py +@@ -55,3 +55,5 @@ class example(Plugin, RedHatPlugin): + # Here's how to execute a command + self.collectExtOutput("/bin/ps -ef") + ++ ++# vim: et ts=4 sw=4 +diff --git a/setup.py b/setup.py +index 0ae87b3..09d164f 100644 +--- a/setup.py ++++ b/setup.py +@@ -70,3 +70,5 @@ setup(name='sosreport', + requires=['six'], + ) + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/__init__.py b/sos/__init__.py +index f2b8e32..fc6738b 100644 +--- a/sos/__init__.py ++++ b/sos/__init__.py +@@ -32,3 +32,5 @@ def _default(msg): + return gettext.dgettext(gettext_app, msg) + + _sos = _default ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/archive.py b/sos/archive.py +index 9e6029b..3cca9b7 100644 +--- a/sos/archive.py ++++ b/sos/archive.py +@@ -332,3 +332,5 @@ class ZipFileArchive(Archive): + + def close(self): + self.zipfile.close() ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py +index d420cd0..9ee0b61 100644 +--- a/sos/plugins/__init__.py ++++ b/sos/plugins/__init__.py +@@ -700,3 +700,5 @@ def import_plugin(name, superclasses=None): + if not superclasses: + superclasses = (Plugin,) + return import_module(plugin_fqname, superclasses) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/abrt.py b/sos/plugins/abrt.py +index 148d57a..660c0f7 100644 +--- a/sos/plugins/abrt.py ++++ b/sos/plugins/abrt.py +@@ -44,3 +44,5 @@ class Abrt(Plugin, RedHatPlugin): + self.do_backtraces() + + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/acpid.py b/sos/plugins/acpid.py +index 9a2d123..b9371f0 100644 +--- a/sos/plugins/acpid.py ++++ b/sos/plugins/acpid.py +@@ -31,3 +31,5 @@ class DebianAcpid(Acpid, DebianPlugin, UbuntuPlugin): + def setup(self): + self.add_copy_specs([ + "/etc/acpi/events/powerbtn*"]) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/anaconda.py b/sos/plugins/anaconda.py +index dcec704..e165ba7 100644 +--- a/sos/plugins/anaconda.py ++++ b/sos/plugins/anaconda.py +@@ -44,3 +44,5 @@ class Anaconda(Plugin, RedHatPlugin): + self.do_file_sub("/root/anaconda-ks.cfg", + r"(\s*rootpw\s*).*", + r"\1******") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/anacron.py b/sos/plugins/anacron.py +index e9595a8..60efa27 100644 +--- a/sos/plugins/anacron.py ++++ b/sos/plugins/anacron.py +@@ -27,3 +27,5 @@ class Anacron(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + + def setup(self): + self.add_copy_specs(list(self.files)) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/apache.py b/sos/plugins/apache.py +index d889125..bad943b 100644 +--- a/sos/plugins/apache.py ++++ b/sos/plugins/apache.py +@@ -50,3 +50,5 @@ class DebianApache(Apache, DebianPlugin, UbuntuPlugin): + "/etc/default/apache2"]) + if self.get_option("log"): + self.add_copy_spec("/var/log/apache2/*") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/apparmor.py b/sos/plugins/apparmor.py +index afdad18..76ca9db 100644 +--- a/sos/plugins/apparmor.py ++++ b/sos/plugins/apparmor.py +@@ -25,3 +25,5 @@ class Apparmor(Plugin, UbuntuPlugin): + self.add_copy_specs([ + "/etc/apparmor" + ]) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/apport.py b/sos/plugins/apport.py +index e3a02ef..b7f884f 100644 +--- a/sos/plugins/apport.py ++++ b/sos/plugins/apport.py +@@ -23,3 +23,5 @@ class Apport(Plugin, DebianPlugin, UbuntuPlugin): + + def setup(self): + self.add_copy_spec("/etc/apport/*") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/apt.py b/sos/plugins/apt.py +index ad2fe1a..8aea629 100644 +--- a/sos/plugins/apt.py ++++ b/sos/plugins/apt.py +@@ -29,3 +29,5 @@ class Apt(Plugin, DebianPlugin, UbuntuPlugin): + self.add_cmd_output("apt-config dump") + self.add_cmd_output("apt-cache stats") + self.add_cmd_output("apt-cache policy") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/ata.py b/sos/plugins/ata.py +index eb0f53f..f947455 100644 +--- a/sos/plugins/ata.py ++++ b/sos/plugins/ata.py +@@ -34,3 +34,5 @@ class Ata(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): + self.add_cmd_output("hdparm %s" % disk_path) + self.add_cmd_output("smartctl -a %s" % disk_path) + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/auditd.py b/sos/plugins/auditd.py +index c031e14..1f51306 100644 +--- a/sos/plugins/auditd.py ++++ b/sos/plugins/auditd.py +@@ -28,3 +28,5 @@ class Auditd(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + "/etc/audit/audit.rules"]) + self.add_copy_spec_limit("/var/log/audit*", + sizelimit = self.get_option("logsize")) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/autofs.py b/sos/plugins/autofs.py +index b1d264b..a4dbfea 100644 +--- a/sos/plugins/autofs.py ++++ b/sos/plugins/autofs.py +@@ -65,3 +65,5 @@ class DebianAutofs(Autofs, DebianPlugin, UbuntuPlugin): + def setup(self): + super(DebianAutofs, self).setup() + self.add_cmd_output("dpkg-query -s autofs") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/azure.py b/sos/plugins/azure.py +index 65ba9ac..6f16c75 100644 +--- a/sos/plugins/azure.py ++++ b/sos/plugins/azure.py +@@ -29,3 +29,5 @@ class Azure(Plugin, UbuntuPlugin): + "/etc/default/kv-kvp-daemon-init", + "/sys/module/hv_netvsc/parameters/ring_size", + "/sys/module/hv_storvsc/parameters/storvsc_ringbuffer_size"]) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/block.py b/sos/plugins/block.py +index 044345b..de0de81 100644 +--- a/sos/plugins/block.py ++++ b/sos/plugins/block.py +@@ -41,3 +41,5 @@ class Block(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + self.add_cmd_output("udevadm info -ap /sys/block/%s" % (disk)) + self.add_cmd_output("parted -s %s print" % (disk_path)) + self.add_cmd_output("fdisk -l %s" % disk_path) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/boot.py b/sos/plugins/boot.py +index bf50120..22ca155 100644 +--- a/sos/plugins/boot.py ++++ b/sos/plugins/boot.py +@@ -42,3 +42,5 @@ class Boot(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + continue + self.add_cmd_output("lsinitrd %s" % image) + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/ceph.py b/sos/plugins/ceph.py +index decd161..b408f8f 100644 +--- a/sos/plugins/ceph.py ++++ b/sos/plugins/ceph.py +@@ -42,3 +42,5 @@ class Ceph(Plugin, RedHatPlugin, UbuntuPlugin): + self.add_forbidden_path("/etc/ceph/*keyring") + self.add_forbidden_path("/var/lib/ceph/*/*keyring") + self.add_forbidden_path("/var/lib/ceph/*keyring") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/cgroups.py b/sos/plugins/cgroups.py +index 102b71c..6f34e64 100644 +--- a/sos/plugins/cgroups.py ++++ b/sos/plugins/cgroups.py +@@ -40,3 +40,5 @@ class RedHatCgroups(Cgroups, RedHatPlugin): + "/etc/cgconfig.conf", + "/etc/cgrules.conf"]) + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/cluster.py b/sos/plugins/cluster.py +index 0b839fa..f4ed405 100644 +--- a/sos/plugins/cluster.py ++++ b/sos/plugins/cluster.py +@@ -126,3 +126,5 @@ class Cluster(Plugin, RedHatPlugin): + r"(.*fence.*\.passwd=)(.*)", + r"\1******") + return ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/cobbler.py b/sos/plugins/cobbler.py +index b754813..061e2a6 100644 +--- a/sos/plugins/cobbler.py ++++ b/sos/plugins/cobbler.py +@@ -40,3 +40,5 @@ class DebianCobbler(Cobbler, DebianPlugin, UbuntuPlugin): + self.add_copy_spec("/var/log/cobbler") + self.add_copy_spec("/var/lib/cobbler") + self.add_forbidden_path("/var/lib/cobbler/isos") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/corosync.py b/sos/plugins/corosync.py +index 79333c2..e91a9d4 100644 +--- a/sos/plugins/corosync.py ++++ b/sos/plugins/corosync.py +@@ -51,3 +51,5 @@ class DebianCorosync(Corosync, DebianPlugin, UbuntuPlugin): + super(DebianCorosync, self).setup() + + files = ('/usr/sbin/corosync',) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/cron.py b/sos/plugins/cron.py +index f0f4856..ae2b479 100644 +--- a/sos/plugins/cron.py ++++ b/sos/plugins/cron.py +@@ -30,3 +30,5 @@ class Cron(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + ]) + self.add_cmd_output("crontab -l -u root", + suggest_filename = "root_crontab") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/cs.py b/sos/plugins/cs.py +index 3adf1f6..7ae79d3 100644 +--- a/sos/plugins/cs.py ++++ b/sos/plugins/cs.py +@@ -87,3 +87,5 @@ class CertificateSystem(Plugin, RedHatPlugin): + "/var/log/pki-*/ra-debug.log", + "/var/log/pki-*/transactions", + "/var/log/pki-*/system"]) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/cups.py b/sos/plugins/cups.py +index aaa3971..17ca3cc 100644 +--- a/sos/plugins/cups.py ++++ b/sos/plugins/cups.py +@@ -34,3 +34,5 @@ class Printing(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + self.add_cmd_output("lpstat -t") + self.add_cmd_output("lpstat -s") + self.add_cmd_output("lpstat -d") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/devicemapper.py b/sos/plugins/devicemapper.py +index 9e553c2..cc10268 100644 +--- a/sos/plugins/devicemapper.py ++++ b/sos/plugins/devicemapper.py +@@ -27,3 +27,5 @@ class DeviceMapper(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + self.add_cmd_output("dmsetup status") + self.add_cmd_output("dmsetup ls --tree") + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/dhcp.py b/sos/plugins/dhcp.py +index 71946c2..344e1e3 100644 +--- a/sos/plugins/dhcp.py ++++ b/sos/plugins/dhcp.py +@@ -44,3 +44,5 @@ class UbuntuDhcp(Dhcp, UbuntuPlugin): + "/etc/default/udhcpd", + "/etc/udhcpd.conf" + ]) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/distupgrade.py b/sos/plugins/distupgrade.py +index b45d099..d618dfc 100644 +--- a/sos/plugins/distupgrade.py ++++ b/sos/plugins/distupgrade.py +@@ -37,3 +37,5 @@ class RedHatDistUpgrade(DistUpgrade, RedHatPlugin): + ) + + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/dmraid.py b/sos/plugins/dmraid.py +index 12242bf..12613b5 100644 +--- a/sos/plugins/dmraid.py ++++ b/sos/plugins/dmraid.py +@@ -25,3 +25,5 @@ class Dmraid(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + def setup(self): + for opt in self.dmraid_options: + self.add_cmd_output("dmraid -%s" % (opt,)) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/dovecot.py b/sos/plugins/dovecot.py +index 2d92a6b..37e504b 100644 +--- a/sos/plugins/dovecot.py ++++ b/sos/plugins/dovecot.py +@@ -41,3 +41,5 @@ class DebianDovecot(Dovecot, DebianPlugin, UbuntuPlugin): + super(DebianDovecot, self).setup() + + files = ('/etc/dovecot/README',) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/dpkg.py b/sos/plugins/dpkg.py +index 1912e34..266b2ee 100644 +--- a/sos/plugins/dpkg.py ++++ b/sos/plugins/dpkg.py +@@ -24,3 +24,5 @@ class Dpkg(Plugin, DebianPlugin, UbuntuPlugin): + def setup(self): + self.add_copy_spec("/var/log/dpkg.log") + self.add_cmd_output("dpkg -l", root_symlink = "installed-debs") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/ds.py b/sos/plugins/ds.py +index 1bbcd64..7092701 100644 +--- a/sos/plugins/ds.py ++++ b/sos/plugins/ds.py +@@ -46,3 +46,5 @@ class DirectoryServer(Plugin, RedHatPlugin): + self.add_copy_specs([ + "/opt/redhat-ds/slapd-*/config", + "/opt/redhat-ds/slapd-*/logs"]) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/emc.py b/sos/plugins/emc.py +index 5a2495e..d5fb1ed 100644 +--- a/sos/plugins/emc.py ++++ b/sos/plugins/emc.py +@@ -219,3 +219,5 @@ class Emc(Plugin, RedHatPlugin): + ## Only provide About EMC if EMC products are installed + if add_about_emc != "no": + self.about_emc() ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/filesys.py b/sos/plugins/filesys.py +index 7564ddf..9deb75d 100644 +--- a/sos/plugins/filesys.py ++++ b/sos/plugins/filesys.py +@@ -48,3 +48,5 @@ class Filesys(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + ext_fs_regex = r"^(/dev/.+).+ext[234]\s+" + for dev in zip(self.do_regex_find_all(ext_fs_regex, mounts)): + self.add_cmd_output("dumpe2fs -h %s" % (dev)) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/foreman.py b/sos/plugins/foreman.py +index a2f2881..661c075 100644 +--- a/sos/plugins/foreman.py ++++ b/sos/plugins/foreman.py +@@ -27,3 +27,5 @@ class Foreman(Plugin, RedHatPlugin): + def setup(self): + self.add_cmd_output("%s -q -a -d %s" % ("foreman-debug", + self.get_cmd_output_path(name="foreman-debug"))) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/gdm.py b/sos/plugins/gdm.py +index 05601f3..3863813 100644 +--- a/sos/plugins/gdm.py ++++ b/sos/plugins/gdm.py +@@ -22,3 +22,5 @@ class Gdm(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + + def setup(self): + self.add_copy_spec("/etc/gdm/*") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/general.py b/sos/plugins/general.py +index a6964c4..0906de1 100644 +--- a/sos/plugins/general.py ++++ b/sos/plugins/general.py +@@ -78,3 +78,5 @@ class UbuntuGeneral(DebianGeneral): + def setup(self): + super(UbuntuGeneral, self).setup() + self.add_copy_spec("/etc/os-release") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/gluster.py b/sos/plugins/gluster.py +index 4286b59..d9c35d3 100644 +--- a/sos/plugins/gluster.py ++++ b/sos/plugins/gluster.py +@@ -113,3 +113,5 @@ class Gluster(Plugin, RedHatPlugin): + # collect this last as some of the other actions create log entries + self.add_copy_spec("/var/log/glusterfs") + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/grub.py b/sos/plugins/grub.py +index bdda115..cc4d593 100644 +--- a/sos/plugins/grub.py ++++ b/sos/plugins/grub.py +@@ -29,3 +29,5 @@ class Grub(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + "/etc/grub.d" + ]) + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/grub2.py b/sos/plugins/grub2.py +index fd86211..c9f64b0 100644 +--- a/sos/plugins/grub2.py ++++ b/sos/plugins/grub2.py +@@ -32,3 +32,5 @@ class Grub2(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + ]) + self.add_cmd_output("ls -lanR /boot") + self.add_cmd_output("grub2-mkconfig") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/hardware.py b/sos/plugins/hardware.py +index eda0060..f3c968e 100644 +--- a/sos/plugins/hardware.py ++++ b/sos/plugins/hardware.py +@@ -53,3 +53,5 @@ class DebianHardware(Hardware, DebianPlugin, UbuntuPlugin): + + def setup(self): + super(DebianHardware, self).setup() ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/hts.py b/sos/plugins/hts.py +index d514bf8..2200793 100644 +--- a/sos/plugins/hts.py ++++ b/sos/plugins/hts.py +@@ -23,3 +23,5 @@ class HardwareTestSuite(Plugin, RedHatPlugin): + def setup(self): + self.add_copy_spec("/etc/httpd/conf.d/hts.conf") + self.add_copy_spec("/var/hts") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/i18n.py b/sos/plugins/i18n.py +index 0361c55..dd2b36a 100644 +--- a/sos/plugins/i18n.py ++++ b/sos/plugins/i18n.py +@@ -23,3 +23,5 @@ class I18n(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + def setup(self): + self.add_copy_specs(["/etc/X11/xinit/xinput.d/*", "/etc/locale.conf"]) + self.add_cmd_output("locale") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/infiniband.py b/sos/plugins/infiniband.py +index e1288c9..2c890a5 100644 +--- a/sos/plugins/infiniband.py ++++ b/sos/plugins/infiniband.py +@@ -39,3 +39,5 @@ class Infiniband(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + self.add_cmd_output("ibhosts") + + return ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/ipa.py b/sos/plugins/ipa.py +index 0061659..2812939 100644 +--- a/sos/plugins/ipa.py ++++ b/sos/plugins/ipa.py +@@ -81,3 +81,5 @@ class Ipa(Plugin, RedHatPlugin): + subst = r"\1********" + self.do_file_sub("/etc/named.conf", match, subst) + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/ipsec.py b/sos/plugins/ipsec.py +index 1f00d51..b389432 100644 +--- a/sos/plugins/ipsec.py ++++ b/sos/plugins/ipsec.py +@@ -42,3 +42,5 @@ class DebianIPSec(IPSec, DebianPlugin, UbuntuPlugin): + self.add_copy_specs(["/etc/ipsec-tools.conf", + "/etc/ipsec-tools.d", + "/etc/default/setkey"]) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/iscsi.py b/sos/plugins/iscsi.py +index 2a49ee4..3dbecf4 100644 +--- a/sos/plugins/iscsi.py ++++ b/sos/plugins/iscsi.py +@@ -37,3 +37,5 @@ class RedHatIscsi(Iscsi, RedHatPlugin): + self.add_cmd_output("iscsiadm -m node -P 3") + self.add_cmd_output("iscsiadm -m iface -P 1") + self.add_cmd_output("iscsiadm -m node --op=show") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/iscsitarget.py b/sos/plugins/iscsitarget.py +index a3a3e7e..d91c222 100644 +--- a/sos/plugins/iscsitarget.py ++++ b/sos/plugins/iscsitarget.py +@@ -47,3 +47,5 @@ class DebianIscsiTarget(IscsiTarget, DebianPlugin, UbuntuPlugin): + "/etc/sysctl.d/30-iscsitarget.conf", + "/etc/default/iscsitarget" + ]) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/java.py b/sos/plugins/java.py +index bad726c..d316bc1 100644 +--- a/sos/plugins/java.py ++++ b/sos/plugins/java.py +@@ -27,3 +27,5 @@ class Java(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): + root_symlink="java") + self.add_cmd_output("readlink -f /usr/bin/java") + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/juju.py b/sos/plugins/juju.py +index c7bbdf1..ef2cdbf 100644 +--- a/sos/plugins/juju.py ++++ b/sos/plugins/juju.py +@@ -28,3 +28,5 @@ class Juju(Plugin, UbuntuPlugin): + + self.add_cmd_output("juju -v status") + self.add_cmd_output("juju -v get-constraints") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/katello.py b/sos/plugins/katello.py +index acf5d90..6fd0fb7 100644 +--- a/sos/plugins/katello.py ++++ b/sos/plugins/katello.py +@@ -27,3 +27,5 @@ class Katello(Plugin, RedHatPlugin): + def setup(self): + self.add_cmd_output("katello-debug --notar -d %s" + % self.get_cmd_output_path(name="katello-debug")) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/kdump.py b/sos/plugins/kdump.py +index 81ce574..460d69e 100644 +--- a/sos/plugins/kdump.py ++++ b/sos/plugins/kdump.py +@@ -50,3 +50,5 @@ class DebianKDump(KDump, DebianPlugin, UbuntuPlugin): + self.add_copy_specs([ + "/etc/default/kdump-tools" + ]) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/kernel.py b/sos/plugins/kernel.py +index f96fe6c..d40f549 100644 +--- a/sos/plugins/kernel.py ++++ b/sos/plugins/kernel.py +@@ -66,3 +66,5 @@ class Kernel(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + ]) + + self.add_cmd_output("dkms status") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/kernelrt.py b/sos/plugins/kernelrt.py +index b5fdc5d..ad5c4e7 100644 +--- a/sos/plugins/kernelrt.py ++++ b/sos/plugins/kernelrt.py +@@ -35,3 +35,5 @@ class KernelRT(Plugin, RedHatPlugin): + self.add_copy_spec('/sys/devices/system/clocksource/clocksource0/current_clocksource') + if self.is_installed('tuna'): + self.add_cmd_output('tuna -CP | /usthead -20') ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/krb5.py b/sos/plugins/krb5.py +index 0d33094..78a8c6a 100644 +--- a/sos/plugins/krb5.py ++++ b/sos/plugins/krb5.py +@@ -26,3 +26,5 @@ class Krb5(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + self.add_copy_spec("/etc/krb5.conf") + self.add_cmd_output("klist -ket /etc/krb5.keytab") + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/kvm.py b/sos/plugins/kvm.py +index a0c44c1..51b8488 100644 +--- a/sos/plugins/kvm.py ++++ b/sos/plugins/kvm.py +@@ -42,3 +42,5 @@ class Kvm(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + def postproc(self): + if self._debugfs_cleanup and os.path.ismount("/sys/kernel/debug"): + os.popen("umount /sys/kernel/debug") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/landscape.py b/sos/plugins/landscape.py +index 4096039..699786f 100644 +--- a/sos/plugins/landscape.py ++++ b/sos/plugins/landscape.py +@@ -71,3 +71,5 @@ class Landscape(Plugin, UbuntuPlugin): + ) + + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/ldap.py b/sos/plugins/ldap.py +index 79d8394..eb8e755 100644 +--- a/sos/plugins/ldap.py ++++ b/sos/plugins/ldap.py +@@ -82,3 +82,5 @@ class DebianLdap(Ldap, DebianPlugin, UbuntuPlugin): + self.do_cmd_output_sub( + "ldapsearch -Q -LLL -Y EXTERNAL -H ldapi:/// -b cn=config '(!(objectClass=olcSchemaConfig))'", + r"(olcRootPW\: \s*)\S+", r"\1********") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/libraries.py b/sos/plugins/libraries.py +index 1ab5f17..b6e6195 100644 +--- a/sos/plugins/libraries.py ++++ b/sos/plugins/libraries.py +@@ -28,3 +28,5 @@ class Libraries(Plugin, RedHatPlugin, UbuntuPlugin): + if self.get_option("ldconfigv"): + self.add_cmd_output("ldconfig -v -N -X") + self.add_cmd_output("ldconfig -p -N -X") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/libvirt.py b/sos/plugins/libvirt.py +index e525f1b..c031409 100644 +--- a/sos/plugins/libvirt.py ++++ b/sos/plugins/libvirt.py +@@ -29,3 +29,5 @@ class Libvirt(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): + self.do_file_sub(xmlfile, + r"(\s*passwd=\s*')([^']*)('.*$)", + r"\1******\3") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/lilo.py b/sos/plugins/lilo.py +index 237cfc6..46c1814 100644 +--- a/sos/plugins/lilo.py ++++ b/sos/plugins/lilo.py +@@ -24,3 +24,5 @@ class Lilo(Plugin, RedHatPlugin, UbuntuPlugin): + def setup(self): + self.add_copy_spec("/etc/lilo.conf") + self.add_cmd_output("lilo -q") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/logrotate.py b/sos/plugins/logrotate.py +index c4b1fc5..1ab4410 100644 +--- a/sos/plugins/logrotate.py ++++ b/sos/plugins/logrotate.py +@@ -26,3 +26,5 @@ class LogRotate(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + self.add_copy_specs([ + "/etc/logrotate*", + "/var/lib/logrotate.status"]) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/logs.py b/sos/plugins/logs.py +index 7e7545f..1cd767c 100644 +--- a/sos/plugins/logs.py ++++ b/sos/plugins/logs.py +@@ -85,3 +85,5 @@ class UbuntuLogs(Logs, UbuntuPlugin): + "/var/log/landscape", + ]) + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/lsbrelease.py b/sos/plugins/lsbrelease.py +index e364a17..7a8ceed 100644 +--- a/sos/plugins/lsbrelease.py ++++ b/sos/plugins/lsbrelease.py +@@ -26,3 +26,5 @@ class LsbRelease(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + self.add_cmd_output("lsb_release -a") + self.add_cmd_output("lsb_release -d", suggest_filename = "lsb_release", root_symlink = "lsb-release") + self.add_copy_spec("/etc/lsb-release*") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/lvm2.py b/sos/plugins/lvm2.py +index 102df26..82f7255 100644 +--- a/sos/plugins/lvm2.py ++++ b/sos/plugins/lvm2.py +@@ -53,3 +53,5 @@ class Lvm2(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + self.do_lvmdump(metadata=True) + + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/maas.py b/sos/plugins/maas.py +index 4ed94d4..af0db3d 100644 +--- a/sos/plugins/maas.py ++++ b/sos/plugins/maas.py +@@ -34,3 +34,5 @@ class Maas(Plugin, UbuntuPlugin): + self.add_cmd_output("apt-cache policy maas-*") + self.add_cmd_output("apt-cache policy python-django-*") + self.add_cmd_output("maas dumpdata") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/md.py b/sos/plugins/md.py +index ecba0f7..2f9e8ef 100644 +--- a/sos/plugins/md.py ++++ b/sos/plugins/md.py +@@ -29,3 +29,5 @@ class Md(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + "/dev/md/md-device-map" + ]) + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/memory.py b/sos/plugins/memory.py +index 0b26a84..f2ec27c 100644 +--- a/sos/plugins/memory.py ++++ b/sos/plugins/memory.py +@@ -32,3 +32,5 @@ class Memory(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + suggest_filename="dmesg.e820-map") + self.add_cmd_output("free", root_symlink = "free") + self.add_cmd_output("free -m") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/mrggrid.py b/sos/plugins/mrggrid.py +index a8e7e35..05fde9b 100644 +--- a/sos/plugins/mrggrid.py ++++ b/sos/plugins/mrggrid.py +@@ -23,3 +23,5 @@ class MrgGrid(Plugin, RedHatPlugin): + def setup(self): + self.add_copy_spec("/etc/condor/condor_config") + self.add_copy_spec("condor_status") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/mrgmessg.py b/sos/plugins/mrgmessg.py +index 4e85db6..f29ce74 100644 +--- a/sos/plugins/mrgmessg.py ++++ b/sos/plugins/mrgmessg.py +@@ -25,3 +25,5 @@ class MrgMessg(Plugin, RedHatPlugin): + "/etc/qpidd.conf", + "/etc/sasl2/qpidd.conf", + "/var/rhm"]) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/multipath.py b/sos/plugins/multipath.py +index 7917352..0eceadf 100644 +--- a/sos/plugins/multipath.py ++++ b/sos/plugins/multipath.py +@@ -30,3 +30,5 @@ class Multipath(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + self.add_cmd_output("multipath -v4 -ll") + + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/mysql.py b/sos/plugins/mysql.py +index e3c971f..b168e13 100644 +--- a/sos/plugins/mysql.py ++++ b/sos/plugins/mysql.py +@@ -50,3 +50,5 @@ class DebianMysql(Mysql, DebianPlugin, UbuntuPlugin): + self.mysql_cnf = "/etc/mysql/my.cnf" + super(DebianMysql, self).setup() + self.add_copy_spec("/etc/mysql/conf.d/mysql*") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/named.py b/sos/plugins/named.py +index e73bf42..6c68091 100644 +--- a/sos/plugins/named.py ++++ b/sos/plugins/named.py +@@ -84,3 +84,5 @@ class DebianNamed(Named, DebianPlugin, UbuntuPlugin): + self.add_copy_spec("/etc/bind/") + return + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/networking.py b/sos/plugins/networking.py +index 598d375..ce5b3aa 100644 +--- a/sos/plugins/networking.py ++++ b/sos/plugins/networking.py +@@ -153,3 +153,5 @@ class UbuntuNetworking(Networking, UbuntuPlugin): + if self.get_option("traceroute"): + self.add_cmd_output("/usr/sbin/traceroute -n %s" % self.trace_host) + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/neutron.py b/sos/plugins/neutron.py +index 2317433..2200606 100644 +--- a/sos/plugins/neutron.py ++++ b/sos/plugins/neutron.py +@@ -176,3 +176,5 @@ class RedHatNeutron(Neutron, RedHatPlugin): + super(RedHatNeutron, self).setup() + self.packages = self.gen_pkg_tuple(self.package_list_template) + self.add_copy_specs(["/etc/sudoers.d/%s-rootwrap" % self.component_name]) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/nfs.py b/sos/plugins/nfs.py +index 2e00333..5b6ffa0 100644 +--- a/sos/plugins/nfs.py ++++ b/sos/plugins/nfs.py +@@ -29,3 +29,5 @@ class Nfs(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + ]) + return + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/nfsserver.py b/sos/plugins/nfsserver.py +index 7ae704e..5ba8c4b 100644 +--- a/sos/plugins/nfsserver.py ++++ b/sos/plugins/nfsserver.py +@@ -49,3 +49,5 @@ class NfsServer(Plugin, RedHatPlugin): + self.add_cmd_output("rpcinfo -p localhost") + self.add_cmd_output("nfsstat -o all") + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/nis.py b/sos/plugins/nis.py +index baa71e8..cec8aaa 100644 +--- a/sos/plugins/nis.py ++++ b/sos/plugins/nis.py +@@ -30,3 +30,5 @@ class Nis(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + self.add_copy_spec("/etc/yp*.conf") + self.add_copy_spec("/var/yp/*") + self.add_cmd_output("domainname") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/nscd.py b/sos/plugins/nscd.py +index 91a31ef..339f52e 100644 +--- a/sos/plugins/nscd.py ++++ b/sos/plugins/nscd.py +@@ -37,3 +37,5 @@ class Nscd(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + f = o.split() + self.add_copy_spec_limit(f[1], + sizelimit = self.option_enabled("nscdlogsize")) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/ntp.py b/sos/plugins/ntp.py +index 639b292..0fba6f2 100644 +--- a/sos/plugins/ntp.py ++++ b/sos/plugins/ntp.py +@@ -49,3 +49,5 @@ class DebianNtp(Ntp, DebianPlugin, UbuntuPlugin): + super(DebianNtp, self).setup() + self.add_copy_spec('/etc/default/ntp') + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/oddjob.py b/sos/plugins/oddjob.py +index 473a691..ea168eb 100644 +--- a/sos/plugins/oddjob.py ++++ b/sos/plugins/oddjob.py +@@ -29,3 +29,5 @@ class Oddjob(Plugin, RedHatPlugin): + self.add_copy_spec("/etc/oddjobd.conf") + self.add_copy_spec("/etc/oddjobd.conf.d") + self.add_copy_spec("/etc/dbus-1/system.d/oddjob.conf") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/openhpi.py b/sos/plugins/openhpi.py +index dbe004d..80053ed 100644 +--- a/sos/plugins/openhpi.py ++++ b/sos/plugins/openhpi.py +@@ -31,3 +31,5 @@ class OpenHPI(Plugin, RedHatPlugin): + self.do_file_sub("/etc/openhpi/openhpi.conf", + r'(\s*[Pp]ass.*\s*=\s*).*', r'\1********') + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/openshift.py b/sos/plugins/openshift.py +index 459e75e..4eaf236 100644 +--- a/sos/plugins/openshift.py ++++ b/sos/plugins/openshift.py +@@ -70,3 +70,5 @@ class Openshift(Plugin, RedHatPlugin): + self.do_file_sub('/etc/openshift/htpasswd', + r"(.*:)(.*)", + r"\1********") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/openssl.py b/sos/plugins/openssl.py +index c73181b..261ad07 100644 +--- a/sos/plugins/openssl.py ++++ b/sos/plugins/openssl.py +@@ -53,3 +53,5 @@ class DebianOpenSSL(OpenSSL, DebianPlugin, UbuntuPlugin): + def setup(self): + super(DebianOpenSSL, self).setup() + self.add_copy_spec("/etc/ssl/openssl.cnf") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/openstack_ceilometer.py b/sos/plugins/openstack_ceilometer.py +index 524b68b..4b877d6 100644 +--- a/sos/plugins/openstack_ceilometer.py ++++ b/sos/plugins/openstack_ceilometer.py +@@ -51,3 +51,5 @@ class RedHatOpenStackCeilometer(OpenStackCeilometer, plugins.RedHatPlugin): + 'openstack-ceilometer-common', + 'openstack-ceilometer-compute', + 'python-ceilometerclient') ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/openstack_cinder.py b/sos/plugins/openstack_cinder.py +index 97eb8fb..41f99c4 100644 +--- a/sos/plugins/openstack_cinder.py ++++ b/sos/plugins/openstack_cinder.py +@@ -79,3 +79,5 @@ class RedHatOpenStackCinder(OpenStackCinder, RedHatPlugin): + super(RedHatOpenStackCinder, self).setup() + self.add_copy_specs(["/etc/sudoers.d/cinder"]) + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/openstack_glance.py b/sos/plugins/openstack_glance.py +index 134d23f..ae8851e 100644 +--- a/sos/plugins/openstack_glance.py ++++ b/sos/plugins/openstack_glance.py +@@ -52,3 +52,5 @@ class RedHatOpenStackGlance(OpenStackGlance, plugins.RedHatPlugin): + + packages = ('openstack-glance', + 'python-glanceclient') ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/openstack_heat.py b/sos/plugins/openstack_heat.py +index 15c26c9..68989bb 100644 +--- a/sos/plugins/openstack_heat.py ++++ b/sos/plugins/openstack_heat.py +@@ -57,3 +57,5 @@ class RedHatOpenStack(OpenStackHeat, plugins.RedHatPlugin): + 'openstack-heat-common', + 'openstack-heat-engine', + 'python-heatclient') ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/openstack_horizon.py b/sos/plugins/openstack_horizon.py +index 31ee561..c814b01 100644 +--- a/sos/plugins/openstack_horizon.py ++++ b/sos/plugins/openstack_horizon.py +@@ -72,3 +72,5 @@ class RedHatOpenStackHorizon(OpenStackHorizon, RedHatPlugin): + self.add_copy_specs(["/etc/httpd/conf.d/openstack-dashboard.conf"]) + if self.option_enabled("log"): + self.add_copy_specs(["/var/log/httpd/"]) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/openstack_keystone.py b/sos/plugins/openstack_keystone.py +index 0f3b654..6e94558 100644 +--- a/sos/plugins/openstack_keystone.py ++++ b/sos/plugins/openstack_keystone.py +@@ -71,3 +71,5 @@ class RedHatOpenStackKeystone(OpenStackKeystone, RedHatPlugin): + 'python-keystone', + 'python-django-openstack-auth', + 'python-keystoneclient') ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/openstack_neutron.py b/sos/plugins/openstack_neutron.py +index d063a7c..bda9c5e 100644 +--- a/sos/plugins/openstack_neutron.py ++++ b/sos/plugins/openstack_neutron.py +@@ -88,3 +88,5 @@ class RedHatOpenStackNeutron(OpenStackNeutron, RedHatPlugin): + + def setup(self): + super(RedHatOpenStackNeutron, self).setup() ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/openstack_nova.py b/sos/plugins/openstack_nova.py +index 2e7c956..d294d16 100644 +--- a/sos/plugins/openstack_nova.py ++++ b/sos/plugins/openstack_nova.py +@@ -142,3 +142,5 @@ class RedHatOpenStackNova(OpenStackNova, RedHatPlugin): + "/etc/sudoers.d/nova", + "/etc/security/limits.d/91-nova.conf", + "/etc/sysconfig/openstack-nova-novncproxy"]) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/openstack_swift.py b/sos/plugins/openstack_swift.py +index 1b67484..2514323 100644 +--- a/sos/plugins/openstack_swift.py ++++ b/sos/plugins/openstack_swift.py +@@ -52,3 +52,5 @@ class RedHatOpenStackSwift(OpenStackSwift, plugins.RedHatPlugin): + 'openstack-swift-proxy', + 'swift', + 'python-swiftclient') ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/openswan.py b/sos/plugins/openswan.py +index c99968c..0712c76 100644 +--- a/sos/plugins/openswan.py ++++ b/sos/plugins/openswan.py +@@ -35,3 +35,5 @@ class Openswan(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + self.add_cmd_output("ipsec verify") + if self.get_option("ipsec-barf"): + self.add_cmd_output("ipsec barf") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/pam.py b/sos/plugins/pam.py +index 307a405..c78d4f9 100644 +--- a/sos/plugins/pam.py ++++ b/sos/plugins/pam.py +@@ -43,3 +43,5 @@ class DebianPam(Pam, DebianPlugin, UbuntuPlugin): + def setup(self): + super(DebianPam, self).setup() + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/pci.py b/sos/plugins/pci.py +index 390776f..e15b978 100644 +--- a/sos/plugins/pci.py ++++ b/sos/plugins/pci.py +@@ -34,3 +34,5 @@ class Pci(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): + self.add_cmd_output("lspci -tv") + + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/postfix.py b/sos/plugins/postfix.py +index 6f0f9b4..0300a5b 100644 +--- a/sos/plugins/postfix.py ++++ b/sos/plugins/postfix.py +@@ -48,3 +48,5 @@ class DebianPostfix(Postfix, DebianPlugin, UbuntuPlugin): + def setup(self): + super(DebianPostfix, self).setup() + self.add_copy_spec("/etc/postfix/dynamicmaps.cf") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/postgresql.py b/sos/plugins/postgresql.py +index cc51195..69084af 100644 +--- a/sos/plugins/postgresql.py ++++ b/sos/plugins/postgresql.py +@@ -148,4 +148,5 @@ class DebianPostgreSQL(PostgreSQL, DebianPlugin, UbuntuPlugin): + self.add_copy_spec("/var/lib/postgresql/*/main/PG_VERSION") + self.add_copy_spec("/var/lib/postgresql/*/main/postmaster.opts") + +-# vim: expandtab tabstop=4 shiftwidth=4 ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/powerpc.py b/sos/plugins/powerpc.py +index 9681094..11ce56d 100644 +--- a/sos/plugins/powerpc.py ++++ b/sos/plugins/powerpc.py +@@ -76,3 +76,5 @@ class PowerPC(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): + if os.path.isdir("/var/log/dump"): + self.add_cmd_output("ls -l /var/log/dump") + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/ppp.py b/sos/plugins/ppp.py +index edb3eb4..a0446a5 100644 +--- a/sos/plugins/ppp.py ++++ b/sos/plugins/ppp.py +@@ -30,3 +30,5 @@ class Ppp(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + "/etc/ppp", + "/var/log/ppp"]) + self.add_cmd_output("adsl-status") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/procenv.py b/sos/plugins/procenv.py +index d413cd1..e776e14 100644 +--- a/sos/plugins/procenv.py ++++ b/sos/plugins/procenv.py +@@ -23,3 +23,5 @@ class Procenv(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + + def setup(self): + self.add_cmd_output('procenv') ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/process.py b/sos/plugins/process.py +index 02eaa58..6d8f640 100644 +--- a/sos/plugins/process.py ++++ b/sos/plugins/process.py +@@ -27,3 +27,5 @@ class Process(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + self.add_cmd_output("ps alxwww") + self.add_cmd_output("pstree", root_symlink = "pstree") + self.add_cmd_output("lsof -b +M -n -l", root_symlink = "lsof") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/processor.py b/sos/plugins/processor.py +index 3b21894..391c64f 100644 +--- a/sos/plugins/processor.py ++++ b/sos/plugins/processor.py +@@ -45,3 +45,5 @@ class Processor(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): + self.add_cmd_output("lscpu") + + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/psacct.py b/sos/plugins/psacct.py +index 74bd9f0..dadd62a 100644 +--- a/sos/plugins/psacct.py ++++ b/sos/plugins/psacct.py +@@ -49,3 +49,5 @@ class DebianPsacct(Psacct, DebianPlugin, UbuntuPlugin): + self.add_copy_specs(["/var/log/account/pacct", "/etc/default/acct"]) + if self.get_option("all"): + self.add_copy_spec("/var/log/account/pacct*.gz") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/pxe.py b/sos/plugins/pxe.py +index fcb1a4b..7a552e8 100644 +--- a/sos/plugins/pxe.py ++++ b/sos/plugins/pxe.py +@@ -51,3 +51,5 @@ class DebianPxe(Pxe, DebianPlugin, UbuntuPlugin): + self.add_copy_spec("/etc/default/tftpd-hpa") + if self.get_option("tftpboot"): + self.add_copy_spec("/var/lib/tftpboot") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/qpid.py b/sos/plugins/qpid.py +index cee8443..2fda9a4 100644 +--- a/sos/plugins/qpid.py ++++ b/sos/plugins/qpid.py +@@ -50,3 +50,5 @@ class Qpid(Plugin, RedHatPlugin): + "/var/log/sesame", + "/var/log/cumin", + "/var/log/cluster"]) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/quagga.py b/sos/plugins/quagga.py +index 909f9d4..88a41a7 100644 +--- a/sos/plugins/quagga.py ++++ b/sos/plugins/quagga.py +@@ -27,3 +27,5 @@ class Quagga(Plugin, RedHatPlugin): + + def setup(self): + self.add_copy_spec("/etc/quagga/") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/radius.py b/sos/plugins/radius.py +index 427fd25..a64ea35 100644 +--- a/sos/plugins/radius.py ++++ b/sos/plugins/radius.py +@@ -48,3 +48,5 @@ class DebianRadius(Radius, DebianPlugin, UbuntuPlugin): + "/etc/pam.d/radiusd", + "/etc/default/freeradius", + "/var/log/freeradius"]) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/rhui.py b/sos/plugins/rhui.py +index f0413b4..a0ef512 100644 +--- a/sos/plugins/rhui.py ++++ b/sos/plugins/rhui.py +@@ -37,3 +37,5 @@ class Rhui(Plugin, RedHatPlugin): + % (self.rhui_debug_path, cds, rhui_debug_dst_path), + suggest_filename="rhui-debug") + return ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/rpm.py b/sos/plugins/rpm.py +index 55c8019..6c1529c 100644 +--- a/sos/plugins/rpm.py ++++ b/sos/plugins/rpm.py +@@ -53,3 +53,5 @@ class Rpm(Plugin, RedHatPlugin): + or pkg.endswith('-debuginfo-common'): + continue + self.add_cmd_output("rpm -V %s" % pkg) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/s390.py b/sos/plugins/s390.py +index ed9546b..7645b1b 100644 +--- a/sos/plugins/s390.py ++++ b/sos/plugins/s390.py +@@ -65,3 +65,5 @@ class S390(Plugin, RedHatPlugin): + self.add_cmd_output("dasdview -x -i -j -l -f %s" % (x,)) + self.add_cmd_output("fdasd -p %s" % (x,)) + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/samba.py b/sos/plugins/samba.py +index f3dc862..6efab2f 100644 +--- a/sos/plugins/samba.py ++++ b/sos/plugins/samba.py +@@ -28,3 +28,5 @@ class Samba(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + self.add_cmd_output("wbinfo --domain='.' -u") + self.add_cmd_output("testparm -s -v") + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/sanlock.py b/sos/plugins/sanlock.py +index 232dd00..4386f3f 100644 +--- a/sos/plugins/sanlock.py ++++ b/sos/plugins/sanlock.py +@@ -34,3 +34,5 @@ class RedHatSANLock(SANLock, RedHatPlugin): + def setup(self): + super(RedHatSANLock, self).setup() + self.add_copy_spec("/etc/sysconfig/sanlock") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/sar.py b/sos/plugins/sar.py +index 470d82f..56cc637 100644 +--- a/sos/plugins/sar.py ++++ b/sos/plugins/sar.py +@@ -66,3 +66,5 @@ class DebianSar(Sar, DebianPlugin, UbuntuPlugin): + """ + + sa_path = '/var/log/sysstat' ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/satellite.py b/sos/plugins/satellite.py +index 28c8bca..936f3c5 100644 +--- a/sos/plugins/satellite.py ++++ b/sos/plugins/satellite.py +@@ -81,3 +81,5 @@ class Satellite(Plugin, RedHatPlugin): + + if self.proxy: + self.add_copy_specs(["/etc/squid", "/var/log/squid"]) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/scsi.py b/sos/plugins/scsi.py +index a3f8175..84570b6 100644 +--- a/sos/plugins/scsi.py ++++ b/sos/plugins/scsi.py +@@ -35,3 +35,5 @@ class Scsi(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): + + self.add_cmd_output("lsscsi") + self.add_cmd_output("sg_map") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/selinux.py b/sos/plugins/selinux.py +index 4b403ea..14d3679 100644 +--- a/sos/plugins/selinux.py ++++ b/sos/plugins/selinux.py +@@ -43,3 +43,5 @@ class SELinux(Plugin, RedHatPlugin): + self.add_cmd_output("semanage login -l") + self.add_cmd_output("semanage port -l") + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/sendmail.py b/sos/plugins/sendmail.py +index 4efbf95..1e25e32 100644 +--- a/sos/plugins/sendmail.py ++++ b/sos/plugins/sendmail.py +@@ -47,3 +47,5 @@ class DebianSendmail(Sendmail, DebianPlugin, UbuntuPlugin): + def setup(self): + super(DebianSendmail, self).setup() + self.add_copy_specs(["/etc/mail/*", "/var/log/mail.*"]) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/smartcard.py b/sos/plugins/smartcard.py +index 207f07a..65d4a11 100644 +--- a/sos/plugins/smartcard.py ++++ b/sos/plugins/smartcard.py +@@ -33,3 +33,5 @@ class Smartcard(Plugin, RedHatPlugin): + self.add_cmd_output("pkcs11_inspect debug") + self.add_cmd_output("pklogin_finder debug") + self.add_cmd_output("ls -nl /usr/lib*/pam_pkcs11/") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/snmp.py b/sos/plugins/snmp.py +index 177c0e2..a9026d1 100644 +--- a/sos/plugins/snmp.py ++++ b/sos/plugins/snmp.py +@@ -44,3 +44,5 @@ class DebianSnmp(Snmp, DebianPlugin, UbuntuPlugin): + + def setup(self): + super(DebianSnmp, self).setup() ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/soundcard.py b/sos/plugins/soundcard.py +index b92b4c5..6b13a2d 100644 +--- a/sos/plugins/soundcard.py ++++ b/sos/plugins/soundcard.py +@@ -52,3 +52,5 @@ class DebianSoundcard(Soundcard, DebianPlugin, UbuntuPlugin): + super(DebianSoundcard, self).setup() + + self.add_copy_spec("/etc/pulse/*") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/squid.py b/sos/plugins/squid.py +index bf6579b..7ef96f2 100644 +--- a/sos/plugins/squid.py ++++ b/sos/plugins/squid.py +@@ -45,3 +45,5 @@ class DebianSquid(Squid, DebianPlugin, UbuntuPlugin): + def setup(self): + self.add_copy_spec_limit("/etc/squid3/squid.conf", + sizelimit=self.get_option('logsize')) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/ssh.py b/sos/plugins/ssh.py +index 1abfc2a..0900818 100644 +--- a/sos/plugins/ssh.py ++++ b/sos/plugins/ssh.py +@@ -24,3 +24,5 @@ class Ssh(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + + def setup(self): + self.add_copy_specs(["/etc/ssh/ssh_config", "/etc/ssh/sshd_config"]) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/sssd.py b/sos/plugins/sssd.py +index 0d201f4..40d88db 100644 +--- a/sos/plugins/sssd.py ++++ b/sos/plugins/sssd.py +@@ -48,3 +48,5 @@ class DebianSssd(Sssd, DebianPlugin, UbuntuPlugin): + def setup(self): + super(DebianSssd, self).setup() + self.add_copy_specs(["/etc/default/sssd"]) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/startup.py b/sos/plugins/startup.py +index 76d85ef..60d4086 100644 +--- a/sos/plugins/startup.py ++++ b/sos/plugins/startup.py +@@ -46,3 +46,5 @@ class DebianStartup(Startup, DebianPlugin, UbuntuPlugin): + self.add_cmd_output("/sbin/initctl show-config", root_symlink = "initctl") + if self.get_option('servicestatus'): + self.add_cmd_output("/sbin/initctl list") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/sunrpc.py b/sos/plugins/sunrpc.py +index 3dab2ce..124f2fa 100644 +--- a/sos/plugins/sunrpc.py ++++ b/sos/plugins/sunrpc.py +@@ -52,3 +52,5 @@ class RedHatSunRPC(SunRPC, RedHatPlugin): + # return + + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/system.py b/sos/plugins/system.py +index a7e3eda..a819224 100644 +--- a/sos/plugins/system.py ++++ b/sos/plugins/system.py +@@ -27,3 +27,5 @@ class System(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + self.add_forbidden_path( + "/proc/sys/net/ipv6/neigh/*/base_reachable_time") + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/systemd.py b/sos/plugins/systemd.py +index 38be63e..acb2bf9 100644 +--- a/sos/plugins/systemd.py ++++ b/sos/plugins/systemd.py +@@ -47,3 +47,5 @@ class Systemd(Plugin, RedHatPlugin): + "/etc/vconsole.conf", + "/etc/yum/protected.d/systemd.conf"]) + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/systemtap.py b/sos/plugins/systemtap.py +index 213dcdb..e58537b 100644 +--- a/sos/plugins/systemtap.py ++++ b/sos/plugins/systemtap.py +@@ -28,3 +28,5 @@ class SystemTap(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + def setup(self): + self.add_cmd_output("stap -V 2") + self.add_cmd_output("uname -r") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/sysvipc.py b/sos/plugins/sysvipc.py +index d8b68fe..1d4260c 100644 +--- a/sos/plugins/sysvipc.py ++++ b/sos/plugins/sysvipc.py +@@ -27,3 +27,5 @@ class SysVIPC(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + "/proc/sysvipc/sem", + "/proc/sysvipc/shm"]) + self.add_cmd_output("ipcs") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/tftpserver.py b/sos/plugins/tftpserver.py +index c6089ed..49c69b5 100644 +--- a/sos/plugins/tftpserver.py ++++ b/sos/plugins/tftpserver.py +@@ -27,3 +27,5 @@ class TftpServer(Plugin, RedHatPlugin): + + def setup(self): + self.add_cmd_output("ls -lanR /tftpboot") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/tomcat.py b/sos/plugins/tomcat.py +index d4e1ac6..60b4180 100644 +--- a/sos/plugins/tomcat.py ++++ b/sos/plugins/tomcat.py +@@ -24,3 +24,5 @@ class Tomcat(Plugin, RedHatPlugin): + + def setup(self): + self.add_copy_specs(["/etc/tomcat5", "/var/log/tomcat5"]) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/tuned.py b/sos/plugins/tuned.py +index 60c22bc..196a41c 100644 +--- a/sos/plugins/tuned.py ++++ b/sos/plugins/tuned.py +@@ -28,3 +28,5 @@ class Tuned(Plugin, RedHatPlugin): + self.add_cmd_output("tuned-adm recommend") + self.add_copy_spec("/var/log/tuned/tuned.log") + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/udev.py b/sos/plugins/udev.py +index 47f2d26..e554a88 100644 +--- a/sos/plugins/udev.py ++++ b/sos/plugins/udev.py +@@ -26,3 +26,5 @@ class Udev(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + "/lib/udev/rules.d", + "/etc/udev/rules.d/*" + ]) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/upstart.py b/sos/plugins/upstart.py +index 5aa0e1d..1d088a6 100644 +--- a/sos/plugins/upstart.py ++++ b/sos/plugins/upstart.py +@@ -39,3 +39,5 @@ class Upstart(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + # Session Jobs (running Upstart as a Session Init) + self.add_copy_spec('/usr/share/upstart/') + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/usb.py b/sos/plugins/usb.py +index 8e58317..49ffadb 100644 +--- a/sos/plugins/usb.py ++++ b/sos/plugins/usb.py +@@ -30,3 +30,5 @@ class Usb(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + self.add_cmd_output("lsusb -t") + + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/veritas.py b/sos/plugins/veritas.py +index 4a2ce57..38824df 100644 +--- a/sos/plugins/veritas.py ++++ b/sos/plugins/veritas.py +@@ -40,3 +40,5 @@ class Veritas(Plugin, RedHatPlugin): + self.add_copy_spec(tarfile[0]) + except AttributeError as e: + self.add_alert(e) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/vmware.py b/sos/plugins/vmware.py +index 3a23dd3..b583d5c 100644 +--- a/sos/plugins/vmware.py ++++ b/sos/plugins/vmware.py +@@ -27,3 +27,5 @@ class VMWare(Plugin, RedHatPlugin): + self.add_copy_specs(["/etc/vmware/locations", + "/etc/vmware/config", + "/proc/vmmemctl"]) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/vsftpd.py b/sos/plugins/vsftpd.py +index 4cf58cf..787f99e 100644 +--- a/sos/plugins/vsftpd.py ++++ b/sos/plugins/vsftpd.py +@@ -26,3 +26,5 @@ class Vsftpd(Plugin, RedHatPlugin): + def setup(self): + self.add_copy_spec("/etc/ftp*") + self.add_copy_spec("/etc/vsftpd") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/x11.py b/sos/plugins/x11.py +index 15730c6..7a548f4 100644 +--- a/sos/plugins/x11.py ++++ b/sos/plugins/x11.py +@@ -30,3 +30,5 @@ class X11(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + ]) + self.add_forbidden_path("/etc/X11/X") + self.add_forbidden_path("/etc/X11/fontpath.d") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/xen.py b/sos/plugins/xen.py +index 1bbeaf5..fef356b 100644 +--- a/sos/plugins/xen.py ++++ b/sos/plugins/xen.py +@@ -98,3 +98,5 @@ class Xen(Plugin, RedHatPlugin): + return #USEFUL + + self.add_custom_text("Xen hostType: "+host_type) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/xfs.py b/sos/plugins/xfs.py +index 1f4dd50..3bef675 100644 +--- a/sos/plugins/xfs.py ++++ b/sos/plugins/xfs.py +@@ -38,3 +38,5 @@ class Xfs(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + for e in dev: + parts = e.split(' ') + self.add_cmd_output("xfs_logprint -c %s" % (parts[0])) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/xinetd.py b/sos/plugins/xinetd.py +index e561044..d07c435 100644 +--- a/sos/plugins/xinetd.py ++++ b/sos/plugins/xinetd.py +@@ -28,3 +28,5 @@ class Xinetd(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + def setup(self): + self.add_copy_spec("/etc/xinetd.conf") + self.add_copy_spec("/etc/xinetd.d") ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/plugins/yum.py b/sos/plugins/yum.py +index b05c0fe..9aa6131 100644 +--- a/sos/plugins/yum.py ++++ b/sos/plugins/yum.py +@@ -63,3 +63,5 @@ class Yum(Plugin, RedHatPlugin): + self.add_cmd_output("zcat %s" % (output.split()[-1],)) + except IndexError: + pass ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/policies/__init__.py b/sos/policies/__init__.py +index 08ce8b4..3ae3979 100644 +--- a/sos/policies/__init__.py ++++ b/sos/policies/__init__.py +@@ -419,3 +419,5 @@ class LinuxPolicy(Policy): + + return + ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/policies/debian.py b/sos/policies/debian.py +index ffa4a26..80bbc88 100644 +--- a/sos/policies/debian.py ++++ b/sos/policies/debian.py +@@ -36,3 +36,5 @@ class DebianPolicy(LinuxPolicy): + except: + pass + return False ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/policies/osx.py b/sos/policies/osx.py +index 767b608..2e3c5ac 100644 +--- a/sos/policies/osx.py ++++ b/sos/policies/osx.py +@@ -11,3 +11,5 @@ class OSXPolicy(Policy): + return "Mac OS X" in shell_out("sw_vers") + except Exception as e: + return False ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/policies/redhat.py b/sos/policies/redhat.py +index 4e5b363..2eade3a 100644 +--- a/sos/policies/redhat.py ++++ b/sos/policies/redhat.py +@@ -155,4 +155,5 @@ class FedoraPolicy(RedHatPolicy): + self.all_pkgs_by_name_regex("fedora-release-.*")[-1] + return int(pkg["version"]) + +-# vim: ts=4 sw=4 et ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/policies/ubuntu.py b/sos/policies/ubuntu.py +index 3039f43..cc83f92 100644 +--- a/sos/policies/ubuntu.py ++++ b/sos/policies/ubuntu.py +@@ -23,3 +23,5 @@ class UbuntuPolicy(DebianPolicy): + return "Ubuntu" in fp.read() + except: + return False ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/policies/windows.py b/sos/policies/windows.py +index f2ce48c..f3bbc7e 100644 +--- a/sos/policies/windows.py ++++ b/sos/policies/windows.py +@@ -44,3 +44,5 @@ class WindowsPolicy(Policy): + def preferred_archive_name(self): + from sos.archive import ZipFileArchive + return ZipFileArchive ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/reporting.py b/sos/reporting.py +index 1671919..039a75f 100644 +--- a/sos/reporting.py ++++ b/sos/reporting.py +@@ -131,3 +131,5 @@ class PlainTextReport(object): + self.buf.append(header) + for item in section.get(key): + self.buf.append(format_ % item) ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/sosreport.py b/sos/sosreport.py +index afa5371..8483d10 100644 +--- a/sos/sosreport.py ++++ b/sos/sosreport.py +@@ -1151,3 +1151,5 @@ def main(args): + """The main entry point""" + sos = SoSReport(args) + sos.execute() ++ ++# vim: et ts=4 sw=4 +diff --git a/sos/utilities.py b/sos/utilities.py +index 1a56f9f..e5d7d87 100644 +--- a/sos/utilities.py ++++ b/sos/utilities.py +@@ -247,3 +247,5 @@ class ImporterHelper(object): + plugins.extend(self._find_plugins_in_zipfile(path)) + + return plugins ++ ++# vim: et ts=4 sw=4 +diff --git a/tests/archive_tests.py b/tests/archive_tests.py +index 9cd7bd1..d26af1d 100644 +--- a/tests/archive_tests.py ++++ b/tests/archive_tests.py +@@ -172,3 +172,5 @@ class TarFileArchiveTest(unittest.TestCase): + + if __name__ == "__main__": + unittest.main() ++ ++# vim: et ts=4 sw=4 +diff --git a/tests/importer_tests.py b/tests/importer_tests.py +index 91f82cc..e7e20a2 100644 +--- a/tests/importer_tests.py ++++ b/tests/importer_tests.py +@@ -11,3 +11,5 @@ class ImporterHelperTests(unittest.TestCase): + + if __name__ == "__main__": + unittest.main() ++ ++# vim: et ts=4 sw=4 +diff --git a/tests/option_tests.py b/tests/option_tests.py +index d221b96..3185bce 100644 +--- a/tests/option_tests.py ++++ b/tests/option_tests.py +@@ -32,3 +32,5 @@ class GlobalOptionTest(unittest.TestCase): + + if __name__ == "__main__": + unittest.main() ++ ++# vim: et ts=4 sw=4 +diff --git a/tests/plugin_tests.py b/tests/plugin_tests.py +index 5eb1304..9a21b61 100644 +--- a/tests/plugin_tests.py ++++ b/tests/plugin_tests.py +@@ -304,3 +304,5 @@ class RegexSubTests(unittest.TestCase): + + if __name__ == "__main__": + unittest.main() ++ ++# vim: et ts=4 sw=4 +diff --git a/tests/policy_tests.py b/tests/policy_tests.py +index 764af83..fe208fc 100644 +--- a/tests/policy_tests.py ++++ b/tests/policy_tests.py +@@ -67,3 +67,5 @@ class PackageManagerTests(unittest.TestCase): + + if __name__ == "__main__": + unittest.main() ++ ++# vim: et ts=4 sw=4 +diff --git a/tests/report_tests.py b/tests/report_tests.py +index a08f0ae..5bb1d83 100644 +--- a/tests/report_tests.py ++++ b/tests/report_tests.py +@@ -116,3 +116,5 @@ class TestPlainReport(unittest.TestCase): + + if __name__ == "__main__": + unittest.main() ++ ++# vim: et ts=4 sw=4 +diff --git a/tests/sosreport_pexpect.py b/tests/sosreport_pexpect.py +index 164fa9c..4b80723 100644 +--- a/tests/sosreport_pexpect.py ++++ b/tests/sosreport_pexpect.py +@@ -26,3 +26,5 @@ class PexpectTest(unittest.TestCase): + + if __name__ == '__main__': + unittest.main() ++ ++# vim: et ts=4 sw=4 +diff --git a/tests/test_exe.py b/tests/test_exe.py +index 09b2813..ee493b7 100755 +--- a/tests/test_exe.py ++++ b/tests/test_exe.py +@@ -1,2 +1,4 @@ + #!/usr/bin/python + print "executed" ++ ++# vim: et ts=4 sw=4 +diff --git a/tests/utilities_tests.py b/tests/utilities_tests.py +index 395fde1..f3b1629 100644 +--- a/tests/utilities_tests.py ++++ b/tests/utilities_tests.py +@@ -86,3 +86,5 @@ class FindTest(unittest.TestCase): + def test_not_in_pattern(self): + leaves = find("leaf", TEST_DIR, path_pattern="tests/path") + self.assertFalse(any(name.endswith("leaf") for name in leaves)) ++ ++# vim: et ts=4 sw=4 +-- +1.7.11.7 + diff --git a/0044-Dead-code-removal-sos.plugins.common_prefix.patch b/0044-Dead-code-removal-sos.plugins.common_prefix.patch new file mode 100644 index 0000000..676eefc --- /dev/null +++ b/0044-Dead-code-removal-sos.plugins.common_prefix.patch @@ -0,0 +1,39 @@ +From e39258bacc722ea9e7446c93b6443b8e1923e3a4 Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Wed, 26 Mar 2014 17:38:26 +0000 +Subject: [PATCH 44/61] Dead code removal: sos.plugins.common_prefix() + +Unused. Delete. + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/__init__.py | 13 ------------- + 1 file changed, 13 deletions(-) + +diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py +index 9ee0b61..4de8c0d 100644 +--- a/sos/plugins/__init__.py ++++ b/sos/plugins/__init__.py +@@ -45,19 +45,6 @@ try: + except ImportError: + import simplejson as json + +-def common_prefix(l1, l2, common = None): +- """Returns a tuple like the following: +- ([common, elements, from l1, and l2], [[tails, from, l1], [tails, from, l2]]) +- +- >>> common_prefix(['usr','share','foo'], ['usr','share','bar']) +- (['usr','share'], [['foo'], ['bar']]) +- """ +- if common is None: +- common = [] +- if len(l1) < 1 or len(l2) < 1 or l1[0] != l2[0]: +- return (common, [l1, l2]) +- return common_prefix(l1[1:], l2[1:], common+[l1[0]]) +- + def regex_findall(regex, fname): + '''Return a list of all non overlapping matches in the string(s)''' + try: +-- +1.7.11.7 + diff --git a/0045-Dead-code-removal-PluginException.patch b/0045-Dead-code-removal-PluginException.patch new file mode 100644 index 0000000..e7dac27 --- /dev/null +++ b/0045-Dead-code-removal-PluginException.patch @@ -0,0 +1,31 @@ +From 6182367ec0672721d1381e40aaa97c3d2f504a95 Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Wed, 26 Mar 2014 17:39:43 +0000 +Subject: [PATCH 45/61] Dead code removal: PluginException + +Defined but never used. Delete. + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/__init__.py | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py +index 4de8c0d..0c4b9b4 100644 +--- a/sos/plugins/__init__.py ++++ b/sos/plugins/__init__.py +@@ -60,11 +60,6 @@ def mangle_command(command): + mangledname = re.sub(r"/", ".", mangledname).strip(" ._-")[0:64] + return mangledname + +- +-class PluginException(Exception): +- pass +- +- + class Plugin(object): + """ This is the base class for sosreport plugins. Plugins should subclass + this and set the class variables where applicable. +-- +1.7.11.7 + diff --git a/0046-Convert-infiniband-to-package-list.patch b/0046-Convert-infiniband-to-package-list.patch new file mode 100644 index 0000000..0bd3381 --- /dev/null +++ b/0046-Convert-infiniband-to-package-list.patch @@ -0,0 +1,33 @@ +From 3f742644ebbf27b7b024a2f7061c347196312308 Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Thu, 27 Mar 2014 11:39:30 +0000 +Subject: [PATCH 46/61] Convert infiniband to package list + +Remove infiniband's open-coded check_enabled() and use a package +list to control plugin activation. + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/infiniband.py | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/sos/plugins/infiniband.py b/sos/plugins/infiniband.py +index 2c890a5..d3ec982 100644 +--- a/sos/plugins/infiniband.py ++++ b/sos/plugins/infiniband.py +@@ -21,11 +21,7 @@ class Infiniband(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + """ + + plugin_name = 'infiniband' +- +- def check_enabled(self): +- if self.commons["policy"].pkg_by_name("libibverbs-utils"): +- return True +- return False ++ packages = ('libibverbs-utils',) + + def setup(self): + self.add_copy_specs([ +-- +1.7.11.7 + diff --git a/0047-Replace-self.policy-.pkg_by_name-us-in-Logs-plugin.patch b/0047-Replace-self.policy-.pkg_by_name-us-in-Logs-plugin.patch new file mode 100644 index 0000000..d39650a --- /dev/null +++ b/0047-Replace-self.policy-.pkg_by_name-us-in-Logs-plugin.patch @@ -0,0 +1,28 @@ +From 1bd31b763a11f15c89b1e2ae16788867ff62a84e Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Thu, 27 Mar 2014 11:40:40 +0000 +Subject: [PATCH 47/61] Replace self.policy().pkg_by_name() us in Logs plugin + +Use self.is_installed() for simple package presence tests. + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/logs.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sos/plugins/logs.py b/sos/plugins/logs.py +index 1cd767c..318377d 100644 +--- a/sos/plugins/logs.py ++++ b/sos/plugins/logs.py +@@ -40,7 +40,7 @@ class Logs(Plugin): + if self.get_option('all_logs'): + logs = self.do_regex_find_all("^\S+\s+(-?\/.*$)\s+", + "/etc/syslog.conf") +- if self.policy().pkg_by_name("rsyslog") \ ++ if self.is_installed("rsyslog") \ + or os.path.exists("/etc/rsyslog.conf"): + logs += self.do_regex_find_all("^\S+\s+(-?\/.*$)\s+", "/etc/rsyslog.conf") + for i in logs: +-- +1.7.11.7 + diff --git a/0048-Clean-up-package-checks-in-processor-plugin.patch b/0048-Clean-up-package-checks-in-processor-plugin.patch new file mode 100644 index 0000000..297602f --- /dev/null +++ b/0048-Clean-up-package-checks-in-processor-plugin.patch @@ -0,0 +1,52 @@ +From 426549369f818091935712936514382786502094 Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Thu, 27 Mar 2014 11:50:33 +0000 +Subject: [PATCH 48/61] Clean up package checks in processor plugin + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/processor.py | 18 ++++++------------ + 1 file changed, 6 insertions(+), 12 deletions(-) + +diff --git a/sos/plugins/processor.py b/sos/plugins/processor.py +index 391c64f..0b236f8 100644 +--- a/sos/plugins/processor.py ++++ b/sos/plugins/processor.py +@@ -21,6 +21,8 @@ class Processor(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): + """ + + plugin_name = 'processor' ++ files = ('/proc/cpuinfo',) ++ packages = ('cpufreq-utils') + + def setup(self): + self.add_copy_specs([ +@@ -29,21 +31,13 @@ class Processor(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): + "/sys/devices/system/cpu" + ]) + +- if self.policy().pkg_by_name("cpufreq-utils"): +- self.add_cmd_output("cpufreq-info") +- self.add_cmd_output("cpupower info") +- self.add_cmd_output("cpupower frequency-info") +- +- if self.policy().pkg_by_name("kernel-tools"): +- self.add_cmd_output("cpupower info") +- self.add_cmd_output("cpupower frequency-info") +- self.add_cmd_output("cpupower idle-info") ++ self.add_cmd_output("lscpu") ++ self.add_cmd_output("cpupower info") ++ self.add_cmd_output("cpupower idle-info") ++ self.add_cmd_output("cpupower frequency-info") + + if self.policy().get_arch().endswith("386"): + self.add_cmd_output("x86info -a") + +- self.add_cmd_output("lscpu") +- +- + + # vim: et ts=4 sw=4 +-- +1.7.11.7 + diff --git a/0049-Pythonify-Plugin._path_in_pathlist.patch b/0049-Pythonify-Plugin._path_in_pathlist.patch new file mode 100644 index 0000000..09015d7 --- /dev/null +++ b/0049-Pythonify-Plugin._path_in_pathlist.patch @@ -0,0 +1,29 @@ +From 691e1811a2c6557c062a76e754a3b5228ce40fbf Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Thu, 27 Mar 2014 13:05:41 +0000 +Subject: [PATCH 49/61] Pythonify Plugin._path_in_pathlist() + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/__init__.py | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py +index 0c4b9b4..55c2d48 100644 +--- a/sos/plugins/__init__.py ++++ b/sos/plugins/__init__.py +@@ -195,10 +195,7 @@ class Plugin(object): + return regex_findall(regex, fname) + + def _path_in_path_list(self, path, path_list): +- for p in path_list: +- if p in path: +- return True +- return False ++ return any(p in path for p in path_list) + + def copy_symlink(self, srcpath, sub=None): + # the target stored in the original symlink +-- +1.7.11.7 + diff --git a/0050-Fix-x86-arch-detection-in-processor-plugin.patch b/0050-Fix-x86-arch-detection-in-processor-plugin.patch new file mode 100644 index 0000000..bfbb90d --- /dev/null +++ b/0050-Fix-x86-arch-detection-in-processor-plugin.patch @@ -0,0 +1,26 @@ +From 36055d3d069a1176787e4dfb722fc5ca9a804ac5 Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Thu, 27 Mar 2014 13:46:40 +0000 +Subject: [PATCH 50/61] Fix x86 arch detection in processor plugin + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/processor.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sos/plugins/processor.py b/sos/plugins/processor.py +index 0b236f8..14d800e 100644 +--- a/sos/plugins/processor.py ++++ b/sos/plugins/processor.py +@@ -36,7 +36,7 @@ class Processor(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): + self.add_cmd_output("cpupower idle-info") + self.add_cmd_output("cpupower frequency-info") + +- if self.policy().get_arch().endswith("386"): ++ if '86' in self.policy().get_arch(): + self.add_cmd_output("x86info -a") + + +-- +1.7.11.7 + diff --git a/0051-Refactor-Plugin.collect-pathway.patch b/0051-Refactor-Plugin.collect-pathway.patch new file mode 100644 index 0000000..0478db0 --- /dev/null +++ b/0051-Refactor-Plugin.collect-pathway.patch @@ -0,0 +1,152 @@ +From f98ae415bbff3f633641633a1c99c13021d4b352 Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Thu, 27 Mar 2014 13:47:10 +0000 +Subject: [PATCH 51/61] Refactor Plugin.collect() pathway + +Clean up and refactor the collect() path in preparation for +fixing the recursive tree copying code. + +- Move string and command collection into their own methods +- Move glob expansion from add_copy_spec*() to + collect_copy_specs() +- Rename do_copy_file_or_dir() to do_copy_path() + +There are no functional changes as a result of this patch. + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/__init__.py | 57 +++++++++++++++++++++++++++++-------------------- + 1 file changed, 34 insertions(+), 23 deletions(-) + +diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py +index 55c2d48..807bd3f 100644 +--- a/sos/plugins/__init__.py ++++ b/sos/plugins/__init__.py +@@ -99,7 +99,7 @@ class Plugin(object): + self.opt_parms = [] + self.commons = commons + self.forbidden_paths = [] +- self.copy_paths = [] ++ self.copy_specs = [] + self.copy_strings = [] + self.collect_cmds = [] + +@@ -229,10 +229,10 @@ class Plugin(object): + self.archive.add_link(reldest,srcpath) + + # copy the symlink target translating relative targets +- # to absolute paths to pass to do_copy_file_or_dir. ++ # to absolute paths to pass to do_copy_path. + self.soslog.debug("normalized link target %s as %s" + %(linkdest, absdest)) +- self.do_copy_file_or_dir(absdest) ++ self.do_copy_path(absdest) + + self.copied_files.append({ + 'srcpath':srcpath, +@@ -242,7 +242,7 @@ class Plugin(object): + + def copy_dir(self, srcpath, sub=None): + for afile in os.listdir(srcpath): +- self.do_copy_file_or_dir(os.path.join(srcpath, afile), dest=None, sub=sub) ++ self.do_copy_path(os.path.join(srcpath, afile), dest=None, sub=sub) + + def _get_dest_for_srcpath(self, srcpath): + for copied in self.copied_files: +@@ -251,7 +251,7 @@ class Plugin(object): + return None + + # Methods for copying files and shelling out +- def do_copy_file_or_dir(self, srcpath, dest=None, sub=None): ++ def do_copy_path(self, srcpath, dest=None, sub=None): + # pylint: disable-msg = R0912 + # pylint: disable-msg = R0915 + '''Copy file or directory to the destination tree. If a directory, then +@@ -308,7 +308,7 @@ class Plugin(object): + + + def add_forbidden_path(self, forbiddenPath): +- """Specify a path to not copy, even if it's part of a copy_paths[] ++ """Specify a path to not copy, even if it's part of a copy_specs[] + entry. + """ + # Glob case handling is such that a valid non-glob is a reduced glob +@@ -417,12 +417,11 @@ class Plugin(object): + copied into the sosreport by this module. + """ + if not (copyspec and len(copyspec)): +- # self.soslog.warning("invalid file path") ++ self.soslog.warning("%s added null or empty file path" ++ % self.name()) + return False +- # Glob case handling is such that a valid non-glob is a reduced glob +- for filespec in glob.glob(copyspec): +- if filespec not in self.copy_paths: +- self.copy_paths.append((filespec, sub)) ++ if copyspec not in self.copy_specs: ++ self.copy_specs.append((copyspec, sub)) + + def get_command_output(self, prog, timeout=300): + (status, output, runtime) = sos_get_command_output(prog, timeout) +@@ -535,19 +534,16 @@ class Plugin(object): + """ + self.custom_text += text + +- def collect(self): +- """Collect the data for a plugin.""" +- for path, sub in self.copy_paths: +- self.do_copy_file_or_dir(path, sub=sub) ++ def expand_copy_spec(self, copyspec): ++ return glob.glob(copyspec) + +- for string, file_name in self.copy_strings: +- try: +- self.archive.add_string(string, +- os.path.join('sos_strings', self.name(), file_name)) +- except Exception as e: +- self.soslog.debug("could not create %s, traceback follows: %s" +- % (file_name, e)) ++ def collect_copy_specs(self): ++ # Glob case handling is such that a valid non-glob is a reduced glob ++ for spec, sub in self.copy_specs: ++ for path in self.expand_copy_spec(spec): ++ self.do_copy_path(path, sub=sub) + ++ def collect_cmd_output(self): + for progs in zip(self.collect_cmds): + prog, suggest_filename, root_symlink, timeout = progs[0] + self.soslog.debug("collecting output of '%s'" % prog) +@@ -558,6 +554,21 @@ class Plugin(object): + self.soslog.debug("error collecting output of '%s' (%s)" + % (prog, e)) + ++ def collect_strings(self): ++ for string, file_name in self.copy_strings: ++ try: ++ self.archive.add_string(string, ++ os.path.join('sos_strings', self.name(), file_name)) ++ except Exception as e: ++ self.soslog.debug("could not create %s, traceback follows: %s" ++ % (file_name, e)) ++ ++ def collect(self): ++ """Collect the data for a plugin.""" ++ self.collect_copy_specs() ++ self.collect_cmd_output() ++ self.collect_strings() ++ + def get_description(self): + """ This function will return the description for the plugin""" + try: +@@ -592,7 +603,7 @@ class Plugin(object): + return True + + def setup(self): +- """This method must be overridden to add the copy_paths, forbidden_paths, ++ """This method must be overridden to add the copy_specs, forbidden_paths, + and external programs to be collected at a minimum. + """ + pass +-- +1.7.11.7 + diff --git a/0052-Remove-obsolete-checksum-reference-from-utilities_te.patch b/0052-Remove-obsolete-checksum-reference-from-utilities_te.patch new file mode 100644 index 0000000..a150a8f --- /dev/null +++ b/0052-Remove-obsolete-checksum-reference-from-utilities_te.patch @@ -0,0 +1,27 @@ +From 01ef1eaed6f1228fcb8f3d6bc1746396d638282d Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Thu, 27 Mar 2014 13:59:14 +0000 +Subject: [PATCH 52/61] Remove obsolete checksum reference from + utilities_tests.py + +Signed-off-by: Bryn M. Reeves +--- + tests/utilities_tests.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/utilities_tests.py b/tests/utilities_tests.py +index f3b1629..22b2bbe 100644 +--- a/tests/utilities_tests.py ++++ b/tests/utilities_tests.py +@@ -5,7 +5,7 @@ import unittest + import six + from six import StringIO + +-from sos.utilities import grep, checksum, get_hash_name, is_executable, sos_get_command_output, find, tail, shell_out ++from sos.utilities import grep, get_hash_name, is_executable, sos_get_command_output, find, tail, shell_out + import sos + + TEST_DIR = os.path.dirname(__file__) +-- +1.7.11.7 + diff --git a/0053-Update-plugin_tests.py-to-match-new-method-names.patch b/0053-Update-plugin_tests.py-to-match-new-method-names.patch new file mode 100644 index 0000000..17519c5 --- /dev/null +++ b/0053-Update-plugin_tests.py-to-match-new-method-names.patch @@ -0,0 +1,54 @@ +From fbd60e01cfce143757b6de13aaf2209319f3eee9 Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Thu, 27 Mar 2014 14:15:28 +0000 +Subject: [PATCH 53/61] Update plugin_tests.py to match new method names + +Signed-off-by: Bryn M. Reeves +--- + tests/plugin_tests.py | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/tests/plugin_tests.py b/tests/plugin_tests.py +index 9a21b61..4ba5968 100644 +--- a/tests/plugin_tests.py ++++ b/tests/plugin_tests.py +@@ -194,15 +194,15 @@ class PluginTests(unittest.TestCase): + self.assertEquals(p.get_option_as_list("opt"), ['testing']) + + def test_copy_dir(self): +- self.mp.do_copy_file_or_dir("tests") ++ self.mp.do_copy_path("tests") + self.assertEquals(self.mp.archive.m["tests/plugin_tests.py"], 'tests/plugin_tests.py') + + def test_copy_dir_sub(self): +- self.mp.do_copy_file_or_dir("tests", sub=("tests/", "foobar/")) ++ self.mp.do_copy_path("tests", sub=("tests/", "foobar/")) + self.assertEquals(self.mp.archive.m["tests/plugin_tests.py"], 'foobar/plugin_tests.py') + + def test_copy_dir_bad_path(self): +- self.mp.do_copy_file_or_dir("not_here_tests") ++ self.mp.do_copy_path("not_here_tests") + self.assertEquals(self.mp.archive.m, {}) + + def test_copy_dir_forbidden_path(self): +@@ -211,7 +211,7 @@ class PluginTests(unittest.TestCase): + }) + p.archive = MockArchive() + p.setup() +- p.do_copy_file_or_dir("tests") ++ p.do_copy_path("tests") + self.assertEquals(p.archive.m, {}) + + +@@ -225,7 +225,7 @@ class AddCopySpecLimitTests(unittest.TestCase): + + def test_single_file_under_limit(self): + self.mp.add_copy_spec_limit("tests/tail_test.txt", 1) +- self.assertEquals(self.mp.copy_paths, [('tests/tail_test.txt', None)]) ++ self.assertEquals(self.mp.copy_specs, [('tests/tail_test.txt', None)]) + + def test_single_file_over_limit(self): + fn = create_file(2) # create 2MB file, consider a context manager +-- +1.7.11.7 + diff --git a/0054-Drop-RedHatPlugin-from-procenv.patch b/0054-Drop-RedHatPlugin-from-procenv.patch new file mode 100644 index 0000000..0bfb664 --- /dev/null +++ b/0054-Drop-RedHatPlugin-from-procenv.patch @@ -0,0 +1,32 @@ +From 2f7baff1e206831945c83894fbc0ba5250178b5b Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Thu, 27 Mar 2014 14:45:53 +0000 +Subject: [PATCH 54/61] Drop RedHatPlugin from procenv + +The procenv package is not shipped in Red Hat distributions so +remove the RedHatPlugin tagging class from it. + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/procenv.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sos/plugins/procenv.py b/sos/plugins/procenv.py +index e776e14..4367555 100644 +--- a/sos/plugins/procenv.py ++++ b/sos/plugins/procenv.py +@@ -13,9 +13,9 @@ + ## along with this program; if not, write to the Free Software + ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +-from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin ++from sos.plugins import Plugin, DebianPlugin, UbuntuPlugin + +-class Procenv(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): ++class Procenv(Plugin, DebianPlugin, UbuntuPlugin): + """Process environment. + """ + +-- +1.7.11.7 + diff --git a/0055-Remove-sub-parameter-from-Plugin.add_copy_spec.patch b/0055-Remove-sub-parameter-from-Plugin.add_copy_spec.patch new file mode 100644 index 0000000..b38535c --- /dev/null +++ b/0055-Remove-sub-parameter-from-Plugin.add_copy_spec.patch @@ -0,0 +1,164 @@ +From a09090ab98b10e2eca363a4919397545d64f1c85 Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Thu, 27 Mar 2014 16:09:35 +0000 +Subject: [PATCH 55/61] Remove 'sub' parameter from Plugin.add_copy_spec*() + +The 'sub' parameter to these functions allowed substituting part +of the path in the generated archive. E.g. transforming 'etc/' +into 'configs/'. This has never been used and seems to serve no +real purpose today. Simplify the parameter passing and copy_spec +lists by removing this support. + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/__init__.py | 49 +++++++++++++++++-------------------------------- + 1 file changed, 17 insertions(+), 32 deletions(-) + +diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py +index 807bd3f..de278d0 100644 +--- a/sos/plugins/__init__.py ++++ b/sos/plugins/__init__.py +@@ -197,7 +197,7 @@ class Plugin(object): + def _path_in_path_list(self, path, path_list): + return any(p in path for p in path_list) + +- def copy_symlink(self, srcpath, sub=None): ++ def copy_symlink(self, srcpath): + # the target stored in the original symlink + linkdest = os.readlink(srcpath) + # absolute path to the link target +@@ -213,18 +213,14 @@ class Plugin(object): + reldest = linkdest + + self.soslog.debug( +- "copying link %s pointing to %s with sub=%s, isdir=%s" +- % (srcpath, linkdest, sub, os.path.isdir(absdest))) ++ "copying link %s pointing to %s with isdir=%s" ++ % (srcpath, linkdest, os.path.isdir(absdest))) + + if os.path.isdir(absdest): + self.soslog.debug("link %s is a directory, skipping..." + % linkdest) + return + +- if sub: +- old, new = sub +- reldest = srcpath.replace(old, new) +- + # use the relative target path in the tarball + self.archive.add_link(reldest,srcpath) + +@@ -240,9 +236,9 @@ class Plugin(object): + 'symlink':"yes", + 'pointsto':linkdest}) + +- def copy_dir(self, srcpath, sub=None): ++ def copy_dir(self, srcpath): + for afile in os.listdir(srcpath): +- self.do_copy_path(os.path.join(srcpath, afile), dest=None, sub=sub) ++ self.do_copy_path(os.path.join(srcpath, afile), dest=None) + + def _get_dest_for_srcpath(self, srcpath): + for copied in self.copied_files: +@@ -251,16 +247,12 @@ class Plugin(object): + return None + + # Methods for copying files and shelling out +- def do_copy_path(self, srcpath, dest=None, sub=None): ++ def do_copy_path(self, srcpath, dest=None): + # pylint: disable-msg = R0912 + # pylint: disable-msg = R0915 + '''Copy file or directory to the destination tree. If a directory, then + everything below it is recursively copied. A list of copied files are +- saved for use later in preparing a report. sub can be used to rename +- the destination of the file, sub should be a two-tuple of (old,new). +- For example if you passed in ("etc","configurations") for use against +- /etc/my_file.conf the file would end up at +- /configurations/my_file.conf. ++ saved for use later in preparing a report. + ''' + if self._path_in_path_list(srcpath, self.forbidden_paths): + self.soslog.debug("%s is in the forbidden path list" % srcpath) +@@ -273,16 +265,12 @@ class Plugin(object): + if not dest: + dest = srcpath + +- if sub: +- old, new = sub +- dest = srcpath.replace(old, new) +- + if os.path.islink(srcpath): +- self.copy_symlink(srcpath, sub=sub) ++ self.copy_symlink(srcpath) + return + else: + if os.path.isdir(srcpath): +- self.copy_dir(srcpath, sub=sub) ++ self.copy_dir(srcpath) + return + + # if we get here, it's definitely a regular file (not a symlink or dir) +@@ -370,7 +358,7 @@ class Plugin(object): + except Exception: + return default + +- def add_copy_spec_limit(self, copyspec, sizelimit=None, sub=None): ++ def add_copy_spec_limit(self, copyspec, sizelimit=None): + """Add a file or glob but limit it to sizelimit megabytes. If fname is + a single file the file will be tailed to meet sizelimit. If the first + file in a glob is too large it will be tailed to meet the sizelimit. +@@ -392,14 +380,11 @@ class Plugin(object): + if sizelimit and current_size > sizelimit: + limit_reached = True + break +- self.add_copy_spec(_file, sub) ++ self.add_copy_spec(_file) + + if limit_reached: + file_name = _file + +- if sub: +- old, new = sub +- file_name = _file.replace(old, new) + if file_name[0] == os.sep: + file_name = file_name.lstrip(os.sep) + strfile = file_name.replace(os.path.sep, ".") + ".tailed" +@@ -408,11 +393,11 @@ class Plugin(object): + os.path.relpath('/', os.path.dirname(_file)), 'sos_strings', + self.name(), strfile), _file) + +- def add_copy_specs(self, copyspecs, sub=None): ++ def add_copy_specs(self, copyspecs): + for copyspec in copyspecs: +- self.add_copy_spec(copyspec, sub) ++ self.add_copy_spec(copyspec) + +- def add_copy_spec(self, copyspec, sub=None): ++ def add_copy_spec(self, copyspec): + """Add a file specification (can be file, dir,or shell glob) to be + copied into the sosreport by this module. + """ +@@ -421,7 +406,7 @@ class Plugin(object): + % self.name()) + return False + if copyspec not in self.copy_specs: +- self.copy_specs.append((copyspec, sub)) ++ self.copy_specs.append(copyspec) + + def get_command_output(self, prog, timeout=300): + (status, output, runtime) = sos_get_command_output(prog, timeout) +@@ -539,9 +524,9 @@ class Plugin(object): + + def collect_copy_specs(self): + # Glob case handling is such that a valid non-glob is a reduced glob +- for spec, sub in self.copy_specs: ++ for spec in self.copy_specs: + for path in self.expand_copy_spec(spec): +- self.do_copy_path(path, sub=sub) ++ self.do_copy_path(path) + + def collect_cmd_output(self): + for progs in zip(self.collect_cmds): +-- +1.7.11.7 + diff --git a/0056-Remove-references-to-sub-parameter-from-plugin-tests.patch b/0056-Remove-references-to-sub-parameter-from-plugin-tests.patch new file mode 100644 index 0000000..c7fa642 --- /dev/null +++ b/0056-Remove-references-to-sub-parameter-from-plugin-tests.patch @@ -0,0 +1,46 @@ +From f5be64704096d5bdf9f75cc78dc571c6d9325fcb Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Thu, 27 Mar 2014 16:38:29 +0000 +Subject: [PATCH 56/61] Remove references to 'sub' parameter from plugin tests + +Signed-off-by: Bryn M. Reeves +--- + tests/plugin_tests.py | 10 +++------- + 1 file changed, 3 insertions(+), 7 deletions(-) + +diff --git a/tests/plugin_tests.py b/tests/plugin_tests.py +index 4ba5968..cf874f1 100644 +--- a/tests/plugin_tests.py ++++ b/tests/plugin_tests.py +@@ -197,10 +197,6 @@ class PluginTests(unittest.TestCase): + self.mp.do_copy_path("tests") + self.assertEquals(self.mp.archive.m["tests/plugin_tests.py"], 'tests/plugin_tests.py') + +- def test_copy_dir_sub(self): +- self.mp.do_copy_path("tests", sub=("tests/", "foobar/")) +- self.assertEquals(self.mp.archive.m["tests/plugin_tests.py"], 'foobar/plugin_tests.py') +- + def test_copy_dir_bad_path(self): + self.mp.do_copy_path("not_here_tests") + self.assertEquals(self.mp.archive.m, {}) +@@ -225,14 +221,14 @@ class AddCopySpecLimitTests(unittest.TestCase): + + def test_single_file_under_limit(self): + self.mp.add_copy_spec_limit("tests/tail_test.txt", 1) +- self.assertEquals(self.mp.copy_specs, [('tests/tail_test.txt', None)]) ++ self.assertEquals(self.mp.copy_specs, ['tests/tail_test.txt']) + + def test_single_file_over_limit(self): + fn = create_file(2) # create 2MB file, consider a context manager +- self.mp.add_copy_spec_limit(fn, 1, sub=('tmp', 'awesome')) ++ self.mp.add_copy_spec_limit(fn, 1) + content, fname = self.mp.copy_strings[0] + self.assertTrue("tailed" in fname) +- self.assertTrue("awesome" in fname) ++ self.assertTrue("tmp" in fname) + self.assertTrue("/" not in fname) + self.assertEquals(1024 * 1024, len(content)) + os.unlink(fn) +-- +1.7.11.7 + diff --git a/0057-Use-a-set-for-Plugin.copy_paths.patch b/0057-Use-a-set-for-Plugin.copy_paths.patch new file mode 100644 index 0000000..83eba4b --- /dev/null +++ b/0057-Use-a-set-for-Plugin.copy_paths.patch @@ -0,0 +1,58 @@ +From 81b06ca7406aee6ecb47f7afe33fc56caafee570 Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Thu, 27 Mar 2014 20:33:40 +0000 +Subject: [PATCH 57/61] Use a set for Plugin.copy_paths + +We want to remove any duplicates from the list of paths to +collect. Use a set and update it with the expansion of each copy +spec as we add it. This avoids having to explictly test for +duplicates when we come to iterate over the set. + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/__init__.py | 14 ++++++-------- + 1 file changed, 6 insertions(+), 8 deletions(-) + +diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py +index de278d0..7b6180c 100644 +--- a/sos/plugins/__init__.py ++++ b/sos/plugins/__init__.py +@@ -99,7 +99,7 @@ class Plugin(object): + self.opt_parms = [] + self.commons = commons + self.forbidden_paths = [] +- self.copy_specs = [] ++ self.copy_paths = set() + self.copy_strings = [] + self.collect_cmds = [] + +@@ -402,11 +402,11 @@ class Plugin(object): + copied into the sosreport by this module. + """ + if not (copyspec and len(copyspec)): +- self.soslog.warning("%s added null or empty file path" +- % self.name()) ++ self.soslog.warning("plugin %s %s" ++ % ("added null or empty copy spec", self.name())) + return False +- if copyspec not in self.copy_specs: +- self.copy_specs.append(copyspec) ++ copy_paths = self.expand_copy_spec(copyspec) ++ self.copy_paths.update(copy_paths) + + def get_command_output(self, prog, timeout=300): + (status, output, runtime) = sos_get_command_output(prog, timeout) +@@ -523,9 +523,7 @@ class Plugin(object): + return glob.glob(copyspec) + + def collect_copy_specs(self): +- # Glob case handling is such that a valid non-glob is a reduced glob +- for spec in self.copy_specs: +- for path in self.expand_copy_spec(spec): ++ for path in self.copy_paths: + self.do_copy_path(path) + + def collect_cmd_output(self): +-- +1.7.11.7 + diff --git a/0058-Update-Plugin-tests-to-treat-copy_paths-as-a-set.patch b/0058-Update-Plugin-tests-to-treat-copy_paths-as-a-set.patch new file mode 100644 index 0000000..292a122 --- /dev/null +++ b/0058-Update-Plugin-tests-to-treat-copy_paths-as-a-set.patch @@ -0,0 +1,26 @@ +From cfefd80c828c309745cc40d8498223b4fbc7b5ca Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Thu, 27 Mar 2014 20:52:49 +0000 +Subject: [PATCH 58/61] Update Plugin tests to treat copy_paths as a set + +Signed-off-by: Bryn M. Reeves +--- + tests/plugin_tests.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/plugin_tests.py b/tests/plugin_tests.py +index cf874f1..5074cbf 100644 +--- a/tests/plugin_tests.py ++++ b/tests/plugin_tests.py +@@ -221,7 +221,7 @@ class AddCopySpecLimitTests(unittest.TestCase): + + def test_single_file_under_limit(self): + self.mp.add_copy_spec_limit("tests/tail_test.txt", 1) +- self.assertEquals(self.mp.copy_specs, ['tests/tail_test.txt']) ++ self.assertEquals(self.mp.copy_paths, set(['tests/tail_test.txt'])) + + def test_single_file_over_limit(self): + fn = create_file(2) # create 2MB file, consider a context manager +-- +1.7.11.7 + diff --git a/0059-Add-tests-for-Plugin.add_copy_spec-add_copy_specs.patch b/0059-Add-tests-for-Plugin.add_copy_spec-add_copy_specs.patch new file mode 100644 index 0000000..6dc90e9 --- /dev/null +++ b/0059-Add-tests-for-Plugin.add_copy_spec-add_copy_specs.patch @@ -0,0 +1,61 @@ +From c613b172a44c98f40919c763eb4bf088476cbefa Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Thu, 27 Mar 2014 21:04:42 +0000 +Subject: [PATCH 59/61] Add tests for Plugin.add_copy_spec()/add_copy_specs() + +Give add_copy_spec() and add_copy_specs() their own test cases. + +Signed-off-by: Bryn M. Reeves +--- + tests/plugin_tests.py | 26 ++++++++++++++++++++++++-- + 1 file changed, 24 insertions(+), 2 deletions(-) + +diff --git a/tests/plugin_tests.py b/tests/plugin_tests.py +index 5074cbf..a4905cf 100644 +--- a/tests/plugin_tests.py ++++ b/tests/plugin_tests.py +@@ -211,7 +211,9 @@ class PluginTests(unittest.TestCase): + self.assertEquals(p.archive.m, {}) + + +-class AddCopySpecLimitTests(unittest.TestCase): ++class AddCopySpecTests(unittest.TestCase): ++ ++ expect_paths = set(['tests/tail_test.txt']) + + def setUp(self): + self.mp = MockPlugin({ +@@ -219,9 +221,29 @@ class AddCopySpecLimitTests(unittest.TestCase): + }) + self.mp.archive = MockArchive() + ++ def assert_expect_paths(self): ++ self.assertEquals(self.mp.copy_paths, self.expect_paths) ++ ++ # add_copy_spec() ++ ++ def test_single_file(self): ++ self.mp.add_copy_spec('tests/tail_test.txt') ++ self.assert_expect_paths() ++ def test_glob_file(self): ++ self.mp.add_copy_spec('tests/tail_test.*') ++ self.assert_expect_paths() ++ + def test_single_file_under_limit(self): + self.mp.add_copy_spec_limit("tests/tail_test.txt", 1) +- self.assertEquals(self.mp.copy_paths, set(['tests/tail_test.txt'])) ++ self.assert_expect_paths() ++ ++ # add_copy_specs() ++ ++ def test_add_copy_specs(self): ++ self.mp.add_copy_specs(["tests/tail_test.txt"]) ++ self.assert_expect_paths() ++ ++ # add_copy_spec_limit() + + def test_single_file_over_limit(self): + fn = create_file(2) # create 2MB file, consider a context manager +-- +1.7.11.7 + diff --git a/0060-Raise-a-TypeError-if-add_copy_specs-is-called-with-a.patch b/0060-Raise-a-TypeError-if-add_copy_specs-is-called-with-a.patch new file mode 100644 index 0000000..92511d5 --- /dev/null +++ b/0060-Raise-a-TypeError-if-add_copy_specs-is-called-with-a.patch @@ -0,0 +1,48 @@ +From 0bedab23f3eb86878d894419614e1728c395a84e Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Thu, 27 Mar 2014 21:06:24 +0000 +Subject: [PATCH 60/61] Raise a TypeError if add_copy_specs() is called with a + string + +Since strings are iterable a plugin attempting to call +add_copy_specs("/something") results in a plugin calling +add_copy_spec("/"). Raise a TypeError if this happens. + +Fixes Issue #141. + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/__init__.py | 2 ++ + tests/plugin_tests.py | 3 +++ + 2 files changed, 5 insertions(+) + +diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py +index 7b6180c..7e865cd 100644 +--- a/sos/plugins/__init__.py ++++ b/sos/plugins/__init__.py +@@ -394,6 +394,8 @@ class Plugin(object): + self.name(), strfile), _file) + + def add_copy_specs(self, copyspecs): ++ if isinstance(copyspecs, six.string_types): ++ raise TypeError("Plugin.add_copy_specs called with string argument") + for copyspec in copyspecs: + self.add_copy_spec(copyspec) + +diff --git a/tests/plugin_tests.py b/tests/plugin_tests.py +index a4905cf..c44c162 100644 +--- a/tests/plugin_tests.py ++++ b/tests/plugin_tests.py +@@ -243,6 +243,9 @@ class AddCopySpecTests(unittest.TestCase): + self.mp.add_copy_specs(["tests/tail_test.txt"]) + self.assert_expect_paths() + ++ def test_add_copy_spec_nostrings(self): ++ self.assertRaises(TypeError, self.mp.add_copy_specs,"stringsarebadmkay?") ++ + # add_copy_spec_limit() + + def test_single_file_over_limit(self): +-- +1.7.11.7 + diff --git a/0061-Add-collection-of-grub-configuration-for-UEFI-system.patch b/0061-Add-collection-of-grub-configuration-for-UEFI-system.patch new file mode 100644 index 0000000..bfe18bc --- /dev/null +++ b/0061-Add-collection-of-grub-configuration-for-UEFI-system.patch @@ -0,0 +1,61 @@ +From efc3b09c2b41c166e54593f0956b9f0eaf374925 Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Fri, 28 Mar 2014 16:29:38 +0000 +Subject: [PATCH 61/61] Add collection of grub configuration for UEFI systems + +UEFI systems store the grub configuration at: + + /boot/efi/EFI/*/grub.conf [grub 1.x] + /boot/efi/EFI/*/grub.cfg [grub 2.x] + +Add these paths to the respective modules. + +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/grub.py | 2 +- + sos/plugins/grub2.py | 11 ++++++----- + 2 files changed, 7 insertions(+), 6 deletions(-) + +diff --git a/sos/plugins/grub.py b/sos/plugins/grub.py +index cc4d593..3911041 100644 +--- a/sos/plugins/grub.py ++++ b/sos/plugins/grub.py +@@ -23,11 +23,11 @@ class Grub(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + + def setup(self): + self.add_copy_specs([ ++ "/boot/efi/EFI/*/grub.conf", + "/boot/grub/grub.conf", + "/boot/grub/device.map", + "/etc/grub.conf", + "/etc/grub.d" + ]) + +- + # vim: et ts=4 sw=4 +diff --git a/sos/plugins/grub2.py b/sos/plugins/grub2.py +index c9f64b0..95c1218 100644 +--- a/sos/plugins/grub2.py ++++ b/sos/plugins/grub2.py +@@ -23,12 +23,13 @@ class Grub2(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + + def setup(self): + self.add_copy_specs([ +- "/etc/grub.d", +- "/etc/grub2.cfg", +- "/etc/default/grub", +- "/boot/grub/grub.cfg", ++ "/boot/efi/EFI/*/grub.cfg", + "/boot/grub2/grub.cfg", +- "/boot/grub2/grubenv" ++ "/boot/grub2/grubenv", ++ "/boot/grub/grub.cfg", ++ "/etc/default/grub", ++ "/etc/grub2.cfg", ++ "/etc/grub.d" + ]) + self.add_cmd_output("ls -lanR /boot") + self.add_cmd_output("grub2-mkconfig") +-- +1.7.11.7 + diff --git a/sos.spec b/sos.spec index b343629..f8cad31 100644 --- a/sos.spec +++ b/sos.spec @@ -2,10 +2,10 @@ Summary: A set of tools to gather troubleshooting information from a system Name: sos -Version: 3.0 -Release: 3%{?dist} +Version: 3.1 +Release: 1%{?dist} Group: Applications/System -Source0: https://people.redhat.com/breeves/sos/releases/sos-3.0.tar.gz +Source0: https://github.com/sosreport/sosreport/archive/sos-3.1.tar.gz License: GPLv2+ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildArch: noarch @@ -17,7 +17,67 @@ Requires: rpm-python Requires: tar Requires: bzip2 Requires: xz -Patch0: sos-silence-could-not-run.patch +Patch0: 0001-Fix-cluster-module-crm_report-support.patch +Patch1: 0002-Remove-obsolete-diagnostics-code-from-ldap-plugin.patch +Patch2: 0003-Ensure-superclass-postproc-method-is-called-in-ldap-.patch +Patch3: 0004-Fix-cluster-postproc-regression.patch +Patch4: 0005-Fix-get_option-use-in-cluster-plugin.patch +Patch5: 0006-Fix-verbose-file-logging.patch +Patch6: 0007-Always-treat-rhevm-vdsmlogs-option-as-string.patch +Patch7: 0008-Add-rhsm-debug-collection-to-yum-plugin.patch +Patch8: 0009-Make-get_cmd_output_now-behaviour-match-2.2.patch +Patch9: 0010-Include-geo-replication-status-in-gluster-plugin.patch +Patch10: 0011-postgresql-minor-fixes.patch +Patch11: 0012-postgresql-add-logs-about-errors-warnings.patch +Patch12: 0013-postgresql-added-license-and-copyright.patch +Patch13: 0014-postgresql-allow-use-TCP-socket.patch +Patch14: 0015-Pass-no-archive-to-rhsm-debug-script.patch +Patch15: 0016-Ensure-unused-fds-are-closed-when-calling-subprocess.patch +Patch16: 0017-Fix-gluster-volume-name-extraction.patch +Patch17: 0018-Add-distupgrade-plugin.patch +Patch18: 0019-Fix-command-output-substitution-exception.patch +Patch19: 0020-Improve-error-message-when-cluster.crm_from-is-inval.patch +Patch20: 0021-Remove-useless-check_enabled-from-sar-plugin.patch +Patch21: 0022-Eliminate-hard-coded-var-log-sa-paths-in-sar-plugin.patch +Patch22: 0023-Scrub-ldap_default_authtok-password-in-sssd-plugin.patch +Patch23: 0024-Replace-package-check-with-file-check-in-anacron.patch +Patch24: 0025-Remove-the-rhevm-plugin.patch +Patch25: 0026-powerpc-Move-VPD-related-tool-under-common-code.patch +Patch26: 0027-Add-PowerNV-specific-debug-data.patch +Patch27: 0028-Fix-remaining-use-of-obsolete-get_cmd_dir-in-plugins.patch +Patch28: 0029-Update-systemd-support.patch +Patch29: 0030-Add-tuned-plugin.patch +Patch30: 0031-Clean-up-get_cmd_path-make_cmd_path-make_cmd_dirs-me.patch +Patch31: 0032-Fix-broken-binary-detection-in-satellite-plugin.patch +Patch32: 0033-Rename-validatePlugin-to-validate_plugin.patch +Patch33: 0034-Update-policy_tests.py-for-validate_plugin-change.patch +Patch34: 0035-Match-plugins-against-policies.patch +Patch35: 0036-Do-not-collect-isos-in-cobbler-plugin.patch +Patch36: 0037-Call-rhsm-debug-with-the-sos-switch.patch +Patch37: 0038-Fix-plugin_test-exception-on-six.PY2.patch +Patch38: 0039-Remove-profile-support.patch +Patch39: 0040-Dead-code-removal-sos_relative_path.patch +Patch40: 0041-Dead-code-removal-DirTree.patch +Patch41: 0042-Dead-code-removal-utilities.checksum.patch +Patch42: 0043-Add-vim-tags-to-all-python-source-files.patch +Patch43: 0044-Dead-code-removal-sos.plugins.common_prefix.patch +Patch44: 0045-Dead-code-removal-PluginException.patch +Patch45: 0046-Convert-infiniband-to-package-list.patch +Patch46: 0047-Replace-self.policy-.pkg_by_name-us-in-Logs-plugin.patch +Patch47: 0048-Clean-up-package-checks-in-processor-plugin.patch +Patch48: 0049-Pythonify-Plugin._path_in_pathlist.patch +Patch49: 0050-Fix-x86-arch-detection-in-processor-plugin.patch +Patch50: 0051-Refactor-Plugin.collect-pathway.patch +Patch51: 0052-Remove-obsolete-checksum-reference-from-utilities_te.patch +Patch52: 0053-Update-plugin_tests.py-to-match-new-method-names.patch +Patch53: 0054-Drop-RedHatPlugin-from-procenv.patch +Patch54: 0055-Remove-sub-parameter-from-Plugin.add_copy_spec.patch +Patch55: 0056-Remove-references-to-sub-parameter-from-plugin-tests.patch +Patch56: 0057-Use-a-set-for-Plugin.copy_paths.patch +Patch57: 0058-Update-Plugin-tests-to-treat-copy_paths-as-a-set.patch +Patch58: 0059-Add-tests-for-Plugin.add_copy_spec-add_copy_specs.patch +Patch59: 0060-Raise-a-TypeError-if-add_copy_specs-is-called-with-a.patch +Patch60: 0061-Add-collection-of-grub-configuration-for-UEFI-system.patch %description Sos is a set of tools that gathers information about system @@ -26,8 +86,69 @@ diagnostic purposes and debugging. Sos is commonly used to help support technicians and developers. %prep -%setup -q +# deal with github tarball naming scheme +%setup -q -n sosreport-sos-%{version} %patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 +%patch14 -p1 +%patch15 -p1 +%patch16 -p1 +%patch17 -p1 +%patch18 -p1 +%patch19 -p1 +%patch20 -p1 +%patch21 -p1 +%patch22 -p1 +%patch23 -p1 +%patch24 -p1 +%patch25 -p1 +%patch26 -p1 +%patch27 -p1 +%patch28 -p1 +%patch29 -p1 +%patch30 -p1 +%patch31 -p1 +%patch32 -p1 +%patch33 -p1 +%patch34 -p1 +%patch35 -p1 +%patch36 -p1 +%patch37 -p1 +%patch38 -p1 +%patch39 -p1 +%patch40 -p1 +%patch41 -p1 +%patch42 -p1 +%patch43 -p1 +%patch44 -p1 +%patch45 -p1 +%patch46 -p1 +%patch47 -p1 +%patch48 -p1 +%patch49 -p1 +%patch50 -p1 +%patch51 -p1 +%patch52 -p1 +%patch53 -p1 +%patch54 -p1 +%patch55 -p1 +%patch56 -p1 +%patch57 -p1 +%patch58 -p1 +%patch59 -p1 +%patch60 -p1 %build make @@ -50,6 +171,164 @@ rm -rf ${RPM_BUILD_ROOT} %config(noreplace) %{_sysconfdir}/sos.conf %changelog +* Tue Apr 01 2014 Bryn M. Reeves = 3.1-1 +- Update to new upstream release sos-3.1 +- Add collection of grub configuration for UEFI systems +- Raise a TypeError if add_copy_specs() is called with a string +- Add tests for Plugin.add_copy_spec()/add_copy_specs() +- Update Plugin tests to treat copy_paths as a set +- Use a set for Plugin.copy_paths +- Remove references to 'sub' parameter from plugin tests +- Remove 'sub' parameter from Plugin.add_copy_spec*() +- Drop RedHatPlugin from procenv +- Update plugin_tests.py to match new method names +- Remove obsolete checksum reference from utilities_tests.py +- Refactor Plugin.collect() pathway +- Fix x86 arch detection in processor plugin +- Pythonify Plugin._path_in_pathlist() +- Clean up package checks in processor plugin +- Replace self.policy().pkg_by_name() us in Logs plugin +- Convert infiniband to package list +- Dead code removal: PluginException +- Dead code removal: sos.plugins.common_prefix() +- Add vim tags to all python source files +- Dead code removal: utilities.checksum() +- Dead code removal: DirTree +- Dead code removal: sos_relative_path() +- Remove --profile support +- Fix plugin_test exception on six.PY2 +- Call rhsm-debug with the --sos switch +- Do not collect isos in cobbler plugin +- Match plugins against policies +- Update policy_tests.py for validate_plugin change +- Rename validatePlugin to validate_plugin +- Fix broken binary detection in satellite plugin +- Clean up get_cmd_path/make_cmd_path/make_cmd_dirs mess +- Add tuned plugin +- Update systemd support +- Fix remaining use of obsolete 'get_cmd_dir()' in plugins +- Add PowerNV specific debug data +- powerpc: Move VPD related tool under common code +- Remove the rhevm plugin. +- Replace package check with file check in anacron +- Scrub ldap_default_authtok password in sssd plugin +- Eliminate hard-coded /var/log/sa paths in sar plugin +- Remove useless check_enabled() from sar plugin +- Improve error message when cluster.crm_from is invalid +- Fix command output substitution exception +- Add distupgrade plugin +- Fix gluster volume name extraction +- Ensure unused fds are closed when calling subprocesses via Popen +- Pass --no-archive to rhsm-debug script +- postgresql: allow use TCP socket +- postgresql: added license and copyright +- postgresql: add logs about errors / warnings +- postgresql: minor fixes +- Include geo-replication status in gluster plugin +- Make get_cmd_output_now() behaviour match 2.2 +- Add rhsm-debug collection to yum plugin +- Always treat rhevm vdsmlogs option as string +- Fix verbose file logging +- Fix get_option() use in cluster plugin +- Fix cluster postproc regression +- Ensure superclass postproc method is called in ldap plugin +- Remove obsolete diagnostics code from ldap plugin +- Fix cluster module crm_report support + +* Thu Mar 20 2014 Bryn M. Reeves = 3.0-23 +- Call rhsm-debug with the --sos switch + +* Mon Mar 03 2014 Bryn M. Reeves = 3.0-22 +- Fix package check in anacron plugin + +* Wed Feb 12 2014 Bryn M. Reeves = 3.0-21 +- Remove obsolete rhel_version() usage from yum plugin + +* Tue Feb 11 2014 Bryn M. Reeves = 3.0-20 +- Prevent unhandled exception during command output substitution + +* Mon Feb 10 2014 Bryn M. Reeves = 3.0-19 +- Fix generation of volume names in gluster plugin +- Add distupgrade plugin + +* Tue Feb 04 2014 Bryn M. Reeves = 3.0-18 +- Prevent file descriptor leaks when using Popen +- Disable zip archive creation when running rhsm-debug +- Include volume geo-replication status in gluster plugin + +* Mon Feb 03 2014 Bryn M. Reeves = 3.0-17 +- Fix get_option use in cluster plugin +- Fix debug logging to file when given '-v' +- Always treat rhevm plugin's vdsmlogs option as a string +- Run the rhsm-debug script from yum plugin + +* Fri Jan 31 2014 Bryn M. Reeves = 3.0-16 +- Add new plugin to collect OpenHPI configuration +- Fix cluster plugin crm_report support +- Fix file postprocessing in ldap plugin +- Remove collection of anaconda-ks.cfg from general plugin + +* Fri Jan 24 2014 Bryn M. Reeves = 3.0-15 +- Remove debug statements from logs plugin +- Make ethernet interface detection more robust +- Fix specifying multiple plugin options on the command line +- Make log and message levels match previous versions +- Log a warning message when external commands time out +- Remove --upload command line option +- Update sos UI text to match upstream + +* Fri Dec 27 2013 Daniel Mach = 3.0-14 +- Mass rebuild 2013-12-27 + +* Thu Nov 14 2013 Bryn M. Reeves = 3.0-13 +- Fix regressions introduced with --build option + +* Tue Nov 12 2013 Bryn M. Reeves = 3.0-12 +- Fix typo in yum plug-in add_forbidden_paths +- Add krb5 plug-in and drop collection of krb5.keytab + +* Fri Nov 8 2013 Bryn M. Reeves = 3.0-10 +- Add nfs client plug-in +- Fix traceback when sar module force-enabled + +* Thu Nov 7 2013 Bryn M. Reeves = 3.0-9 +- Restore --build command line option +- Collect saved vmcore-dmesg.txt files +- Normalize temporary directory paths + +* Tue Nov 5 2013 Bryn M. Reeves = 3.0-7 +- Add domainname output to NIS plug-in +- Collect /var/log/squid in squid plug-in +- Collect mountstats and mountinfo in filesys plug-in +- Add PowerPC plug-in from upstream + +* Thu Oct 31 2013 Bryn M. Reeves = 3.0-6 +- Remove version checks in gluster plug-in +- Check for usable temporary directory +- Fix --alloptions command line option +- Fix configuration fail regression + +* Wed Oct 30 2013 Bryn M. Reeves = 3.0-5 +- Include /etc/yaboot.conf in boot plug-in +- Fix collection of brctl output in networking plug-in +- Verify limited set of RPM packages by default +- Do not strip newlines from command output +- Limit default sar data collection + +* Thu Oct 3 2013 Bryn M. Reeves = 3.0-4 +- Do not attempt to read RPC pseudo files in networking plug-in +- Restrict wbinfo collection to the current domain +- Add obfuscation of luci secrets to cluster plug-in +- Add XFS plug-in +- Fix policy class handling of --tmp-dir +- Do not set batch mode if stdin is not a TTY +- Attempt to continue when reading bad input in interactive mode + +* Wed Aug 14 2013 Bryn M. Reeves = 3.0-3 +- Add crm_report support to cluster plug-in +- Fix rhel_version() usage in cluster and s390 plug-ins +- Strip trailing newline from command output + * Sun Aug 04 2013 Fedora Release Engineering - 3.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild diff --git a/sources b/sources index 2df3930..080d2c4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9963fc9934596ffd0adb585f8858a68c sos-3.0.tar.gz +4c05e494f80e8e2d7c272098462e5fb8 sos-3.1.tar.gz