From 8337391fdb71bd0121afd49070eb482f47e164a1 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jul 30 2019 09:19:52 +0000 Subject: import sos-3.6-10.el8_0.3 --- diff --git a/README.debrand b/README.debrand deleted file mode 100644 index 01c46d2..0000000 --- a/README.debrand +++ /dev/null @@ -1,2 +0,0 @@ -Warning: This package was configured for automatic debranding, but the changes -failed to apply. diff --git a/SOURCES/sos-3.6-centos-branding.patch b/SOURCES/sos-3.6-centos-branding.patch deleted file mode 100644 index f88d36e..0000000 --- a/SOURCES/sos-3.6-centos-branding.patch +++ /dev/null @@ -1,105 +0,0 @@ -diff -uNrp sos-3.6.orig/sos/policies/redhat.py sos-3.6/sos/policies/redhat.py ---- sos-3.6.orig/sos/policies/redhat.py 2018-11-04 17:44:59.513116585 +0000 -+++ sos-3.6/sos/policies/redhat.py 2018-11-04 17:53:28.333731059 +0000 -@@ -32,9 +32,9 @@ OS_RELEASE = "/etc/os-release" - - - class RedHatPolicy(LinuxPolicy): -- distro = "Red Hat" -- vendor = "Red Hat" -- vendor_url = "http://www.redhat.com/" -+ distro = "CentOS" -+ vendor = "CentOS" -+ vendor_url = "http://www,centos.org/" - _redhat_release = '/etc/redhat-release' - _tmp_dir = "/var/tmp" - _rpmq_cmd = 'rpm -qa --queryformat "%{NAME}|%{VERSION}|%{RELEASE}\\n"' -@@ -92,9 +92,9 @@ class RedHatPolicy(LinuxPolicy): - - @classmethod - def check(cls): -- """This method checks to see if we are running on Red Hat. It must be -+ """This method checks to see if we are running on CentOS. It must be - overriden by concrete subclasses to return True when running on a -- Fedora, RHEL or other Red Hat distribution or False otherwise.""" -+ Fedora, RHEL or CentOS distribution or False otherwise.""" - return False - - def check_usrmove(self, pkgs): -@@ -185,7 +185,7 @@ class RedHatPolicy(LinuxPolicy): - return self.host_name() - - --# Container environment variables on Red Hat systems. -+# Container environment variables on CentOS systems. - ENV_CONTAINER = 'container' - ENV_HOST_SYSROOT = 'HOST' - -@@ -195,22 +195,22 @@ _opts_all_logs_verify = SoSOptions(all_l - _opts_all_logs_no_lsof = SoSOptions(all_logs=True, - plugopts=['process.lsof=off']) - --RHEL_RELEASE_STR = "Red Hat Enterprise Linux" -+RHEL_RELEASE_STR = "CentOS Linux" - - RHV = "rhv" --RHV_DESC = "Red Hat Virtualization" -+RHV_DESC = "CentOS Virtualization" - - RHEL = "rhel" - RHEL_DESC = RHEL_RELEASE_STR - - RHOSP = "rhosp" --RHOSP_DESC = "Red Hat OpenStack Platform" -+RHOSP_DESC = "RDO" - - RHOCP = "ocp" --RHOCP_DESC = "OpenShift Container Platform by Red Hat" -+RHOCP_DESC = "OpenShift" - - RH_SATELLITE = "satellite" --RH_SATELLITE_DESC = "Red Hat Satellite" -+RH_SATELLITE_DESC = "Satellite" - - NOTE_SIZE = "This preset may increase report size" - NOTE_TIME = "This preset may increase report run time" -@@ -230,9 +230,9 @@ rhel_presets = { - - - class RHELPolicy(RedHatPolicy): -- distro = RHEL_RELEASE_STR -- vendor = "Red Hat" -- vendor_url = "https://access.redhat.com/support/" -+ distro = "CentOS Linux" -+ vendor = "CentOS" -+ vendor_url = "https://wiki.centos.org/" - msg = _("""\ - This command will collect diagnostic and configuration \ - information from this %(distro)s system and installed \ -@@ -262,7 +262,7 @@ No changes will be made to system config - def check(cls): - """Test to see if the running host is a RHEL installation. - -- Checks for the presence of the "Red Hat Enterprise Linux" -+ Checks for the presence of the "CentOS Linux" - release string at the beginning of the NAME field in the - `/etc/os-release` file and returns ``True`` if it is - found, and ``False`` otherwise. -@@ -324,7 +324,7 @@ No changes will be made to system config - - ATOMIC = "atomic" - ATOMIC_RELEASE_STR = "Atomic" --ATOMIC_DESC = "Red Hat Enterprise Linux Atomic Host" -+ATOMIC_DESC = "CentOS Linux Atomic Host" - - atomic_presets = { - ATOMIC: PresetDefaults(name=ATOMIC, desc=ATOMIC_DESC, note=NOTE_TIME, -@@ -333,7 +333,7 @@ atomic_presets = { - - - class RedHatAtomicPolicy(RHELPolicy): -- distro = "Red Hat Atomic Host" -+ distro = "CentOS Atomic Host" - msg = _("""\ - This command will collect diagnostic and configuration \ - information from this %(distro)s system. diff --git a/SOURCES/sos-bz1723734-crio-plugin.patch b/SOURCES/sos-bz1723734-crio-plugin.patch new file mode 100644 index 0000000..8b777f6 --- /dev/null +++ b/SOURCES/sos-bz1723734-crio-plugin.patch @@ -0,0 +1,274 @@ +From 64d7cccf48aee9a07e2e4c5237034638cae30391 Mon Sep 17 00:00:00 2001 +From: Daniel J Walsh +Date: Wed, 29 Aug 2018 06:51:21 -0400 +Subject: [PATCH] [crio] Add support for gathering information on cri-o + containers + +Signed-off-by: Daniel J Walsh +--- + sos/plugins/crio.py | 74 +++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 74 insertions(+) + create mode 100644 sos/plugins/crio.py + +diff --git a/sos/plugins/crio.py b/sos/plugins/crio.py +new file mode 100644 +index 000000000..f3e9d8428 +--- /dev/null ++++ b/sos/plugins/crio.py +@@ -0,0 +1,74 @@ ++# Copyright (C) 2018 Red Hat, Inc. Daniel Walsh ++ ++# 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 CRIO(Plugin): ++ ++ """CRI-O containers ++ """ ++ ++ plugin_name = 'crio' ++ profiles = ('container',) ++ packages = ('cri-o', "cri-tools") ++ ++ option_list = [ ++ ("all", "enable capture for all containers, even containers " ++ "that have terminated", 'fast', False), ++ ("logs", "capture logs for running containers", ++ 'fast', False), ++ ] ++ ++ def setup(self): ++ self.add_copy_spec([ ++ "/etc/containers/registries.conf", ++ "/etc/containers/storage.conf", ++ "/etc/containers/mounts.conf", ++ "/etc/containers/policy.json", ++ "/etc/crio/crio.conf", ++ "/etc/crio/seccomp.json", ++ "/etc/systemd/system/cri-o.service", ++ ]) ++ ++ subcmds = [ ++ 'info', ++ 'images', ++ 'pods', ++ 'ps', ++ 'ps -a', ++ 'stats', ++ 'version', ++ ] ++ ++ self.add_cmd_output(["crictl %s" % s for s in subcmds]) ++ self.add_journal(units="cri-o") ++ self.add_cmd_output("ls -alhR /etc/cni") ++ ++ ps_cmd = 'crictl ps --quiet' ++ if self.get_option('all'): ++ ps_cmd = "%s -a" % ps_cmd ++ ++ img_cmd = 'cri-o images --quiet' ++ insp = set() ++ ++ for icmd in [ps_cmd, img_cmd]: ++ result = self.get_command_output(icmd) ++ if result['status'] == 0: ++ for con in result['output'].splitlines(): ++ insp.add(con) ++ ++ if insp: ++ for container in insp: ++ self.add_cmd_output("crictl inspect %s" % container) ++ if self.get_option('logs'): ++ self.add_cmd_output("crictl logs -t %s" % container) ++ ++# vim: set et ts=4 sw=4 : +From 36a82723dfc2734b18eede4b75708595345c9d7a Mon Sep 17 00:00:00 2001 +From: Jake Hunsaker +Date: Mon, 25 Feb 2019 11:50:50 -0500 +Subject: [PATCH] [crio] Add tagging classes + +Adds tagging classes so plugin will run on Red Hat and Ubuntu based +systems. + +Resolves: #1578 + +Signed-off-by: Jake Hunsaker +--- + sos/plugins/crio.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sos/plugins/crio.py b/sos/plugins/crio.py +index f3e9d8428..7afdf0476 100644 +--- a/sos/plugins/crio.py ++++ b/sos/plugins/crio.py +@@ -11,7 +11,7 @@ + from sos.plugins import Plugin, RedHatPlugin, UbuntuPlugin + + +-class CRIO(Plugin): ++class CRIO(Plugin, RedHatPlugin, UbuntuPlugin): + + """CRI-O containers + """ +From 0695dc41c4320e6ecc29f576b7394485d4d35b52 Mon Sep 17 00:00:00 2001 +From: Pavel Moravec +Date: Thu, 7 Feb 2019 10:09:28 +0100 +Subject: [PATCH] [general] remove unused module imports + +Relevant to: #1559 + +Signed-off-by: Pavel Moravec +--- + sos/plugins/crio.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sos/plugins/crio.py b/sos/plugins/crio.py +index 7afdf0476..279ea1fee 100644 +--- a/sos/plugins/crio.py ++++ b/sos/plugins/crio.py +@@ -8,7 +8,7 @@ + # + # See the LICENSE file in the source distribution for further information. + +-from sos.plugins import Plugin, RedHatPlugin, UbuntuPlugin ++from sos.plugins import Plugin + + + class CRIO(Plugin, RedHatPlugin, UbuntuPlugin): +From a608afef3bcb15cb4cc3fb12a14e73f2f30ee015 Mon Sep 17 00:00:00 2001 +From: Pavel Moravec +Date: Thu, 21 Mar 2019 09:57:51 +0100 +Subject: [PATCH] [crio] import all plugins referred by CRIO class + +Resolves: #1606 + +Signed-off-by: Pavel Moravec +--- + sos/plugins/crio.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sos/plugins/crio.py b/sos/plugins/crio.py +index 279ea1fee..7afdf0476 100644 +--- a/sos/plugins/crio.py ++++ b/sos/plugins/crio.py +@@ -8,7 +8,7 @@ + # + # See the LICENSE file in the source distribution for further information. + +-from sos.plugins import Plugin ++from sos.plugins import Plugin, RedHatPlugin, UbuntuPlugin + + + class CRIO(Plugin, RedHatPlugin, UbuntuPlugin): +From 48d7bedc1a1035674a9eddfaca2387b7ee83a2c3 Mon Sep 17 00:00:00 2001 +From: Jake Hunsaker +Date: Wed, 27 Feb 2019 14:50:13 -0500 +Subject: [PATCH] [crio] Update plugin to use inspeecti/p commands + +Updates the crio plugin to use the 'inspecti' and 'inspectp' subcommands +for images and pods respectively. Additionally filter out the socket +deprecation warning from being iterated over. + +Adds collection of 'ps -v' and updates the journal unit to 'crio' +instead of 'cri-o'. + +Now collects all of /etc/containers, and adds collection of crio files +under /etc/sysconfig. + +Resolves: #1588 + +Signed-off-by: Jake Hunsaker +Signed-off-by: Bryn M. Reeves +--- + sos/plugins/crio.py | 48 +++++++++++++++++++++++++++++---------------- + 1 file changed, 31 insertions(+), 17 deletions(-) + +diff --git a/sos/plugins/crio.py b/sos/plugins/crio.py +index 7afdf0476..f025d6db9 100644 +--- a/sos/plugins/crio.py ++++ b/sos/plugins/crio.py +@@ -29,13 +29,12 @@ class CRIO(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", ++ "/etc/containers", ++ "/etc/crictl.yaml", + "/etc/crio/crio.conf", + "/etc/crio/seccomp.json", + "/etc/systemd/system/cri-o.service", ++ "/etc/sysconfig/crio-*" + ]) + + subcmds = [ +@@ -44,31 +43,46 @@ def setup(self): + 'pods', + 'ps', + 'ps -a', ++ 'ps -v', + 'stats', + 'version', + ] + + self.add_cmd_output(["crictl %s" % s for s in subcmds]) +- self.add_journal(units="cri-o") ++ self.add_journal(units="crio") + self.add_cmd_output("ls -alhR /etc/cni") + + ps_cmd = 'crictl ps --quiet' + if self.get_option('all'): + ps_cmd = "%s -a" % ps_cmd + +- img_cmd = 'cri-o images --quiet' +- insp = set() ++ img_cmd = 'crictl images --quiet' ++ pod_cmd = 'crictl pods --quiet' + +- for icmd in [ps_cmd, img_cmd]: +- result = self.get_command_output(icmd) +- if result['status'] == 0: +- for con in result['output'].splitlines(): +- insp.add(con) ++ containers = self._get_crio_list(ps_cmd) ++ images = self._get_crio_list(img_cmd) ++ pods = self._get_crio_list(pod_cmd) + +- if insp: +- for container in insp: +- self.add_cmd_output("crictl inspect %s" % container) +- if self.get_option('logs'): +- self.add_cmd_output("crictl logs -t %s" % container) ++ for container in containers: ++ self.add_cmd_output("crictl inspect %s" % container) ++ if self.get_option('logs'): ++ self.add_cmd_output("crictl logs -t %s" % container) ++ ++ for image in images: ++ self.add_cmd_output("crictl inspecti %s" % image) ++ ++ for pod in pods: ++ self.add_cmd_output("crictl inspectp %s" % pod) ++ ++ def _get_crio_list(self, cmd): ++ ret = [] ++ result = self.get_command_output(cmd) ++ if result['status'] == 0: ++ for ent in result['output'].splitlines(): ++ ret.append(ent) ++ # Prevent the socket deprecation warning from being iterated over ++ if 'deprecated' in ret[0]: ++ ret.pop(0) ++ return ret + + # vim: set et ts=4 sw=4 : diff --git a/SPECS/sos.spec b/SPECS/sos.spec index 8967636..8ba9286 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.6 -Release: 10%{?dist}.1 +Release: 10%{?dist}.3 Group: Applications/System Source0: https://github.com/sosreport/sos/archive/%{version}/sos-%{version}.tar.gz Source1: sos-audit-%{auditversion}.tgz @@ -51,7 +51,7 @@ Patch29: sos-bz1645085-networking-collect-all-numa.patch Patch30: sos-bz1642377-opendaylight-karaf-logs.patch Patch31: sos-bz1666214-grub2-boot-data.patch Patch32: sos-bz1705377-composer-sources-info.patch -Patch99: sos-3.6-centos-branding.patch +Patch33: sos-bz1723734-crio-plugin.patch %description Sos is a set of tools that gathers information about system @@ -93,7 +93,7 @@ support technicians and developers. %patch30 -p1 %patch31 -p1 %patch32 -p1 -%patch99 -p1 +%patch33 -p1 %setup -T -D -a1 -q %build @@ -146,11 +146,13 @@ of the system. Currently storage and filesystem commands are audited. %ghost /etc/audit/rules.d/40-sos-storage.rules %changelog -* Mon Jul 01 2019 Johnny Hughes -- Manual CentOS Debranding +* Thu Jun 27 2019 Pavel Moravec = 3.6-10.3 +- [crio] Add tagging classes + Resolves: bz1723734 -* Tue Jun 18 2019 CentOS Sources - 3.6-10.el8.centos.1 -- Apply debranding changes +* Tue Jun 25 2019 Pavel Moravec = 3.6-10.2 +- [crio] Add support for cri-o + Resolves: bz1723734 * Thu May 02 2019 Pavel Moravec = 3.6-10.1 [composer] Collect sources info for all sources