From c165cb4395d1144b135ee743a99154eaedf7438e Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 28 Jul 2020 08:16:34 -0400 Subject: [PATCH] import sos-3.9.1-4.el8 --- .gitignore | 2 +- .sos.metadata | 2 +- ...os-bz1457191-navicli-noniteractively.patch | 67 ++++ SOURCES/sos-bz1633006-iptables-kmods.patch | 78 ++++ SOURCES/sos-bz1688764-ipa-new-logs.patch | 84 ----- ...bz1738391-kernel-no-trace-by-default.patch | 79 ---- ...744553-ovn-plugins-containerized-env.patch | 326 ---------------- ...6915-interim-sysroot-forbidden-paths.patch | 354 ------------------ ...os-bz1776549-podman-buildah-rootless.patch | 142 +++++++ SOURCES/sos-bz1785546-nvmetcli.patch | 68 ++++ SOURCES/sos-bz1814867-insights-archive.patch | 78 ++++ ...-bz1819662-rabbitmqctl-on-foreground.patch | 34 ++ SOURCES/sos-bz1823488-containers-common.patch | 107 ++++++ .../sos-bz1825283-env-host-in-container.patch | 33 ++ SOURCES/sos-bz1838123-xdp-plugin.patch | 69 ++++ ...os-bz1843562-gluster-volume-specific.patch | 37 ++ ...z1843754-powerpc-logs-for-components.patch | 150 ++++++++ SOURCES/sos-bz1844853-nfs-etc-exports.patch | 120 ++++++ ...-pacemaker-passwords-with-equal-sign.patch | 46 +++ SPECS/sos.spec | 88 ++++- 20 files changed, 1113 insertions(+), 851 deletions(-) create mode 100644 SOURCES/sos-bz1457191-navicli-noniteractively.patch create mode 100644 SOURCES/sos-bz1633006-iptables-kmods.patch delete mode 100644 SOURCES/sos-bz1688764-ipa-new-logs.patch delete mode 100644 SOURCES/sos-bz1738391-kernel-no-trace-by-default.patch delete mode 100644 SOURCES/sos-bz1744553-ovn-plugins-containerized-env.patch delete mode 100644 SOURCES/sos-bz1766915-interim-sysroot-forbidden-paths.patch create mode 100644 SOURCES/sos-bz1776549-podman-buildah-rootless.patch create mode 100644 SOURCES/sos-bz1785546-nvmetcli.patch create mode 100644 SOURCES/sos-bz1814867-insights-archive.patch create mode 100644 SOURCES/sos-bz1819662-rabbitmqctl-on-foreground.patch create mode 100644 SOURCES/sos-bz1823488-containers-common.patch create mode 100644 SOURCES/sos-bz1825283-env-host-in-container.patch create mode 100644 SOURCES/sos-bz1838123-xdp-plugin.patch create mode 100644 SOURCES/sos-bz1843562-gluster-volume-specific.patch create mode 100644 SOURCES/sos-bz1843754-powerpc-logs-for-components.patch create mode 100644 SOURCES/sos-bz1844853-nfs-etc-exports.patch create mode 100644 SOURCES/sos-bz1845386-pacemaker-passwords-with-equal-sign.patch diff --git a/.gitignore b/.gitignore index 0964ff6..9a59ac6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -SOURCES/sos-3.8.tar.gz +SOURCES/sos-3.9.1.tar.gz SOURCES/sos-audit-0.3.tgz diff --git a/.sos.metadata b/.sos.metadata index 0c29651..26fd331 100644 --- a/.sos.metadata +++ b/.sos.metadata @@ -1,2 +1,2 @@ -99c94319c6208edef8d852b9e84cbb045c01df5f SOURCES/sos-3.8.tar.gz +f96aaefb396a648be21f661b89f13cd9fc257b8a SOURCES/sos-3.9.1.tar.gz 9d478b9f0085da9178af103078bbf2fd77b0175a SOURCES/sos-audit-0.3.tgz diff --git a/SOURCES/sos-bz1457191-navicli-noniteractively.patch b/SOURCES/sos-bz1457191-navicli-noniteractively.patch new file mode 100644 index 0000000..70cf21b --- /dev/null +++ b/SOURCES/sos-bz1457191-navicli-noniteractively.patch @@ -0,0 +1,67 @@ +From ca24d4602ce46312343f1f6c6f4b270fb6092e21 Mon Sep 17 00:00:00 2001 +From: Pavel Moravec +Date: Wed, 15 Apr 2020 17:09:52 +0200 +Subject: [PATCH] [navicli] replace interactive prompt by plugin option + +List of ClariiOn IP addresses should be provided via +-k navicli.ipaddrs plugopt, as a space separated list. + +Closes: #405 +Resolves: #2020 + +Signed-off-by: Pavel Moravec +Signed-off-by: Bryan Quigley +--- + sos/plugins/navicli.py | 30 +++++------------------------- + 1 file changed, 5 insertions(+), 25 deletions(-) + +diff --git a/sos/plugins/navicli.py b/sos/plugins/navicli.py +index 8e5dee50..5b6d766d 100644 +--- a/sos/plugins/navicli.py ++++ b/sos/plugins/navicli.py +@@ -19,6 +19,8 @@ class Navicli(Plugin, RedHatPlugin): + + plugin_name = 'navicli' + profiles = ('storage', 'hardware') ++ option_list = [("ipaddrs", "list of space separated CLARiiON IP addresses", ++ '', "")] + + def check_enabled(self): + return is_executable("navicli") +@@ -57,30 +59,8 @@ class Navicli(Plugin, RedHatPlugin): + + def setup(self): + self.get_navicli_config() +- CLARiiON_IP_address_list = [] +- CLARiiON_IP_loop = "stay_in" +- while CLARiiON_IP_loop == "stay_in": +- try: +- ans = input("CLARiiON SP IP Address or [Enter] to exit: ") +- except Exception: +- return +- if self.exec_cmd("navicli -h %s getsptime" % (ans,))['status']: +- CLARiiON_IP_address_list.append(ans) +- else: +- if ans != "": +- print("The IP address you entered, %s, is not to an " +- "active CLARiiON SP." % ans) +- if ans == "": +- CLARiiON_IP_loop = "get_out" +- # Sort and dedup the list of CLARiiON IP Addresses +- CLARiiON_IP_address_list.sort() +- for SP_address in CLARiiON_IP_address_list: +- if CLARiiON_IP_address_list.count(SP_address) > 1: +- CLARiiON_IP_address_list.remove(SP_address) +- for SP_address in CLARiiON_IP_address_list: +- if SP_address != "": +- print(" Gathering NAVICLI information for %s..." % +- SP_address) +- self.get_navicli_SP_info(SP_address) ++ for ip in set(self.get_option("ipaddrs").split()): ++ if self.exec_cmd("navicli -h %s getsptime" % (ip))['status'] == 0: ++ self.get_navicli_SP_info(ip) + + # vim: set et ts=4 sw=4 : +-- +2.21.3 + diff --git a/SOURCES/sos-bz1633006-iptables-kmods.patch b/SOURCES/sos-bz1633006-iptables-kmods.patch new file mode 100644 index 0000000..7ffaae8 --- /dev/null +++ b/SOURCES/sos-bz1633006-iptables-kmods.patch @@ -0,0 +1,78 @@ +From 31e0467885ef3986b476ea070941a786b426f298 Mon Sep 17 00:00:00 2001 +From: Pavel Moravec +Date: Fri, 8 May 2020 14:06:41 +0200 +Subject: [PATCH] [networking] collect iptables when proper kernel modules + loaded + +Since kernel-4, iptables / ip6tables is newly provided by nf_tables +kernel module. Therefore, collecting ip[,6]tables commands should +be gated by presence of also this kernel module. + +Resolves: #2054 + +Signed-off-by: Pavel Moravec +Signed-off-by: Bryan Quigley +--- + sos/plugins/networking.py | 23 +++++++++++++---------- + 1 file changed, 13 insertions(+), 10 deletions(-) + +diff --git a/sos/plugins/networking.py b/sos/plugins/networking.py +index cac6ccca..5230303d 100644 +--- a/sos/plugins/networking.py ++++ b/sos/plugins/networking.py +@@ -35,22 +35,24 @@ class Networking(Plugin): + ns_wide = "-W" + + def collect_iptable(self, tablename): +- """ When running the iptables command, it unfortunately auto-loads +- the modules before trying to get output. Some people explicitly +- don't want this, so check if the modules are loaded before running +- the command. If they aren't loaded, there can't possibly be any +- relevant rules in that table """ ++ """ Collecting iptables rules for a table loads either kernel module ++ of the table name (for kernel <= 3), or nf_tables (for kernel >= 4). ++ If neither module is present, the rules must be empty.""" + + modname = "iptable_" + tablename + cmd = "iptables -t " + tablename + " -nvL" +- self.add_cmd_output(cmd, pred=SoSPredicate(self, kmods=[modname])) ++ self.add_cmd_output( ++ cmd, ++ pred=SoSPredicate(self, kmods=[modname, 'nf_tables'])) + + def collect_ip6table(self, tablename): + """ Same as function above, but for ipv6 """ + + modname = "ip6table_" + tablename + cmd = "ip6tables -t " + tablename + " -nvL" +- self.add_cmd_output(cmd, pred=SoSPredicate(self, kmods=[modname])) ++ self.add_cmd_output( ++ cmd, ++ pred=SoSPredicate(self, kmods=[modname, 'nf_tables'])) + + def collect_nftables(self): + """ Collects nftables rulesets with 'nft' commands if the modules +@@ -151,16 +153,17 @@ class Networking(Plugin): + self.add_cmd_output(ss_cmd, pred=ss_pred, changes=True) + + # When iptables is called it will load the modules +- # iptables and iptables_filter if they are not loaded. ++ # iptables_filter (for kernel <= 3) or ++ # nf_tables (for kernel >= 4) if they are not loaded. + # The same goes for ipv6. + self.add_cmd_output( + "iptables -vnxL", +- pred=SoSPredicate(self, kmods=['iptable_filter']) ++ pred=SoSPredicate(self, kmods=['iptable_filter', 'nf_tables']) + ) + + self.add_cmd_output( + "ip6tables -vnxL", +- pred=SoSPredicate(self, kmods=['ip6table_filter']) ++ pred=SoSPredicate(self, kmods=['ip6table_filter', 'nf_tables']) + ) + + # Get ethtool output for every device that does not exist in a +-- +2.21.3 + diff --git a/SOURCES/sos-bz1688764-ipa-new-logs.patch b/SOURCES/sos-bz1688764-ipa-new-logs.patch deleted file mode 100644 index a120ae5..0000000 --- a/SOURCES/sos-bz1688764-ipa-new-logs.patch +++ /dev/null @@ -1,84 +0,0 @@ -From f2350aece8a6980f80cfa0036382055239fd8a6b Mon Sep 17 00:00:00 2001 -From: Thorsten Scherf -Date: Mon, 1 Jul 2019 11:37:47 +0200 -Subject: [PATCH] [ipa] copy httpd cert from new location - -With the FreeIPA 4.7.0 release, httpd moved from mod_nss to mod_ssl. As a -result the httpd X.509 certificate is now no longer stored in NSS DB but as -plain PEM text file: /var/lib/ipa/certs/httpd.crt. The plugin needs to copy -this file into the sos archive. - -Closes: #1715 -Resolves: #1716 - -Signed-off-by: Thorsten Scherf -Signed-off-by: Bryn M. Reeves ---- - sos/plugins/ipa.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/sos/plugins/ipa.py b/sos/plugins/ipa.py -index 50f42f259..310c0fa31 100644 ---- a/sos/plugins/ipa.py -+++ b/sos/plugins/ipa.py -@@ -115,6 +115,7 @@ def setup(self): - "/var/lib/certmonger/requests/[0-9]*", - "/var/lib/certmonger/cas/[0-9]*", - "/var/lib/ipa/ra-agent.pem", -+ "/var/lib/ipa/certs/httpd.crt", - "/var/kerberos/krb5kdc/kdc.crt", - "/var/lib/ipa/sysrestore/sysrestore.state" - ]) -From 5c0b2d56313b6fa58b46802317c98b89e5a68508 Mon Sep 17 00:00:00 2001 -From: Rob Crittenden -Date: Thu, 12 Sep 2019 12:02:34 -0400 -Subject: [PATCH] [ipa] collect ipa-healthcheck logs - -Resolves: #1782 - -Signed-off-by: Rob Crittenden -Signed-off-by: Bryn M. Reeves ---- - sos/plugins/ipa.py | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/sos/plugins/ipa.py b/sos/plugins/ipa.py -index 310c0fa31..750cb6fae 100644 ---- a/sos/plugins/ipa.py -+++ b/sos/plugins/ipa.py -@@ -117,7 +117,8 @@ def setup(self): - "/var/lib/ipa/ra-agent.pem", - "/var/lib/ipa/certs/httpd.crt", - "/var/kerberos/krb5kdc/kdc.crt", -- "/var/lib/ipa/sysrestore/sysrestore.state" -+ "/var/lib/ipa/sysrestore/sysrestore.state", -+ "/var/log/ipa/healthcheck/healthcheck.log*" - ]) - - # Make sure to use the right PKI config and NSS DB folders -From 823dbabde82ee941c421482a71be572984607ad4 Mon Sep 17 00:00:00 2001 -From: Pavel Moravec -Date: Tue, 1 Oct 2019 08:26:24 +0200 -Subject: [PATCH] [ipa] collect kdcproxy configs - -Resolves: #1806 - -Signed-off-by: Pavel Moravec ---- - sos/plugins/ipa.py | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/sos/plugins/ipa.py b/sos/plugins/ipa.py -index 750cb6fae..d3454de98 100644 ---- a/sos/plugins/ipa.py -+++ b/sos/plugins/ipa.py -@@ -111,6 +111,9 @@ def setup(self): - "/etc/named.*", - "/etc/ipa/ca.crt", - "/etc/ipa/default.conf", -+ "/etc/ipa/kdcproxy/kdcproxy.conf", -+ "/etc/ipa/kdcproxy/ipa-kdc-proxy.conf", -+ "/etc/ipa/kdcproxy.conf", - "/root/.ipa/log/cli.log", - "/var/lib/certmonger/requests/[0-9]*", - "/var/lib/certmonger/cas/[0-9]*", diff --git a/SOURCES/sos-bz1738391-kernel-no-trace-by-default.patch b/SOURCES/sos-bz1738391-kernel-no-trace-by-default.patch deleted file mode 100644 index 5aec064..0000000 --- a/SOURCES/sos-bz1738391-kernel-no-trace-by-default.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 55949fb88c492eec542c69157a8763ddb3555345 Mon Sep 17 00:00:00 2001 -From: MIZUTA Takeshi -Date: Thu, 6 Jun 2019 18:42:40 +0900 -Subject: [PATCH] [plugins] Change forbidden_path from partial-match to - exact-match - -forbidden_path is evaluated on partial-match. -However, it will be correct to evaluate on exact-match. - -Closes: #1692 -Resolves: #1695 - -Signed-off-by: MIZUTA Takeshi -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 56af847a..41f4f58c 100644 ---- a/sos/plugins/__init__.py -+++ b/sos/plugins/__init__.py -@@ -64,7 +64,7 @@ def _mangle_command(command, name_max): - - - def _path_in_path_list(path, path_list): -- return any(p in path for p in path_list) -+ return any(p == path for p in path_list) - - - def _node_type(st): --- -2.21.0 - -From d2d5b9da6d4af7ead8a47468db0bbfcc8fb2b5bf Mon Sep 17 00:00:00 2001 -From: Pavel Moravec -Date: Thu, 26 Sep 2019 10:50:18 +0200 -Subject: [PATCH] [kernel] Don't collect trace file by default - -Updates the plugin to don't collect trace file by default. Collecting -trace file may take a lot of time, so trace file is not collected -by default, and use the new plug-in option when collecting. - -Original author: MIZUTA Takeshi - -Closes: #1688 -Resolves: #1800 - -Signed-off-by: Pavel Moravec -Signed-off-by: Bryn M. Reeves ---- - sos/plugins/kernel.py | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/sos/plugins/kernel.py b/sos/plugins/kernel.py -index bf3c3dea..b498f55e 100644 ---- a/sos/plugins/kernel.py -+++ b/sos/plugins/kernel.py -@@ -23,7 +23,8 @@ class Kernel(Plugin, RedHatPlugin, Debia - sys_module = '/sys/module' - - option_list = [ -- ("with-timer", "gather /proc/timer* statistics", "slow", False) -+ ("with-timer", "gather /proc/timer* statistics", "slow", False), -+ ("trace", "gather /sys/kernel/debug/tracing/trace file", "slow", False) - ] - - def get_bpftool_prog_ids(self, prog_file): -@@ -138,6 +139,9 @@ class Kernel(Plugin, RedHatPlugin, Debia - # and may also cause softlockups - self.add_copy_spec("/proc/timer*") - -+ if not self.get_option("trace"): -+ self.add_forbidden_path("/sys/kernel/debug/tracing/trace") -+ - # collect list of eBPF programs and maps and their dumps - prog_file = self.get_cmd_output_now("bpftool -j prog list") - for prog_id in self.get_bpftool_prog_ids(prog_file): -2.21.0 diff --git a/SOURCES/sos-bz1744553-ovn-plugins-containerized-env.patch b/SOURCES/sos-bz1744553-ovn-plugins-containerized-env.patch deleted file mode 100644 index 9a97377..0000000 --- a/SOURCES/sos-bz1744553-ovn-plugins-containerized-env.patch +++ /dev/null @@ -1,326 +0,0 @@ -From cc6374914a47eb3777c5b8306506df43522a31e0 Mon Sep 17 00:00:00 2001 -From: Daniel Alvarez -Date: Thu, 18 Jul 2019 14:08:27 +0200 -Subject: [PATCH] [ovn_central] add additional show commands - -This patch is adding 'show' commands for both OVN -NorthBound and SouthBound databases. - -Signed-off-by: Daniel Alvarez -Signed-off-by: Bryn M. Reeves ---- - sos/plugins/ovn_central.py | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/sos/plugins/ovn_central.py b/sos/plugins/ovn_central.py -index e05856872..2d2526253 100644 ---- a/sos/plugins/ovn_central.py -+++ b/sos/plugins/ovn_central.py -@@ -57,6 +57,8 @@ def setup(self): - - # Some user-friendly versions of DB output - cmds = [ -+ 'ovn-nbctl show', -+ 'ovn-sbctl show', - 'ovn-sbctl lflow-list', - 'ovn-nbctl get-ssl', - 'ovn-nbctl get-connection', -From 5fd4e850ad9a6636d0fb206954e8ab016584974d Mon Sep 17 00:00:00 2001 -From: Daniel Alvarez -Date: Wed, 11 Sep 2019 16:19:15 +0100 -Subject: [PATCH] [ovn_host] fix Open_vSwitch table name - -Signed-off-by: Daniel Alvarez -Signed-off-by: Bryn M. Reeves ---- - sos/plugins/ovn_host.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sos/plugins/ovn_host.py b/sos/plugins/ovn_host.py -index 542516279..ba35d87e7 100644 ---- a/sos/plugins/ovn_host.py -+++ b/sos/plugins/ovn_host.py -@@ -35,7 +35,7 @@ def setup(self): - self.add_cmd_output([ - 'ovs-ofctl -O OpenFlow13 dump-flows br-int', - 'ovs-vsctl list-br', -- 'ovs-vsctl list OpenVswitch', -+ 'ovs-vsctl list Open_vSwitch', - ]) - - self.add_journal(units="ovn-controller") -From 3c842046e9c4c5b371566347f51e5e242daf4f8d Mon Sep 17 00:00:00 2001 -From: Daniel Alvarez -Date: Tue, 23 Jul 2019 12:44:07 +0200 -Subject: [PATCH] [ovn_central] Add support to containerized setups - -This patch is adding support in ovn_central plugin to containerized -setups. - -Now it's detecting if the OVN central services are running in -container and execute the relevant commands inside it. The support -covers both podman and docker runtimes. - -Signed-off-by: Daniel Alvarez ---- - sos/plugins/ovn_central.py | 94 ++++++++++++++++++++++++++++---------- - 1 file changed, 69 insertions(+), 25 deletions(-) - -diff --git a/sos/plugins/ovn_central.py b/sos/plugins/ovn_central.py -index 2d2526253..a9fcdf33e 100644 ---- a/sos/plugins/ovn_central.py -+++ b/sos/plugins/ovn_central.py -@@ -19,30 +19,64 @@ class OVNCentral(Plugin): - """ - plugin_name = "ovn_central" - profiles = ('network', 'virt') -- -- def add_database_output(self, filename, cmds, ovn_cmd, skip=[]): -+ _container_runtime = None -+ _container_name = None -+ -+ def get_tables_from_schema(self, filename, skip=[]): -+ if self._container_name: -+ cmd = "%s exec %s cat %s" % ( -+ self._container_runtime, self._container_name, filename) -+ res = self.get_command_output(cmd) -+ if res['status'] != 0: -+ self._log_error("Could not retrieve DB schema file from " -+ "container %s" % self._container_name) -+ return -+ try: -+ db = json.loads(res['output']) -+ except Exception: -+ self._log_error("Cannot parse JSON file %s" % filename) -+ return -+ else: -+ try: -+ with open(filename, 'r') as f: -+ try: -+ db = json.load(f) -+ except Exception: -+ self._log_error( -+ "Cannot parse JSON file %s" % filename) -+ return -+ except IOError as ex: -+ self._log_error( -+ "Could not open DB schema file %s: %s" % (filename, ex)) -+ return - try: -- with open(filename, 'r') as f: -- try: -- db = json.load(f) -- except Exception: -- # If json can't be parsed, then exit early -- self._log_error("Cannot parse JSON file %s" % filename) -- return -- try: -- for table in six.iterkeys(db['tables']): -- if table not in skip: -- cmds.append('%s list %s' % (ovn_cmd, table)) -- except AttributeError: -- self._log_error("DB schema %s has no 'tables' key" % -- filename) -- return -- except IOError as ex: -- self._log_error("Could not open DB schema file %s: %s" % (filename, -- ex)) -- return -+ return [table for table in six.iterkeys( -+ db['tables']) if table not in skip] -+ except AttributeError: -+ self._log_error("DB schema %s has no 'tables' key" % filename) -+ -+ def add_database_output(self, tables, cmds, ovn_cmd): -+ for table in tables: -+ cmds.append('%s list %s' % (ovn_cmd, table)) -+ -+ def running_in_container(self): -+ for runtime in ["podman", "docker"]: -+ container_status = self.get_command_output(runtime + " ps") -+ if container_status['status'] == 0: -+ for line in container_status['output'].splitlines(): -+ if "ovn-dbs-bundle" in line: -+ self._container_name = line.split()[-1] -+ self._container_runtime = runtime -+ return True -+ return False -+ -+ def check_enabled(self): -+ return (self.running_in_container() or -+ super(OVNCentral, self).check_enabled()) - - def setup(self): -+ containerized = self.running_in_container() -+ - ovs_rundir = os.environ.get('OVS_RUNDIR') - for pidfile in ['ovnnb_db.pid', 'ovnsb_db.pid', 'ovn-northd.pid']: - self.add_copy_spec([ -@@ -68,10 +102,20 @@ def setup(self): - - schema_dir = '/usr/share/openvswitch' - -- self.add_database_output(os.path.join(schema_dir, 'ovn-nb.ovsschema'), -- cmds, 'ovn-nbctl') -- self.add_database_output(os.path.join(schema_dir, 'ovn-sb.ovsschema'), -- cmds, 'ovn-sbctl', ['Logical_Flow']) -+ nb_tables = self.get_tables_from_schema(os.path.join( -+ schema_dir, 'ovn-nb.ovsschema')) -+ sb_tables = self.get_tables_from_schema(os.path.join( -+ schema_dir, 'ovn-sb.ovsschema'), ['Logical_Flow']) -+ -+ self.add_database_output(nb_tables, cmds, 'ovn-nbctl') -+ self.add_database_output(sb_tables, cmds, 'ovn-sbctl') -+ -+ # If OVN is containerized, we need to run the above commands inside -+ # the container. -+ if containerized: -+ cmds = ['%s exec %s %s' % (self._container_runtime, -+ self._container_name, -+ cmd) for cmd in cmds] - - self.add_cmd_output(cmds) - -From a895bf4096f1dbd71c9dbd4defb47783f4ef9840 Mon Sep 17 00:00:00 2001 -From: Daniel Alvarez -Date: Thu, 25 Jul 2019 11:42:16 +0200 -Subject: [PATCH] [ovn_host] Add support for containerized setups - -Prior to this patch, ovn_host was disabled on containerized -setups due to the fact that ovn-controller package is not -installed in the host. - -This patch fixes it by checking if the ovn-controller process -is running. - -Resolves: #1767 - -Signed-off-by: Daniel Alvarez -Signed-off-by: Bryn M. Reeves ---- - sos/plugins/ovn_host.py | 21 ++++++++++++++------- - 1 file changed, 14 insertions(+), 7 deletions(-) - -diff --git a/sos/plugins/ovn_host.py b/sos/plugins/ovn_host.py -index ba35d87e7..5225f010e 100644 ---- a/sos/plugins/ovn_host.py -+++ b/sos/plugins/ovn_host.py -@@ -12,6 +12,15 @@ - from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin - - -+pidfile = 'ovn-controller.pid' -+pid_paths = [ -+ '/var/lib/openvswitch/ovn', -+ '/usr/local/var/run/openvswitch', -+ '/var/run/openvswitch', -+ '/run/openvswitch' -+] -+ -+ - class OVNHost(Plugin): - """ OVN Controller - """ -@@ -19,13 +28,6 @@ class OVNHost(Plugin): - profiles = ('network', 'virt') - - def setup(self): -- pidfile = 'ovn-controller.pid' -- pid_paths = [ -- '/var/lib/openvswitch/ovn', -- '/usr/local/var/run/openvswitch', -- '/var/run/openvswitch', -- '/run/openvswitch' -- ] - if os.environ.get('OVS_RUNDIR'): - pid_paths.append(os.environ.get('OVS_RUNDIR')) - self.add_copy_spec([os.path.join(pp, pidfile) for pp in pid_paths]) -@@ -40,6 +42,11 @@ def setup(self): - - self.add_journal(units="ovn-controller") - -+ def check_enabled(self): -+ return (any([os.path.isfile( -+ os.path.join(pp, pidfile)) for pp in pid_paths]) or -+ super(OVNHost, self).check_enabled()) -+ - - class RedHatOVNHost(OVNHost, RedHatPlugin): - -From 6d623ceb2bc973a603c2abb1c8c64f2980667a0d Mon Sep 17 00:00:00 2001 -From: Pavel Moravec -Date: Wed, 2 Oct 2019 12:19:19 +0200 -Subject: [PATCH] [ovn_central] dont add db outputs when no table is found in - schema - -When get_tables_from_schema method returns None (i.e. due to a -parsing error or missing config file), add_database_output tries -to iterate over None object, what raises an exception. - -Resolves: #1808 - -Signed-off-by: Pavel Moravec ---- - sos/plugins/ovn_central.py | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/sos/plugins/ovn_central.py b/sos/plugins/ovn_central.py -index a9fcdf33e..b5ff96f66 100644 ---- a/sos/plugins/ovn_central.py -+++ b/sos/plugins/ovn_central.py -@@ -56,6 +56,8 @@ def get_tables_from_schema(self, filename, skip=[]): - self._log_error("DB schema %s has no 'tables' key" % filename) - - def add_database_output(self, tables, cmds, ovn_cmd): -+ if not tables: -+ return - for table in tables: - cmds.append('%s list %s' % (ovn_cmd, table)) - -From 0c9a1f0cb98c5256a0ec1dec83b7c94d3bb39170 Mon Sep 17 00:00:00 2001 -From: Pavel Moravec -Date: Wed, 4 Dec 2019 15:53:16 +0100 -Subject: [PATCH] [ovn_central] call podman exec without a timeout - -This is a workaround fix of a podman bug (see rhbz1732525) where -"podman ps" can hang when "podman exec .." is invoked in detached -mode under "timeout". - -Calling it without timeout works fine. - -This commit can be reverted once the podman bug is fixed. - -Resolves: #1875 - -Signed-off-by: Pavel Moravec ---- - sos/plugins/ovn_central.py | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/sos/plugins/ovn_central.py b/sos/plugins/ovn_central.py -index c74bf403..32a5e1cb 100644 ---- a/sos/plugins/ovn_central.py -+++ b/sos/plugins/ovn_central.py -@@ -26,7 +26,8 @@ class OVNCentral(Plugin): - if self._container_name: - cmd = "%s exec %s cat %s" % ( - self._container_runtime, self._container_name, filename) -- res = self.get_command_output(cmd) -+ # the timeout=None is just a workaround for "podman ps" hung bug -+ res = self.get_command_output(cmd, timeout=None) - if res['status'] != 0: - self._log_error("Could not retrieve DB schema file from " - "container %s" % self._container_name) -@@ -118,7 +119,8 @@ class OVNCentral(Plugin): - self._container_name, - cmd) for cmd in cmds] - -- self.add_cmd_output(cmds) -+ # the timeout=None is just a workaround for "podman ps" hung bug -+ self.add_cmd_output(cmds, timeout=None) - - self.add_copy_spec("/etc/sysconfig/ovn-northd") - --- -2.21.0 - diff --git a/SOURCES/sos-bz1766915-interim-sysroot-forbidden-paths.patch b/SOURCES/sos-bz1766915-interim-sysroot-forbidden-paths.patch deleted file mode 100644 index 5a0fd80..0000000 --- a/SOURCES/sos-bz1766915-interim-sysroot-forbidden-paths.patch +++ /dev/null @@ -1,354 +0,0 @@ -From 9a0ab16793a8388b2c3d3909fd3a087c5b6296d4 Mon Sep 17 00:00:00 2001 -From: Pavel Moravec -Date: Fri, 1 Nov 2019 12:13:23 -0400 -Subject: [PATCH 01/10] [Plugin] remove invalid {strip/join}_sysroot() - -Do not strip the sysroot path prefix when calling _do_copy_path() -for a symlink target and do not add the sysroot prefix when -testing for a forbidden path. - -Related: #1842 - -Signed-off-by: Pavel Moravec -Signed-off-by: Bryn M. Reeves ---- - sos/plugins/__init__.py | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py -index e75ec82e..4f1b73ce 100644 ---- a/sos/plugins/__init__.py -+++ b/sos/plugins/__init__.py -@@ -731,7 +731,7 @@ class Plugin(object): - - # skip recursive copying of symlink pointing to itself. - if (absdest != srcpath): -- self._do_copy_path(self.strip_sysroot(absdest)) -+ self._do_copy_path(absdest) - else: - self._log_debug("link '%s' points to itself, skipping target..." - % linkdest) -@@ -758,8 +758,6 @@ class Plugin(object): - return None - - def _is_forbidden_path(self, path): -- if self.use_sysroot(): -- path = self.join_sysroot(path) - return _path_in_path_list(path, self.forbidden_paths) - - def _copy_node(self, path, st): --- -2.21.0 - - -From aeeebf126fc9fdb0fd8c3b01418bef742bce78c3 Mon Sep 17 00:00:00 2001 -From: "Bryn M. Reeves" -Date: Fri, 1 Nov 2019 12:22:51 -0400 -Subject: [PATCH 02/10] [Plugin] fix destination paths in _do_copy_path() - -The path used to copy special device nodes and directories in -_do_copy_path() should be the destination path in the archive -(without sysroot prefix), and not the source path in the host -file system that includes this prefix. - -Related: #1842 - -Signed-off-by: Bryn M. Reeves ---- - sos/plugins/__init__.py | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py -index 4f1b73ce..60fbeaf7 100644 ---- a/sos/plugins/__init__.py -+++ b/sos/plugins/__init__.py -@@ -651,9 +651,13 @@ class Plugin(object): - self._copy_symlink(srcpath) - return - else: -- if stat.S_ISDIR(st.st_mode) and os.access(srcpath, os.R_OK): -- self._copy_dir(srcpath) -- return -+ if stat.S_ISDIR(st.st_mode) and os.access(srcpath, os.R_OK): -+ # copy empty directory -+ if not os.listdir(srcpath): -+ self.archive.add_dir(dest) -+ return -+ self._copy_dir(dest) -+ return - - # handle special nodes (block, char, fifo, socket) - if not (stat.S_ISREG(st.st_mode) or stat.S_ISDIR(st.st_mode)): -@@ -808,7 +808,7 @@ class Plugin(object): - ntype = _node_type(st) - self._log_debug("creating %s node at archive:'%s'" - % (ntype, dest)) -- self._copy_node(srcpath, st) -+ self._copy_node(dest, st) - return - - # if we get here, it's definitely a regular file (not a symlink or dir) --- -2.21.0 - - -From 05f3d5bda8f548459fabcd38f2d087d6ecef98a2 Mon Sep 17 00:00:00 2001 -From: "Bryn M. Reeves" -Date: Fri, 1 Nov 2019 12:25:09 -0400 -Subject: [PATCH 03/10] [kernel] remove trailing directory globs in forbidden - paths - -Since the forbidden path test now uses an exact match the trailing -globs ("/some/directory/path/to/exclude/*") used to exclude trace -related directories from collection lead to a failure to properly -blacklist these files: - -The glob is expanded, for e.g.: - - "/sys/kernel/debug/tracing/per_cpu/*" - -Expands to unclude a 'cpuN' sub-directory for each CPU present on -the machine. These expanded paths are then added to the forbidden -paths list for the plugin: - - /sys/kernel/debug/tracing/per_cpu/cpu0 - /sys/kernel/debug/tracing/per_cpu/cpu1 - ... - -When an attempt is made to collect the entire "per_cpu" directory -a check is made for the full "/sys/kernel/debug/tracing/per_cpu" -path against each entry in the forbidden paths list. Since this is -a prefix of the actual paths stored no match is returned and the -collection is permitted. - -Remove the trailing globs from these directory paths and prevent -any collection of the directories they reference by the plugin. - -Related: #1842 - -Signed-off-by: Bryn M. Reeves ---- - sos/plugins/kernel.py | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/sos/plugins/kernel.py b/sos/plugins/kernel.py -index 88b14689..5c852143 100644 ---- a/sos/plugins/kernel.py -+++ b/sos/plugins/kernel.py -@@ -89,9 +89,9 @@ class Kernel(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): - self.add_forbidden_path([ - '/sys/kernel/debug/tracing/trace_pipe', - '/sys/kernel/debug/tracing/README', -- '/sys/kernel/debug/tracing/trace_stat/*', -- '/sys/kernel/debug/tracing/per_cpu/*', -- '/sys/kernel/debug/tracing/events/*', -+ '/sys/kernel/debug/tracing/trace_stat', -+ '/sys/kernel/debug/tracing/per_cpu', -+ '/sys/kernel/debug/tracing/events', - '/sys/kernel/debug/tracing/free_buffer', - '/sys/kernel/debug/tracing/trace_marker', - '/sys/kernel/debug/tracing/trace_marker_raw', --- -2.21.0 - - -From 801c71b33dcfeaa980baa9f377b721bdd26aa5e8 Mon Sep 17 00:00:00 2001 -From: "Bryn M. Reeves" -Date: Fri, 1 Nov 2019 16:53:29 +0000 -Subject: [PATCH 04/10] [tests] fix test_copy_dir_forbidden_path - -Rather than call just Plugin.setup() and Plugin._do_copy_path(), -add an add_copy_spec() call to the mock plugin setup() method, -and invoke copying by calling the Plugin.collect() method. - -Related: #1845 - -Signed-off-by: Bryn M. Reeves ---- - tests/plugin_tests.py | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/tests/plugin_tests.py b/tests/plugin_tests.py -index b8760429..6522fe14 100644 ---- a/tests/plugin_tests.py -+++ b/tests/plugin_tests.py -@@ -81,6 +81,7 @@ class ForbiddenMockPlugin(Plugin): - plugin_name = "forbidden" - - def setup(self): -+ self.add_copy_spec("tests") - self.add_forbidden_path("tests") - - -@@ -235,7 +236,7 @@ class PluginTests(unittest.TestCase): - }) - p.archive = MockArchive() - p.setup() -- p._do_copy_path("tests") -+ p.collect() - self.assertEquals(p.archive.m, {}) - - --- -2.21.0 - - -From c4182ebd52af523261d2e7ef75affbb88eaf31fb Mon Sep 17 00:00:00 2001 -From: "Bryn M. Reeves" -Date: Mon, 4 Nov 2019 10:45:15 +0000 -Subject: [PATCH 05/10] [Plugin] use correct source path when copying - directories - -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 60fbeaf7..240fe9f1 100644 ---- a/sos/plugins/__init__.py -+++ b/sos/plugins/__init__.py -@@ -656,7 +656,7 @@ class Plugin(object): - if not os.listdir(srcpath): - self.archive.add_dir(dest) - return -- self._copy_dir(dest) -+ self._copy_dir(srcpath) - return - - # handle special nodes (block, char, fifo, socket) --- -2.21.0 - - -From 68f4d7cc7adde00171af842b5bc808f41d888a87 Mon Sep 17 00:00:00 2001 -From: "Bryn M. Reeves" -Date: Mon, 4 Nov 2019 10:48:01 +0000 -Subject: [PATCH 06/10] [Plugin] improve _copy_dir() variable naming - -Directory entries found in _copy_dir() may be either files or -sub-directories: reflect this in the names of local variables. - -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 240fe9f1..1a1464c1 100644 ---- a/sos/plugins/__init__.py -+++ b/sos/plugins/__init__.py -@@ -738,10 +738,11 @@ class Plugin(object): - - def _copy_dir(self, srcpath): - try: -- for afile in os.listdir(srcpath): -+ for name in os.listdir(srcpath): - self._log_debug("recursively adding '%s' from '%s'" -- % (afile, srcpath)) -- self._do_copy_path(os.path.join(srcpath, afile), dest=None) -+ % (name, srcpath)) -+ path = os.path.join(srcpath, name) -+ self._do_copy_path(path) - except OSError as e: - if e.errno == errno.ELOOP: - msg = "Too many levels of symbolic links copying" --- -2.21.0 - - -From ad3adef07c32aee5bdd438706c6c1d4590ff8297 Mon Sep 17 00:00:00 2001 -From: "Bryn M. Reeves" -Date: Mon, 4 Nov 2019 14:13:00 +0000 -Subject: [PATCH 07/10] [ceph] fix directory blacklist style - -Plugins must use 'path/to/exclude' rather than 'path/to/exclude/*' -in order to omit a directory and all its content from the report. - -Signed-off-by: Bryn M. Reeves ---- - sos/plugins/ceph.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/sos/plugins/ceph.py b/sos/plugins/ceph.py -index 6e340c69..43284bc8 100644 ---- a/sos/plugins/ceph.py -+++ b/sos/plugins/ceph.py -@@ -103,8 +103,8 @@ class Ceph(Plugin, RedHatPlugin, UbuntuPlugin): - "/var/lib/ceph/*keyring*", - "/var/lib/ceph/*/*keyring*", - "/var/lib/ceph/*/*/*keyring*", -- "/var/lib/ceph/osd/*", -- "/var/lib/ceph/mon/*", -+ "/var/lib/ceph/osd", -+ "/var/lib/ceph/mon", - # Excludes temporary ceph-osd mount location like - # /var/lib/ceph/tmp/mnt.XXXX from sos collection. - "/var/lib/ceph/tmp/*mnt*", --- -2.21.0 - - -From 4d1576b04d35902ce44d26d6a5b2219e6f9c175a Mon Sep 17 00:00:00 2001 -From: "Bryn M. Reeves" -Date: Mon, 4 Nov 2019 14:15:55 +0000 -Subject: [PATCH 09/10] [openstack_octavia] fix directory blacklist style - -Plugins must use 'path/to/exclude' rather than 'path/to/exclude/*' -in order to omit a directory and all its content from the report. - -Signed-off-by: Bryn M. Reeves ---- - sos/plugins/openstack_octavia.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sos/plugins/openstack_octavia.py b/sos/plugins/openstack_octavia.py -index b97c83fa..ccdcd4c9 100644 ---- a/sos/plugins/openstack_octavia.py -+++ b/sos/plugins/openstack_octavia.py -@@ -30,7 +30,7 @@ class OpenStackOctavia(Plugin): - ]) - - # don't collect certificates -- self.add_forbidden_path("/etc/octavia/certs/") -+ self.add_forbidden_path("/etc/octavia/certs") - - # logs - if self.get_option("all_logs"): --- -2.21.0 - - -From 1fd194191a56c51052f0c24ddeb3bbf9088ae0ca Mon Sep 17 00:00:00 2001 -From: "Bryn M. Reeves" -Date: Mon, 4 Nov 2019 14:16:13 +0000 -Subject: [PATCH 10/10] [vdsm] fix directory blacklist style - -Plugins must use 'path/to/exclude' rather than 'path/to/exclude/*' -in order to omit a directory and all its content from the report. - -Signed-off-by: Bryn M. Reeves ---- - sos/plugins/vdsm.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/sos/plugins/vdsm.py b/sos/plugins/vdsm.py -index b2a1ca58..69672643 100644 ---- a/sos/plugins/vdsm.py -+++ b/sos/plugins/vdsm.py -@@ -60,9 +60,9 @@ class Vdsm(Plugin, RedHatPlugin): - plugin_name = 'vdsm' - - def setup(self): -- self.add_forbidden_path('/etc/pki/vdsm/keys/*') -+ self.add_forbidden_path('/etc/pki/vdsm/keys') - self.add_forbidden_path('/etc/pki/vdsm/libvirt-spice/*-key.*') -- self.add_forbidden_path('/etc/pki/libvirt/private/*') -+ self.add_forbidden_path('/etc/pki/libvirt/private') - - self.add_cmd_output('service vdsmd status') - self.add_cmd_output('service supervdsmd status') - --- -2.21.0 - diff --git a/SOURCES/sos-bz1776549-podman-buildah-rootless.patch b/SOURCES/sos-bz1776549-podman-buildah-rootless.patch new file mode 100644 index 0000000..8158b2b --- /dev/null +++ b/SOURCES/sos-bz1776549-podman-buildah-rootless.patch @@ -0,0 +1,142 @@ +From 1875213788f4472cc11ce8e732cd4780e99ca477 Mon Sep 17 00:00:00 2001 +From: Pavel Moravec +Date: Fri, 8 May 2020 15:38:36 +0200 +Subject: [PATCH] [containers_common] collect rootless containers info + +Add the ability to collect data/info about rootless podman/buildah +containers, in particular: + +- containers_common plugopt 'rootlessusers' as a list of users to inspect +- for each user, collect: + - its containers config + - [podman|buildah] info and [UID|GID] map +- collect user-status and few user-related config files + +Resolves: #2055 + +Signed-off-by: Pavel Moravec +Signed-off-by: Jake Hunsaker +--- + sos/plugins/containers_common.py | 29 +++++++++++++++++++++++++ + 1 file changed, 29 insertions(+) + +diff --git a/sos/plugins/containers_common.py b/sos/plugins/containers_common.py +index 99ae88fe..9a878849 100644 +--- a/sos/plugins/containers_common.py ++++ b/sos/plugins/containers_common.py +@@ -9,6 +9,7 @@ + # See the LICENSE file in the source distribution for further information. + + from sos.plugins import Plugin, RedHatPlugin, UbuntuPlugin ++import os + + + class ContainersCommon(Plugin, RedHatPlugin, UbuntuPlugin): +@@ -17,11 +18,39 @@ class ContainersCommon(Plugin, RedHatPlugin, UbuntuPlugin): + plugin_name = 'containers_common' + profiles = ('container', ) + packages = ('containers-common', ) ++ option_list = [ ++ ('rootlessusers', 'colon-separated list of users\' containers info', ++ '', ''), ++ ] + + def setup(self): + self.add_copy_spec([ + '/etc/containers/*', + '/usr/share/containers/*', ++ '/etc/subuid', ++ '/etc/subgid', + ]) ++ self.add_cmd_output(['loginctl user-status']) ++ ++ users_opt = self.get_option('rootlessusers') ++ users_list = [] ++ if users_opt: ++ users_list = [x for x in users_opt.split(':') if x] ++ ++ user_subcmds = [ ++ 'info', ++ 'unshare cat /proc/self/uid_map', ++ 'unshare cat /proc/self/gid_map' ++ ] ++ for user in users_list: ++ # collect user's containers' config ++ self.add_copy_spec( ++ '%s/.config/containers/' % (os.path.expanduser('~%s') % user)) ++ # collect the user's podman/buildah info and uid/guid maps ++ for binary in ['/usr/bin/podman', '/usr/bin/buildah']: ++ for cmd in user_subcmds: ++ self.add_cmd_output([ ++ 'machinectl -q shell %s@ %s %s' % (user, binary, cmd) ++ ]) + + # vim: set et ts=4 sw=4 : +-- +2.21.3 + +From c2d4c7d1f3ecf6ac59c665cb5138cb2ddda71b3d Mon Sep 17 00:00:00 2001 +From: Pavel Moravec +Date: Fri, 22 May 2020 08:17:30 +0200 +Subject: [PATCH] [containers_common] fix user's home expansion + +Apply os.path.expanduser on ~[user], not ~%s . + +Relates to: #2082 + +Signed-off-by: Pavel Moravec +Signed-off-by: Jake Hunsaker +--- + sos/plugins/containers_common.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sos/plugins/containers_common.py b/sos/plugins/containers_common.py +index 9a878849..da360c7e 100644 +--- a/sos/plugins/containers_common.py ++++ b/sos/plugins/containers_common.py +@@ -45,7 +45,7 @@ class ContainersCommon(Plugin, RedHatPlugin, UbuntuPlugin): + for user in users_list: + # collect user's containers' config + self.add_copy_spec( +- '%s/.config/containers/' % (os.path.expanduser('~%s') % user)) ++ '%s/.config/containers/' % (os.path.expanduser('~%s' % user))) + # collect the user's podman/buildah info and uid/guid maps + for binary in ['/usr/bin/podman', '/usr/bin/buildah']: + for cmd in user_subcmds: +-- +2.21.3 + +From 569f261801d3a4da2852c0b40be78b701056edaa Mon Sep 17 00:00:00 2001 +From: Pavel Moravec +Date: Fri, 22 May 2020 08:20:11 +0200 +Subject: [PATCH] [containers_common] Call machinectl on foreground + +Commands like: + +machinectl -q shell user1@ .. + +hang if not called on foreground / with terminal. + +Resolves: #2082 + +Signed-off-by: Pavel Moravec +Signed-off-by: Jake Hunsaker +--- + sos/plugins/containers_common.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sos/plugins/containers_common.py b/sos/plugins/containers_common.py +index da360c7e..92c2e9e8 100644 +--- a/sos/plugins/containers_common.py ++++ b/sos/plugins/containers_common.py +@@ -51,6 +51,6 @@ class ContainersCommon(Plugin, RedHatPlugin, UbuntuPlugin): + for cmd in user_subcmds: + self.add_cmd_output([ + 'machinectl -q shell %s@ %s %s' % (user, binary, cmd) +- ]) ++ ], foreground=True) + + # vim: set et ts=4 sw=4 : +-- +2.21.3 + diff --git a/SOURCES/sos-bz1785546-nvmetcli.patch b/SOURCES/sos-bz1785546-nvmetcli.patch new file mode 100644 index 0000000..dec2ef6 --- /dev/null +++ b/SOURCES/sos-bz1785546-nvmetcli.patch @@ -0,0 +1,68 @@ +From 83d56e2b443edc733ffc5a5286ce8392de99586e Mon Sep 17 00:00:00 2001 +From: Pavel Moravec +Date: Mon, 11 May 2020 14:22:18 +0200 +Subject: [PATCH] [nvmetcli] Add new plugin for NVMe Target CLI + +Resolves: #2056 + +Signed-off-by: Pavel Moravec +Signed-off-by: Jake Hunsaker +--- + sos/plugins/nvmetcli.py | 32 ++++++++++++++++++++++++++++++++ + 1 file changed, 32 insertions(+) + create mode 100644 sos/plugins/nvmetcli.py + +diff --git a/sos/plugins/nvmetcli.py b/sos/plugins/nvmetcli.py +new file mode 100644 +index 00000000..b66a3a13 +--- /dev/null ++++ b/sos/plugins/nvmetcli.py +@@ -0,0 +1,32 @@ ++# Copyright (C) 2020 Red Hat, Inc., Nitin Yewale ++ ++# This file is part of the sos project: https://github.com/sosreport/sos ++# ++# This copyrighted material is made available to anyone wishing to use, ++# modify, copy, or redistribute it subject to the terms and conditions of ++# version 2 of the GNU General Public License. ++# ++# See the LICENSE file in the source distribution for further information. ++ ++from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin ++ ++ ++class NvmetCli(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): ++ ++ short_desc = 'Collect config and system information for nvmetcli' ++ ++ packages = ('nvmetcli', ) ++ profiles = ('storage', ) ++ plugin_name = 'nvmetcli' ++ ++ def setup(self): ++ self.add_cmd_output([ ++ "nvmetcli ls" ++ ]) ++ self.add_journal(units=["nvme", "nvmet", "nvmet_rdma"]) ++ self.add_copy_spec([ ++ "/sys/kernel/config/nvmet", ++ "/etc/nvmet/config.json", ++ ]) ++ ++# vim: set et ts=4 sw=4 : +-- +diff --git a/sos/plugins/nvmetcli.py b/sos/plugins/nvmetcli.py +--- a/sos/plugins/nvmetcli.py ++++ b/sos/plugins/nvmetcli.py +@@ -12,6 +12,8 @@ from sos.plugins import Plugin, RedHatPl + + + class NvmetCli(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): ++ """Collect config and system information for nvmetcli ++ """ + + short_desc = 'Collect config and system information for nvmetcli' + +-- +2.21.3 + diff --git a/SOURCES/sos-bz1814867-insights-archive.patch b/SOURCES/sos-bz1814867-insights-archive.patch new file mode 100644 index 0000000..b36308d --- /dev/null +++ b/SOURCES/sos-bz1814867-insights-archive.patch @@ -0,0 +1,78 @@ +From 0766cc739d424932e18c250c88f0227da06ecaed Mon Sep 17 00:00:00 2001 +From: Pavel Moravec +Date: Sun, 19 Apr 2020 16:38:50 +0200 +Subject: [PATCH] [insights] collect insights-client dump + +Collect data of "insights-client --offline" into +sos_commands/insights/insights-client-dump directory. + +Resolves: #2030 + +Signed-off-by: Pavel Moravec +Signed-off-by: Jake Hunsaker +--- + sos/plugins/insights.py | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/sos/plugins/insights.py b/sos/plugins/insights.py +index a8fa4e5f..17b99980 100644 +--- a/sos/plugins/insights.py ++++ b/sos/plugins/insights.py +@@ -31,6 +31,10 @@ class RedHatInsights(Plugin, RedHatPlugin): + else: + self.add_copy_spec("/var/log/insights-client/insights-client.log") + ++ # Collect insights-client report data into given dump dir ++ path = self.get_cmd_output_path(name="insights-client-dump") ++ self.add_cmd_output("insights-client --offline --output-dir %s" % path) ++ + def postproc(self): + for conf in self.config: + self.do_file_sub( +-- +2.21.3 + +From f41a12032d1b0caf962145ddd5026b3798931026 Mon Sep 17 00:00:00 2001 +From: Pavel Moravec +Date: Tue, 12 May 2020 09:58:26 +0200 +Subject: [PATCH] [insights] collect insights dump output in deterministic + filename + +Currently, "insights-client --offline" stdout is stored in filename like +insights-client_--offline_--output-dir_.var.tmp.sos.cbl0ox16. (and so on) + +Let make the filename unified and deterministic. + +Also add the trailing vim expand tabs comment. + +Resolves: #2058 + +Signed-off-by: Pavel Moravec +Signed-off-by: Bryan Quigley +--- + sos/plugins/insights.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/sos/plugins/insights.py b/sos/plugins/insights.py +index 75d521bc..e50bc8fb 100644 +--- a/sos/plugins/insights.py ++++ b/sos/plugins/insights.py +@@ -33,7 +33,8 @@ class RedHatInsights(Plugin, RedHatPlugin): + + # Collect insights-client report data into given dump dir + path = self.get_cmd_output_path(name="insights-client-dump") +- self.add_cmd_output("insights-client --offline --output-dir %s" % path) ++ self.add_cmd_output("insights-client --offline --output-dir %s" % path, ++ suggest_filename="insights-client-dump.log") + + def postproc(self): + for conf in self.config: +@@ -44,3 +45,5 @@ class RedHatInsights(Plugin, RedHatPlugin): + self.do_file_sub( + conf, r'(proxy[\t\ ]*=.*)(:)(.*)(@.*)', r'\1\2********\4' + ) ++ ++# vim: set et ts=4 sw=4 : +-- +2.21.3 + diff --git a/SOURCES/sos-bz1819662-rabbitmqctl-on-foreground.patch b/SOURCES/sos-bz1819662-rabbitmqctl-on-foreground.patch new file mode 100644 index 0000000..c8cb452 --- /dev/null +++ b/SOURCES/sos-bz1819662-rabbitmqctl-on-foreground.patch @@ -0,0 +1,34 @@ +From c805cd23b8bd73986f2546a711edd42150d855ba Mon Sep 17 00:00:00 2001 +From: Pavel Moravec +Date: Fri, 22 May 2020 12:05:00 +0200 +Subject: [PATCH] [rabbitmq] emulate TTY via timeout foreground + +"docker exec -t" might hang without a terminal. Let emulate TTY via +timeout --foreground instead. + +Resolves: #2083 + +Signed-off-by: Pavel Moravec +Signed-off-by: Jake Hunsaker +--- + sos/plugins/rabbitmq.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sos/plugins/rabbitmq.py b/sos/plugins/rabbitmq.py +index 9ebf6c0b..8d9a16ff 100644 +--- a/sos/plugins/rabbitmq.py ++++ b/sos/plugins/rabbitmq.py +@@ -38,8 +38,8 @@ class RabbitMQ(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + for container in container_names: + self.add_cmd_output('docker logs {0}'.format(container)) + self.add_cmd_output( +- 'docker exec -t {0} rabbitmqctl report' +- .format(container) ++ 'docker exec {0} rabbitmqctl report' ++ .format(container), foreground=True + ) + else: + self.add_cmd_output("rabbitmqctl report") +-- +2.21.3 + diff --git a/SOURCES/sos-bz1823488-containers-common.patch b/SOURCES/sos-bz1823488-containers-common.patch new file mode 100644 index 0000000..7eb2c77 --- /dev/null +++ b/SOURCES/sos-bz1823488-containers-common.patch @@ -0,0 +1,107 @@ +From 943b3c3cd096f8efaeb4f0f2008391abe4c9f7e2 Mon Sep 17 00:00:00 2001 +From: Pavel Moravec +Date: Sat, 2 May 2020 17:22:35 +0200 +Subject: [PATCH] [containers_common] Add plugin for common containers configs + +Move collection of whole /etc/containers and /usr/share/containers to +one containers_common plugin enabled by the package of the same name. + +Since the package is a common dependency for buildah and podman, no regression +in default data collection happens. + +Resolves: #2040 + +Signed-off-by: Pavel Moravec +Signed-off-by: Jake Hunsaker +--- + sos/plugins/buildah.py | 7 ------- + sos/plugins/containers_common.py | 27 +++++++++++++++++++++++++ + sos/plugins/podman.py | 7 ------- + 3 files changed, 27 insertions(+), 14 deletions(-) + create mode 100644 sos/plugins/containers_common.py + +diff --git a/sos/plugins/buildah.py b/sos/plugins/buildah.py +index 9d237a53..4b8b3b0a 100644 +--- a/sos/plugins/buildah.py ++++ b/sos/plugins/buildah.py +@@ -20,13 +20,6 @@ class Buildah(Plugin, RedHatPlugin): + profiles = ('container',) + + def setup(self): +- self.add_copy_spec([ +- "/etc/containers/registries.conf", +- "/etc/containers/storage.conf", +- "/etc/containers/mounts.conf", +- "/etc/containers/policy.json", +- ]) +- + subcmds = [ + 'containers', + 'containers --all', +diff --git a/sos/plugins/containers_common.py b/sos/plugins/containers_common.py +new file mode 100644 +index 00000000..99ae88fe +--- /dev/null ++++ b/sos/plugins/containers_common.py +@@ -0,0 +1,27 @@ ++# Copyright (C) 2020 Red Hat, Inc., Pavel Moravec ++ ++# This file is part of the sos project: https://github.com/sosreport/sos ++# ++# This copyrighted material is made available to anyone wishing to use, ++# modify, copy, or redistribute it subject to the terms and conditions of ++# version 2 of the GNU General Public License. ++# ++# See the LICENSE file in the source distribution for further information. ++ ++from sos.plugins import Plugin, RedHatPlugin, UbuntuPlugin ++ ++ ++class ContainersCommon(Plugin, RedHatPlugin, UbuntuPlugin): ++ ++ short_desc = 'Common container configs under {/etc,/usr/share}/containers' ++ plugin_name = 'containers_common' ++ profiles = ('container', ) ++ packages = ('containers-common', ) ++ ++ def setup(self): ++ self.add_copy_spec([ ++ '/etc/containers/*', ++ '/usr/share/containers/*', ++ ]) ++ ++# vim: set et ts=4 sw=4 : +diff --git a/sos/plugins/podman.py b/sos/plugins/podman.py +index f6875197..f6632776 100644 +--- a/sos/plugins/podman.py ++++ b/sos/plugins/podman.py +@@ -27,13 +27,6 @@ class Podman(Plugin, RedHatPlugin, UbuntuPlugin): + ] + + def setup(self): +- self.add_copy_spec([ +- "/etc/containers/registries.conf", +- "/etc/containers/storage.conf", +- "/etc/containers/mounts.conf", +- "/etc/containers/policy.json", +- ]) +- + self.add_env_var([ + 'HTTP_PROXY', + 'HTTPS_PROXY', +-- +diff --git a/sos/plugins/containers_common.py b/sos/plugins/containers_common.py +--- a/sos/plugins/containers_common.py ++++ b/sos/plugins/containers_common.py +@@ -13,6 +13,8 @@ import os + + + class ContainersCommon(Plugin, RedHatPlugin, UbuntuPlugin): ++ """Common container configs under {/etc,/usr/share}/containers ++ """ + + short_desc = 'Common container configs under {/etc,/usr/share}/containers' + plugin_name = 'containers_common' +-- +2.21.3 + diff --git a/SOURCES/sos-bz1825283-env-host-in-container.patch b/SOURCES/sos-bz1825283-env-host-in-container.patch new file mode 100644 index 0000000..4497123 --- /dev/null +++ b/SOURCES/sos-bz1825283-env-host-in-container.patch @@ -0,0 +1,33 @@ +From d9dd8ad790b6799491e4891ae19bb85124ab6794 Mon Sep 17 00:00:00 2001 +From: Robert Thomas Manes +Date: Fri, 17 Apr 2020 10:29:47 -0400 +Subject: [PATCH] [redhat] fix RH containers without sysroot Attempting to run + sosreport in a container currently will always traceback unless + ENV_HOST_SYSROOT is set to '/'. + +Allow default NoneType sysroot to function as well. + +Resolves: #2028 + +Signed off by: Robb Manes +Signed-off-by: Jake Hunsaker +--- + sos/policies/redhat.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sos/policies/redhat.py b/sos/policies/redhat.py +index ba9bacf4..16cb23ec 100644 +--- a/sos/policies/redhat.py ++++ b/sos/policies/redhat.py +@@ -144,7 +144,7 @@ class RedHatPolicy(LinuxPolicy): + self._in_container = True + if ENV_HOST_SYSROOT in os.environ: + self._host_sysroot = os.environ[ENV_HOST_SYSROOT] +- use_sysroot = self._in_container and self._host_sysroot != '/' ++ use_sysroot = self._in_container and self._host_sysroot is not None + if use_sysroot: + host_tmp_dir = os.path.abspath(self._host_sysroot + self._tmp_dir) + self._tmp_dir = host_tmp_dir +-- +2.21.3 + diff --git a/SOURCES/sos-bz1838123-xdp-plugin.patch b/SOURCES/sos-bz1838123-xdp-plugin.patch new file mode 100644 index 0000000..cb55e32 --- /dev/null +++ b/SOURCES/sos-bz1838123-xdp-plugin.patch @@ -0,0 +1,69 @@ +From af5597bfa41521e10f4ef5095f137b2ef5bcd661 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= +Date: Wed, 20 May 2020 15:05:03 +0200 +Subject: [PATCH] [xdp] Add XDP plugin +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This adds a plugin for gathering information about the loaded XDP programs +on a system, using the xdp-loader tool in the xdp-tools package. This is +complementary with the existing eBPF plugin, because this plugin supports +getting status for multiple XDP programs on each interface as supported by +libxdp. + +For now, this just prints the output of 'xdp-loader status' which will list +any XDP programs attached. We don't currently support structured +output (such as JSON) from xdp-tools, but should we add that in the future +we can of course update this plugin. + +Signed-off-by: Toke Høiland-Jørgensen +Signed-off-by: Jake Hunsaker +--- + sos/plugins/xdp.py | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + create mode 100644 sos/plugins/xdp.py + +diff --git a/sos/plugins/xdp.py b/sos/plugins/xdp.py +new file mode 100644 +index 00000000..2e18048b +--- /dev/null ++++ b/sos/plugins/xdp.py +@@ -0,0 +1,21 @@ ++# This file is part of the sos project: https://github.com/sosreport/sos ++# ++# This copyrighted material is made available to anyone wishing to use, ++# modify, copy, or redistribute it subject to the terms and conditions of ++# version 2 of the GNU General Public License. ++# ++# See the LICENSE file in the source distribution for further information. ++ ++from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, \ ++ UbuntuPlugin ++ ++ ++class Xdp(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): ++ ++ short_desc = 'XDP program information' ++ plugin_name = 'xdp' ++ profiles = ('system', 'kernel', 'network') ++ packages = ('xdp-tools',) ++ ++ def setup(self): ++ self.add_cmd_output('xdp-loader status') +-- +diff --git a/sos/plugins/xdp.py b/sos/plugins/xdp.py +--- a/sos/plugins/xdp.py ++++ b/sos/plugins/xdp.py +@@ -11,6 +11,8 @@ from sos.plugins import Plugin, RedHatPl + + + class Xdp(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): ++ """XDP program information ++ """ + + short_desc = 'XDP program information' + plugin_name = 'xdp' +-- +2.21.3 + diff --git a/SOURCES/sos-bz1843562-gluster-volume-specific.patch b/SOURCES/sos-bz1843562-gluster-volume-specific.patch new file mode 100644 index 0000000..c23b3ee --- /dev/null +++ b/SOURCES/sos-bz1843562-gluster-volume-specific.patch @@ -0,0 +1,37 @@ +From fc831f0072c8f751f8fc2f46eb5c3e6aa9eba0a9 Mon Sep 17 00:00:00 2001 +From: Pavel Moravec +Date: Mon, 8 Jun 2020 14:58:15 +0200 +Subject: [PATCH] [gluster] fix gluster volume splitlines iteration + +Iterate via "gluster volue info" output split to lines, +and dont truncate the trailing character (a relict from past different +content parsing). + +Resolves: #2106 + +Signed-off-by: Pavel Moravec +Signed-off-by: Jake Hunsaker +--- + sos/plugins/gluster.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sos/plugins/gluster.py b/sos/plugins/gluster.py +index eb236f1e..9540d323 100644 +--- a/sos/plugins/gluster.py ++++ b/sos/plugins/gluster.py +@@ -104,10 +104,10 @@ class Gluster(Plugin, RedHatPlugin): + + volume_cmd = self.collect_cmd_output("gluster volume info") + if volume_cmd['status'] == 0: +- for line in volume_cmd['output']: ++ for line in volume_cmd['output'].splitlines(): + if not line.startswith("Volume Name:"): + continue +- volname = line[12:-1] ++ volname = line[12:] + self.add_cmd_output([ + "gluster volume get %s all" % volname, + "gluster volume geo-replication %s status" % volname, +-- +2.26.2 + diff --git a/SOURCES/sos-bz1843754-powerpc-logs-for-components.patch b/SOURCES/sos-bz1843754-powerpc-logs-for-components.patch new file mode 100644 index 0000000..4e6d8a2 --- /dev/null +++ b/SOURCES/sos-bz1843754-powerpc-logs-for-components.patch @@ -0,0 +1,150 @@ +From f7292b0121408a77d9e5ee94a046025c256cd021 Mon Sep 17 00:00:00 2001 +From: Mamatha Inamdar +Date: Wed, 20 May 2020 14:07:13 +0530 +Subject: [PATCH] [memory]:Add support to collect memory logs + +This patch updates memory plugin to collect +hugepage memory information + +Resolves: #2078 + +Signed-off-by: Mamatha Inamdar +Signed-off-by: Jake Hunsaker +--- + sos/plugins/memory.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/sos/plugins/memory.py b/sos/plugins/memory.py +index aefb27b8..b358e44d 100644 +--- a/sos/plugins/memory.py ++++ b/sos/plugins/memory.py +@@ -27,7 +27,8 @@ class Memory(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin, CosPlugin): + "/proc/pagetypeinfo", + "/proc/vmallocinfo", + "/sys/kernel/mm/ksm", +- "/sys/kernel/mm/transparent_hugepage/enabled" ++ "/sys/kernel/mm/transparent_hugepage/enabled", ++ "/sys/kernel/mm/hugepages" + ]) + self.add_cmd_output("free", root_symlink="free") + self.add_cmd_output([ +-- +2.26.2 + +From 2826d4ad19afaa91e2e25970eafe9353d844bfac Mon Sep 17 00:00:00 2001 +From: Mamatha Inamdar +Date: Wed, 20 May 2020 14:05:48 +0530 +Subject: [PATCH] [scsi]:Add support to collect scsi logs + +This patch updates scsi plugin to collect +virtual I/O server information. + +This patch reads lspath, lsmap and lsnports data +which provides information about virtual device +path, ports and mapping Information + +Related: #2078 + +Signed-off-by: Mamatha Inamdar +Signed-off-by: Jake Hunsaker +--- + sos/plugins/scsi.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/sos/plugins/scsi.py b/sos/plugins/scsi.py +index bf6c2862..7a8efabb 100644 +--- a/sos/plugins/scsi.py ++++ b/sos/plugins/scsi.py +@@ -30,6 +30,9 @@ class Scsi(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): + + self.add_cmd_output("lsscsi -i", suggest_filename="lsscsi") + self.add_cmd_output("sg_map -x") ++ self.add_cmd_output("lspath") ++ self.add_cmd_output("lsmap -all") ++ self.add_cmd_output("lsnports") + + scsi_hosts = glob("/sys/class/scsi_host/*") + self.add_udev_info(scsi_hosts, attrs=True) +-- +2.26.2 + +From 56bfae87ee5e613bb6743026a7285320f19e66d5 Mon Sep 17 00:00:00 2001 +From: Mamatha Inamdar +Date: Wed, 20 May 2020 14:03:58 +0530 +Subject: [PATCH] [infiniband]:Add support to collect InfiniBand logs + +This patch updates Infiniband plugin to collect +InfiniBand switch node information. + +Related: #2078 + +Signed-off-by: Mamatha Inamdar +Signed-off-by: Jake Hunsaker +--- + sos/plugins/infiniband.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/sos/plugins/infiniband.py b/sos/plugins/infiniband.py +index 83c32791..670f05b6 100644 +--- a/sos/plugins/infiniband.py ++++ b/sos/plugins/infiniband.py +@@ -33,7 +33,8 @@ class Infiniband(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + "ibv_devices", + "ibv_devinfo -v", + "ibstat", +- "ibstatus" ++ "ibstatus", ++ "ibswitches" + ]) + + # run below commands for every IB device and its active port +-- +2.26.2 + +From d8aa0a17d94ec08fc899fce3c343f25d19134eb3 Mon Sep 17 00:00:00 2001 +From: Mamatha Inamdar +Date: Wed, 20 May 2020 14:01:40 +0530 +Subject: [PATCH] [kdump]:Add support to collect kdump & fadump logs + +This patch updates kdump plugin to collect kdump and +fadump information. + +In this patch we are reading, kdump configuration,panic +and kexec_loaded files which are helpful to debug kdump +failure issues + +This patch also reads sys/kernel/fadump_enabled +and /sys/kernel/fadump/enabled both files as there +is upstream work to deprecate these files + +Related: #2078 + +Signed-off-by: Mamatha Inamdar +Signed-off-by: Jake Hunsaker +--- + sos/plugins/kdump.py | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/sos/plugins/kdump.py b/sos/plugins/kdump.py +index 5fc25a9b..41d08b5b 100644 +--- a/sos/plugins/kdump.py ++++ b/sos/plugins/kdump.py +@@ -21,6 +21,15 @@ class KDump(Plugin): + def setup(self): + self.add_copy_spec([ + "/proc/cmdline", ++ "/etc/sysconfig/kdump", ++ "/proc/sys/kernel/panic", ++ "/proc/sys/kernel/panic_on_oops", ++ "/sys/kernel/kexec_loaded", ++ "/sys/kernel/fadump_enabled", ++ "/sys/kernel/fadump/enabled", ++ "/sys/kernel/fadump_registered", ++ "/sys/kernel/fadump/registered", ++ "/sys/kernel/fadump/mem_reserved", + "/sys/kernel/kexec_crash_loaded", + "/sys/kernel/kexec_crash_size" + ]) +-- +2.26.2 + diff --git a/SOURCES/sos-bz1844853-nfs-etc-exports.patch b/SOURCES/sos-bz1844853-nfs-etc-exports.patch new file mode 100644 index 0000000..c52acf9 --- /dev/null +++ b/SOURCES/sos-bz1844853-nfs-etc-exports.patch @@ -0,0 +1,120 @@ +From fad72dbacc7e5c3c2721e452823750974ea31550 Mon Sep 17 00:00:00 2001 +From: Pavel Moravec +Date: Mon, 18 May 2020 11:41:17 +0200 +Subject: [PATCH] [nfs] merge nfsserver plugin into nfs one + +nfsserver plugin enabledness relies on legacy init scripts. A more +appropriate way to idenfity a NFS server is via nfs-utils package +(though it could be present also on a NFS client). + +As that package enables nfs plugin, it is reasonable to merge the +plugins into one. + +Closes: #2061 +Resolves: #2073 + +Signed-off-by: Pavel Moravec +Signed-off-by: Jake Hunsaker +--- + sos/plugins/nfs.py | 14 +++++++-- + sos/plugins/nfsserver.py | 54 --------------------------------- + 2 files changed, 12 insertions(+), 56 deletions(-) + delete mode 100644 sos/plugins/nfsserver.py + +diff --git a/sos/plugins/nfs.py b/sos/plugins/nfs.py +index bebe0362..1c0d8fc8 100644 +--- a/sos/plugins/nfs.py ++++ b/sos/plugins/nfs.py +@@ -14,7 +14,7 @@ class Nfs(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + """ + plugin_name = 'nfs' + profiles = ('storage', 'network', 'nfs') +- packages = ['nfs-utils'] ++ packages = ('nfs-utils', ) + + def setup(self): + self.add_copy_spec([ +@@ -24,8 +24,18 @@ class Nfs(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): + "/proc/fs/nfsfs/servers", + "/proc/fs/nfsfs/volumes", + "/run/sysconfig/nfs-utils", ++ "/etc/exports", ++ "/etc/exports.d", ++ "/var/lib/nfs/etab", ++ "/var/lib/nfs/xtab", ++ "/var/lib/nfs/rmtab", ++ ]) ++ ++ self.add_cmd_output([ ++ "rpcinfo -p localhost", ++ "nfsstat -o all", ++ "exportfs -v", + ]) +- return + + + # vim: set et ts=4 sw=4 : +diff --git a/sos/plugins/nfsserver.py b/sos/plugins/nfsserver.py +deleted file mode 100644 +index 558ebd5d..00000000 +--- a/sos/plugins/nfsserver.py ++++ /dev/null +@@ -1,55 +0,0 @@ +-# Copyright (C) 2007 Red Hat, Inc., Eugene Teo +- +-# This file is part of the sos project: https://github.com/sosreport/sos +-# +-# This copyrighted material is made available to anyone wishing to use, +-# modify, copy, or redistribute it subject to the terms and conditions of +-# version 2 of the GNU General Public License. +-# +-# See the LICENSE file in the source distribution for further information. +- +-from sos.plugins import Plugin, RedHatPlugin +-import os +-from stat import ST_SIZE +- +- +-class NfsServer(Plugin, RedHatPlugin): +- """NFS server information +- """ +- +- plugin_name = 'nfsserver' +- profiles = ('storage', 'network', 'services', 'nfs') +- +- def check_enabled(self): +- default_runlevel = self.policy.default_runlevel() +- nfs_runlevels = self.policy.runlevel_by_service("nfs") +- if default_runlevel in nfs_runlevels: +- return True +- +- try: +- exports = os.stat("/etc/exports")[ST_SIZE] +- xtab = os.stat("/var/lib/nfs/xtab")[ST_SIZE] +- if exports or xtab: +- return True +- except OSError: +- pass +- +- return False +- +- def setup(self): +- self.add_copy_spec([ +- "/etc/exports", +- "/etc/exports.d", +- "/var/lib/nfs/etab", +- "/var/lib/nfs/xtab", +- "/var/lib/nfs/rmtab" +- ]) +- +- self.add_cmd_output([ +- "rpcinfo -p localhost", +- "nfsstat -o all", +- "exportfs -v" +- ]) +- +- +-# vim: set et ts=4 sw=4 : +-- +2.26.2 + diff --git a/SOURCES/sos-bz1845386-pacemaker-passwords-with-equal-sign.patch b/SOURCES/sos-bz1845386-pacemaker-passwords-with-equal-sign.patch new file mode 100644 index 0000000..6550642 --- /dev/null +++ b/SOURCES/sos-bz1845386-pacemaker-passwords-with-equal-sign.patch @@ -0,0 +1,46 @@ +From b34edec39189d5501b9943f73ec2afa7c7b98d58 Mon Sep 17 00:00:00 2001 +From: Reid wahl +Date: Mon, 8 Jun 2020 22:50:00 -0700 +Subject: [PATCH] [pacemaker] Fix scrubbing when password contains an equal + sign + +If the password contains one or more equal signs ('='), only the substring +after the final equal sign is scrubbed. The rest of the password appears in +plain text. + +This patch modifies the scrub regex to scrub all characters after the first +equal sign. + +Related to RHBZ#1845386. +Resolves: #2109 + +Signed-off-by: Reid Wahl +Signed-off-by: Jake Hunsaker +--- + sos/plugins/pacemaker.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sos/plugins/pacemaker.py b/sos/plugins/pacemaker.py +index 7294c35a..8beec811 100644 +--- a/sos/plugins/pacemaker.py ++++ b/sos/plugins/pacemaker.py +@@ -55,14 +55,14 @@ class Pacemaker(Plugin): + def postproc_crm_shell(self): + self.do_cmd_output_sub( + "crm configure show", +- r"passw(\S*)=\S+", ++ r"passw([^\s=]*)=\S+", + r"passw\1=********" + ) + + def postproc_pcs(self): + self.do_cmd_output_sub( + "pcs config", +- r"passw(\S*)=\S+", ++ r"passw([^\s=]*)=\S+", + r"passw\1=********" + ) + +-- +2.26.2 + diff --git a/SPECS/sos.spec b/SPECS/sos.spec index 4d547c4..e8659e3 100644 --- a/SPECS/sos.spec +++ b/SPECS/sos.spec @@ -4,8 +4,8 @@ Summary: A set of tools to gather troubleshooting information from a system Name: sos -Version: 3.8 -Release: 1%{?dist} +Version: 3.9.1 +Release: 4%{?dist} Group: Applications/System Source0: https://github.com/sosreport/sos/archive/%{version}/sos-%{version}.tar.gz Source1: sos-audit-%{auditversion}.tgz @@ -20,10 +20,19 @@ Requires: bzip2 Requires: xz Requires: python3-six Conflicts: vdsm < 4.40 -Patch1: sos-bz1688764-ipa-new-logs.patch -Patch2: sos-bz1738391-kernel-no-trace-by-default.patch -Patch3: sos-bz1744553-ovn-plugins-containerized-env.patch -Patch4: sos-bz1766915-interim-sysroot-forbidden-paths.patch +Patch1: sos-bz1825283-env-host-in-container.patch +Patch2: sos-bz1823488-containers-common.patch +Patch3: sos-bz1819662-rabbitmqctl-on-foreground.patch +Patch4: sos-bz1814867-insights-archive.patch +Patch5: sos-bz1785546-nvmetcli.patch +Patch6: sos-bz1776549-podman-buildah-rootless.patch +Patch7: sos-bz1633006-iptables-kmods.patch +Patch8: sos-bz1457191-navicli-noniteractively.patch +Patch9: sos-bz1838123-xdp-plugin.patch +Patch10: sos-bz1843562-gluster-volume-specific.patch +Patch11: sos-bz1844853-nfs-etc-exports.patch +Patch12: sos-bz1845386-pacemaker-passwords-with-equal-sign.patch +Patch13: sos-bz1843754-powerpc-logs-for-components.patch %description Sos is a set of tools that gathers information about system @@ -37,6 +46,15 @@ support technicians and developers. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 %setup -T -D -a1 -q %build @@ -89,6 +107,64 @@ of the system. Currently storage and filesystem commands are audited. %ghost /etc/audit/rules.d/40-sos-storage.rules %changelog +* Tue Jun 23 2020 Pavel Moravec = 3.9.1-4 +- [gluster] fix gluster volume splitlines iteration + Resolves: bz1843562 +- [nfs] merge nfsserver plugin into nfs one + Resolves: bz1844853 +- [pacemaker] Fix scrubbing when password contains an equa + Resolves: bz1845386 +- [powerpc] Add support to collect component logs + Resolves: bz1843754 + +* Wed May 27 2020 Pavel Moravec = 3.9.1-2 +- Rebase on upstream 3.9 + Resolves: bz1826656 +- [redhat] fix RH containers without sysroot Attempting to run + Resolves: bz1825283 +- [containers_common] Add plugin for common containers configs + Resolves: bz1823488 +- [rabbitmq] Call containerised rabbitmqctl report on + Resolves: bz1819662 +- [insights] collect insights-client dump + Resolves: bz1814867 +- [nvmetcli] Add new plugin for NVMe Target CLI + Resolves: bz1785546 +- [containers_common] collect rootless containers info + Resolves: bz1776549 +- [networking] collect iptables when proper kernel modules + Resolves: bz1633006 +- [navicli] replace interactive prompt by plugin option + Resolves: bz1457191 +- [xdp] Add XDP plugin + Resolves: bz1838123 + +* Thu May 21 2020 Pavel Moravec = 3.8-4 +- [container_log] fix unscoped 'logdir' variable + Resolves: bz1834421 + +* Wed May 06 2020 Pavel Moravec = 3.8-3 +- [containers_common] Add plugin for common containers configs + Resolves: bz1823488 + +* Fri Jan 10 2020 Pavel Moravec = 3.8-2 +- [plugins] improve heuristic for applying --since + Resolves: bz1789049 +- [Predicate] Override __bool__ to allow py3 evaluation + Resolves: bz1789018 +- [ceph] Add 'ceph insights' command output + Resolves: bz1783034 +- [dnf] Collect dnf module list + Resolves: bz1781819 +- [kernel,networking] collect bpftool net list for each + Resolves: bz1768956 +- [libreswan] New plugin for "libreswan" IPsec + Resolves: bz1741330 +- [kernel] collect "bpftool net list" + Resolves: bz1721779 +- [grub2] call grub2-config with --no-grubenv-update + Resolves: bz1709682 + * Wed Dec 11 2019 Pavel Moravec = 3.8-1 - Rebase on upstream 3.8 Resolves: bz1779387