From 2ff1a50d92dbcfb9dfd328c25f195eae8aceb4d7 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jul 14 2020 01:57:29 +0000 Subject: import sos-3.9.1-4.el8 --- diff --git a/SOURCES/sos-bz1785546-nvmetcli.patch b/SOURCES/sos-bz1785546-nvmetcli.patch index 34bbc4d..dec2ef6 100644 --- a/SOURCES/sos-bz1785546-nvmetcli.patch +++ b/SOURCES/sos-bz1785546-nvmetcli.patch @@ -51,5 +51,18 @@ index 00000000..b66a3a13 + +# 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-bz1823488-containers-common.patch b/SOURCES/sos-bz1823488-containers-common.patch index 581caea..7eb2c77 100644 --- a/SOURCES/sos-bz1823488-containers-common.patch +++ b/SOURCES/sos-bz1823488-containers-common.patch @@ -90,5 +90,18 @@ index f6875197..f6632776 100644 '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-bz1838123-xdp-plugin.patch b/SOURCES/sos-bz1838123-xdp-plugin.patch index bd6b0a5..cb55e32 100644 --- a/SOURCES/sos-bz1838123-xdp-plugin.patch +++ b/SOURCES/sos-bz1838123-xdp-plugin.patch @@ -52,5 +52,18 @@ index 00000000..2e18048b + 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 541081d..e8659e3 100644 --- a/SPECS/sos.spec +++ b/SPECS/sos.spec @@ -5,7 +5,7 @@ Summary: A set of tools to gather troubleshooting information from a system Name: sos Version: 3.9.1 -Release: 2%{?dist} +Release: 4%{?dist} Group: Applications/System Source0: https://github.com/sosreport/sos/archive/%{version}/sos-%{version}.tar.gz Source1: sos-audit-%{auditversion}.tgz @@ -29,6 +29,10 @@ 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 @@ -47,6 +51,10 @@ support technicians and developers. %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 %setup -T -D -a1 -q %build @@ -99,6 +107,16 @@ 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