diff --git a/.gitignore b/.gitignore index ef784c7..0964ff6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -SOURCES/sos-3.7.tar.gz +SOURCES/sos-3.8.tar.gz SOURCES/sos-audit-0.3.tgz diff --git a/.sos.metadata b/.sos.metadata index 9abd7a0..0c29651 100644 --- a/.sos.metadata +++ b/.sos.metadata @@ -1,2 +1,2 @@ -38aa7609e7545eddf709db60fa1523432b268e13 SOURCES/sos-3.7.tar.gz +99c94319c6208edef8d852b9e84cbb045c01df5f SOURCES/sos-3.8.tar.gz 9d478b9f0085da9178af103078bbf2fd77b0175a SOURCES/sos-audit-0.3.tgz 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-bz1665929-nvme-config.patch b/SOURCES/sos-bz1665929-nvme-config.patch deleted file mode 100644 index a370d24..0000000 --- a/SOURCES/sos-bz1665929-nvme-config.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 8eff8f82604cb83a4c43f4a3ba0308940863c1b5 Mon Sep 17 00:00:00 2001 -From: Pavel Moravec -Date: Mon, 29 Jul 2019 11:34:06 +0200 -Subject: [PATCH] [nvme] collect config file everytime - -Collect /etc/nvme/discovery.conf every time, outside any for-loop block. - -Resolves: #1740 - -Signed-off-by: Pavel Moravec ---- - sos/plugins/nvme.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sos/plugins/nvme.py b/sos/plugins/nvme.py -index 6e2cda73..bd9d2df0 100644 ---- a/sos/plugins/nvme.py -+++ b/sos/plugins/nvme.py -@@ -21,6 +21,7 @@ class Nvme(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): - return [dev for dev in sys_block if dev.startswith('nvme')] - - def setup(self): -+ self.add_copy_spec("/etc/nvme/discovery.conf") - self.add_cmd_output([ - "nvme list", - "nvme list-subsys", -@@ -39,6 +40,5 @@ class Nvme(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): - "nvme show-regs /dev/%s" % dev, - "nvme get-ns-id /dev/%s" % dev - ]) -- self.add_copy_spec("/etc/nvme/discovery.conf") - - # vim: set et ts=4 sw=4 : --- -2.21.0 - diff --git a/SOURCES/sos-bz1665981-peripety-config.patch b/SOURCES/sos-bz1665981-peripety-config.patch deleted file mode 100644 index a06f27f..0000000 --- a/SOURCES/sos-bz1665981-peripety-config.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 34219ce0e15de5423baaaa1054a98cf1b58f0eae Mon Sep 17 00:00:00 2001 -From: Pavel Moravec -Date: Thu, 25 Jul 2019 15:03:50 +0200 -Subject: [PATCH] [peripety] collect proper config file - -The config file is /etc/peripetyd.conf . - -Resolves: #1737 - -Signed-off-by: Pavel Moravec ---- - sos/plugins/peripety.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sos/plugins/peripety.py b/sos/plugins/peripety.py -index 7567731d..42877c66 100644 ---- a/sos/plugins/peripety.py -+++ b/sos/plugins/peripety.py -@@ -20,7 +20,7 @@ class Peripety(Plugin, RedHatPlugin): - services = ('peripetyd',) - - def setup(self): -- self.add_copy_spec('/etc/peripety.conf') -+ self.add_copy_spec('/etc/peripetyd.conf') - - forbid_reg = [ - 'vd.*', --- -2.21.0 - diff --git a/SOURCES/sos-bz1687954-buildah-index-out-of-range.patch b/SOURCES/sos-bz1687954-buildah-index-out-of-range.patch deleted file mode 100644 index 5491201..0000000 --- a/SOURCES/sos-bz1687954-buildah-index-out-of-range.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 0100bd129e8fc809cc5b0258f6c0c7c64ad084ab Mon Sep 17 00:00:00 2001 -From: Pavel Moravec -Date: Mon, 15 Apr 2019 11:50:55 +0200 -Subject: [PATCH] [buildah] parse container list properly even for scratch ones - -Scratch containers dont have id, therefore we shall get container name -as the latest string on each line instead of 5th. - -Resolves: #1647 - -Signed-off-by: Pavel Moravec ---- - sos/plugins/buildah.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sos/plugins/buildah.py b/sos/plugins/buildah.py -index c6c57553..fd8653eb 100644 ---- a/sos/plugins/buildah.py -+++ b/sos/plugins/buildah.py -@@ -47,7 +47,7 @@ class Buildah(Plugin, RedHatPlugin): - if containahs['is_wicked_pissah']: - for containah in containahs['auutput'].splitlines(): - # obligatory Tom Brady -- goat = containah.split()[4] -+ goat = containah.split()[-1] - self.add_cmd_output('buildah inspect -t container %s' % goat) - - pitchez = make_chowdah('buildah images -n') --- -2.17.2 - diff --git a/SOURCES/sos-bz1688764-ipa-new-logs.patch b/SOURCES/sos-bz1688764-ipa-new-logs.patch new file mode 100644 index 0000000..a120ae5 --- /dev/null +++ b/SOURCES/sos-bz1688764-ipa-new-logs.patch @@ -0,0 +1,84 @@ +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-bz1695583-postgres-mysql-incorrect-defaults.patch b/SOURCES/sos-bz1695583-postgres-mysql-incorrect-defaults.patch deleted file mode 100644 index a5d1036..0000000 --- a/SOURCES/sos-bz1695583-postgres-mysql-incorrect-defaults.patch +++ /dev/null @@ -1,122 +0,0 @@ -From c71b41547442d23daf5c3bf88450151d13903214 Mon Sep 17 00:00:00 2001 -From: Pavel Moravec -Date: Thu, 4 Apr 2019 13:54:18 +0200 -Subject: [PATCH] [maas,mysql,npm,pacemaker,postgresql] fix plugopts data types - -With new enforcement of implicit data type for plugin options, the -plugopts must have proper data types of default values and plugins must work -with them accordingly (in tests or so). - -Resolves: #1635 - -Signed-off-by: Pavel Moravec ---- - sos/plugins/maas.py | 6 +++--- - sos/plugins/mysql.py | 2 +- - sos/plugins/npm.py | 4 ++-- - sos/plugins/pacemaker.py | 4 ++-- - sos/plugins/postgresql.py | 6 +++--- - 5 files changed, 11 insertions(+), 11 deletions(-) - -diff --git a/sos/plugins/maas.py b/sos/plugins/maas.py -index f8305406..ea038e86 100644 ---- a/sos/plugins/maas.py -+++ b/sos/plugins/maas.py -@@ -21,10 +21,10 @@ class Maas(Plugin, UbuntuPlugin): - - option_list = [ - ('profile-name', -- 'The name with which you will later refer to this remote', '', False), -- ('url', 'The URL of the remote API', '', False), -+ 'The name with which you will later refer to this remote', '', ''), -+ ('url', 'The URL of the remote API', '', ''), - ('credentials', -- 'The credentials, also known as the API key', '', False) -+ 'The credentials, also known as the API key', '', '') - ] - - def _has_login_options(self): -diff --git a/sos/plugins/mysql.py b/sos/plugins/mysql.py -index 49bc4168..411d90b8 100644 ---- a/sos/plugins/mysql.py -+++ b/sos/plugins/mysql.py -@@ -22,7 +22,7 @@ class Mysql(Plugin): - - option_list = [ - ("dbuser", "username for database dumps", "", "mysql"), -- ("dbpass", "password for database dumps" + pw_warn_text, "", False), -+ ("dbpass", "password for database dumps" + pw_warn_text, "", ""), - ("dbdump", "collect a database dump", "", False) - ] - -diff --git a/sos/plugins/npm.py b/sos/plugins/npm.py -index 0fc95801..ca00d0c0 100644 ---- a/sos/plugins/npm.py -+++ b/sos/plugins/npm.py -@@ -25,7 +25,7 @@ class Npm(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin, SuSEPlugin): - option_list = [("project_path", - 'List npm modules of a project specified by path', - 'fast', -- 0)] -+ '')] - - # in Fedora, Debian, Ubuntu and Suse the package is called npm - packages = ('npm',) -@@ -79,7 +79,7 @@ class Npm(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin, SuSEPlugin): - self.add_string_as_file(json.dumps(output), outfn) - - def setup(self): -- if self.get_option("project_path") != 0: -+ if self.get_option("project_path"): - project_path = os.path.abspath(os.path.expanduser( - self.get_option("project_path"))) - self._get_npm_output("npm ls --json", "npm_ls_project", -diff --git a/sos/plugins/pacemaker.py b/sos/plugins/pacemaker.py -index a1b64ea5..940389ee 100644 ---- a/sos/plugins/pacemaker.py -+++ b/sos/plugins/pacemaker.py -@@ -25,7 +25,7 @@ class Pacemaker(Plugin): - ) - - option_list = [ -- ("crm_from", "specify the start time for crm_report", "fast", False), -+ ("crm_from", "specify the start time for crm_report", "fast", ''), - ("crm_scrub", "enable password scrubbing for crm_report", "", True), - ] - -@@ -87,7 +87,7 @@ class Pacemaker(Plugin): - # time in order to collect data. - crm_from = (datetime.today() - - timedelta(hours=72)).strftime("%Y-%m-%d %H:%m:%S") -- if self.get_option("crm_from") is not False: -+ if self.get_option("crm_from"): - if re.match(r'\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}', - str(self.get_option("crm_from"))): - crm_from = self.get_option("crm_from") -diff --git a/sos/plugins/postgresql.py b/sos/plugins/postgresql.py -index 1698b62f..a04dca8f 100644 ---- a/sos/plugins/postgresql.py -+++ b/sos/plugins/postgresql.py -@@ -31,7 +31,7 @@ class PostgreSQL(Plugin): - option_list = [ - ('pghome', 'PostgreSQL server home directory.', '', '/var/lib/pgsql'), - ('username', 'username for pg_dump', '', 'postgres'), -- ('password', 'password for pg_dump' + password_warn_text, '', False), -+ ('password', 'password for pg_dump' + password_warn_text, '', ''), - ('dbname', 'database name to dump for pg_dump', '', ''), - ('dbhost', 'database hostname/IP (do not use unix socket)', '', ''), - ('dbport', 'database server port number', '', '5432') -@@ -43,8 +43,8 @@ class PostgreSQL(Plugin): - # We're only modifying this for ourself and our children so - # there is no need to save and restore environment variables if - # the user decided to pass the password on the command line. -- if self.get_option("password") is not False: -- os.environ["PGPASSWORD"] = str(self.get_option("password")) -+ if self.get_option("password"): -+ os.environ["PGPASSWORD"] = self.get_option("password") - - if self.get_option("dbhost"): - cmd = "pg_dump -U %s -h %s -p %s -w -F t %s" % ( --- -2.17.2 - diff --git a/SOURCES/sos-bz1700780-vdsm-plugin.patch b/SOURCES/sos-bz1700780-vdsm-plugin.patch deleted file mode 100644 index 2ae0c5a..0000000 --- a/SOURCES/sos-bz1700780-vdsm-plugin.patch +++ /dev/null @@ -1,335 +0,0 @@ -From 1b4f8dfb8ac85708441faa3b2c2b9c2624dfa155 Mon Sep 17 00:00:00 2001 -From: "irit.go" -Date: Tue, 24 Jul 2018 11:01:55 +0300 -Subject: [PATCH 1/2] [Plugin] add get_process_pids() to return PIDs by process - name - -Signed-off-by: Irit Goihman igoihman@redhat.com -Signed-off-by: Bryn M. Reeves ---- - sos/plugins/__init__.py | 16 ++++++++++++++++ - 1 file changed, 16 insertions(+) - -diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py -index 4c8822b7..cdeda77a 100644 ---- a/sos/plugins/__init__.py -+++ b/sos/plugins/__init__.py -@@ -1389,6 +1389,22 @@ class Plugin(object): - return False - return status - -+ def get_process_pids(self, process): -+ """Returns PIDs of all processes with process name. -+ If the process doesn't exist, returns an empty list""" -+ pids = [] -+ cmd_line_glob = "/proc/[0-9]*/cmdline" -+ cmd_line_paths = glob.glob(cmd_line_glob) -+ for path in cmd_line_paths: -+ try: -+ with open(path, 'r') as f: -+ cmd_line = f.read().strip() -+ if process in cmd_line: -+ pids.append(path.split("/")[2]) -+ except IOError as e: -+ continue -+ return pids -+ - - class RedHatPlugin(object): - """Tagging class for Red Hat's Linux distributions""" --- -2.17.2 - - -From 0618db904dadb05fde70c181a5940989ac127fe2 Mon Sep 17 00:00:00 2001 -From: Irit Goihman -Date: Thu, 1 Feb 2018 16:44:32 +0200 -Subject: [PATCH 2/2] [plugins] add vdsm plugin - -Add a plugin for vdsm - -Resolves: #1205 - -Signed-off-by: Irit Goihman -Signed-off-by: Bryn M. Reeves ---- - sos/plugins/vdsm.py | 146 ++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 146 insertions(+) - create mode 100644 sos/plugins/vdsm.py - -diff --git a/sos/plugins/vdsm.py b/sos/plugins/vdsm.py -new file mode 100644 -index 00000000..c648abbf ---- /dev/null -+++ b/sos/plugins/vdsm.py -@@ -0,0 +1,146 @@ -+# Copyright (C) 2018 Red Hat, Inc. -+ -+# 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 glob -+import json -+import re -+ -+ -+# This configuration is based on vdsm.storage.lvm.LVM_CONF_TEMPLATE. -+# -+# locking_type is set to 0 in order to match lvm sos commands. With this -+# configuration we don't take any locks, so we will never block because -+# there is a stuck lvm command. -+# locking_type=0 -+# -+# use_lvmetad is set to 0 in order not to show cached, old lvm metadata. -+# use_lvmetad=0 -+# -+# preferred_names and filter config values are set to capture Vdsm devices. -+# preferred_names=[ '^/dev/mapper/' ] -+# filter=[ 'a|^/dev/mapper/.*|', 'r|.*|' ] -+LVM_CONFIG = """ -+global { -+ locking_type=0 -+ use_lvmetad=0 -+} -+devices { -+ preferred_names=["^/dev/mapper/"] -+ ignore_suspended_devices=1 -+ write_cache_state=0 -+ disable_after_error_count=3 -+ filter=["a|^/dev/mapper/.*|", "r|.*|"] -+} -+""" -+LVM_CONFIG = re.sub(r"\s+", " ", LVM_CONFIG).strip() -+ -+ -+class Vdsm(Plugin, RedHatPlugin): -+ """vdsm Plugin""" -+ -+ packages = ( -+ 'vdsm', -+ 'vdsm-client', -+ ) -+ -+ plugin_name = 'vdsm' -+ -+ def setup(self): -+ 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_cmd_output('service vdsmd status') -+ -+ self.add_copy_spec([ -+ '/tmp/vds_installer*', -+ '/tmp/vds_bootstrap*', -+ '/etc/vdsm/*' -+ ]) -+ -+ limit = self.get_option('log_size') -+ -+ self.add_copy_spec('/var/log/vdsm/*', sizelimit=limit) -+ -+ self._add_vdsm_forbidden_paths() -+ self.add_copy_spec([ -+ '/var/run/vdsm/*', -+ '/usr/libexec/vdsm/hooks', -+ '/var/lib/vdsm' -+ ]) -+ -+ qemu_pids = self.get_process_pids('qemu-kvm') -+ if qemu_pids: -+ files = ["cmdline", "status", "mountstats"] -+ self.add_copy_spec([ -+ "/proc/%s/%s" % (pid, name) -+ for pid in qemu_pids -+ for name in files -+ ]) -+ self.add_cmd_output([ -+ "ls -ldZ /etc/vdsm", -+ "su vdsm -s sh -c 'tree -l /rhev/data-center'", -+ "su vdsm -s sh -c 'ls -lR /rhev/data-center'" -+ ]) -+ self.add_cmd_output([ -+ "lvm vgs -v -o +tags --config \'%s\'" % LVM_CONFIG, -+ "lvm lvs -v -o +tags --config \'%s\'" % LVM_CONFIG, -+ "lvm pvs -v -o +all --config \'%s\'" % LVM_CONFIG -+ ]) -+ -+ self.add_cmd_output([ -+ 'vdsm-client Host getCapabilities', -+ 'vdsm-client Host getStats', -+ 'vdsm-client Host getAllVmStats', -+ 'vdsm-client Host getVMFullList', -+ 'vdsm-client Host getDeviceList', -+ 'vdsm-client Host hostdevListByCaps', -+ 'vdsm-client Host getAllTasksInfo', -+ 'vdsm-client Host getAllTasksStatuses' -+ ]) -+ -+ try: -+ res = self.call_ext_prog( -+ 'vdsm-client Host getConnectedStoragePools' -+ ) -+ if res['status'] == 0: -+ pools = json.loads(res['output']) -+ for pool in pools: -+ self.add_cmd_output( -+ 'vdsm-client StoragePool getSpmStatus' -+ ' storagepoolID={}'.format(pool) -+ ) -+ except ValueError as e: -+ self._log_error( -+ 'vdsm-client Host getConnectedStoragePools: %s' % (e) -+ ) -+ -+ try: -+ res = self.call_ext_prog('vdsm-client Host getStorageDomains') -+ if res['status'] == 0: -+ sd_uuids = json.loads(res['output']) -+ dump_volume_chains_cmd = 'vdsm-tool dump-volume-chains %s' -+ self.add_cmd_output([ -+ dump_volume_chains_cmd % uuid for uuid in sd_uuids -+ ]) -+ except ValueError as e: -+ self._log_error( -+ 'vdsm-client Host getStorageDomains: %s' % (e) -+ ) -+ -+ def _add_vdsm_forbidden_paths(self): -+ """Add confidential sysprep vfds under /var/run/vdsm to -+ forbidden paths """ -+ -+ for file_path in glob.glob("/var/run/vdsm/*"): -+ if file_path.endswith(('.vfd', '/isoUploader', '/storage')): -+ self.add_forbidden_path(file_path) --- -2.17.2 - -From 7141ebf3b2071c84286ced29154c33502c4da934 Mon Sep 17 00:00:00 2001 -From: Irit goihman -Date: Sun, 7 Apr 2019 14:03:55 +0300 -Subject: [PATCH] [vdsm] fix plugin docstring capitalisation - ---- - sos/plugins/vdsm.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sos/plugins/vdsm.py b/sos/plugins/vdsm.py -index c648abbf9..4549c372e 100644 ---- a/sos/plugins/vdsm.py -+++ b/sos/plugins/vdsm.py -@@ -45,7 +45,7 @@ - - - class Vdsm(Plugin, RedHatPlugin): -- """vdsm Plugin""" -+ """vdsm plugin""" - - packages = ( - 'vdsm', -From 208a1d9622dfa13d923882793cd19e9e6cf1e488 Mon Sep 17 00:00:00 2001 -From: Irit goihman -Date: Sun, 7 Apr 2019 14:04:48 +0300 -Subject: [PATCH] [vdsm] use metadata_read_only=1 for LVM2 commands - ---- - sos/plugins/vdsm.py | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/sos/plugins/vdsm.py b/sos/plugins/vdsm.py -index 4549c372e..913d49a53 100644 ---- a/sos/plugins/vdsm.py -+++ b/sos/plugins/vdsm.py -@@ -22,6 +22,10 @@ - # there is a stuck lvm command. - # locking_type=0 - # -+# To prevent modifications to volume group metadata (for e.g. due to a -+# automatically detected inconsistency), metadata_read_only is set to 1. -+# metadata_read_only=1 -+# - # use_lvmetad is set to 0 in order not to show cached, old lvm metadata. - # use_lvmetad=0 - # -@@ -31,6 +35,7 @@ - LVM_CONFIG = """ - global { - locking_type=0 -+ metadata_read_only=1 - use_lvmetad=0 - } - devices { -From 97c21901ddb6f7d5e3169d1777983f784b103bc4 Mon Sep 17 00:00:00 2001 -From: Irit goihman -Date: Sun, 7 Apr 2019 14:05:30 +0300 -Subject: [PATCH] [vdsm] drop explicit size limiting - ---- - sos/plugins/vdsm.py | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/sos/plugins/vdsm.py b/sos/plugins/vdsm.py -index 913d49a53..2dc4b6bea 100644 ---- a/sos/plugins/vdsm.py -+++ b/sos/plugins/vdsm.py -@@ -72,9 +72,7 @@ def setup(self): - '/etc/vdsm/*' - ]) - -- limit = self.get_option('log_size') -- -- self.add_copy_spec('/var/log/vdsm/*', sizelimit=limit) -+ self.add_copy_spec('/var/log/vdsm/*') - - self._add_vdsm_forbidden_paths() - self.add_copy_spec([ -From cfaf930e58f4996919d0da6c356135cfce26dacb Mon Sep 17 00:00:00 2001 -From: Irit goihman -Date: Sun, 7 Apr 2019 14:13:59 +0300 -Subject: [PATCH] [vdsm] change filter - ---- - sos/plugins/vdsm.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sos/plugins/vdsm.py b/sos/plugins/vdsm.py -index 2dc4b6bea..ab5c6130b 100644 ---- a/sos/plugins/vdsm.py -+++ b/sos/plugins/vdsm.py -@@ -43,7 +43,7 @@ - ignore_suspended_devices=1 - write_cache_state=0 - disable_after_error_count=3 -- filter=["a|^/dev/mapper/.*|", "r|.*|"] -+ filter=["a|^/dev/disk/by-id/dm-uuid-mpath-|", "r|.+|"] - } - """ - LVM_CONFIG = re.sub(r"\s+", " ", LVM_CONFIG).strip() -From 2ebc04da53dc871c8dd5243567afa4f8592dca29 Mon Sep 17 00:00:00 2001 -From: Irit goihman -Date: Sun, 7 Apr 2019 14:14:32 +0300 -Subject: [PATCH] [vdsm] capture supervdsmd status - ---- - sos/plugins/vdsm.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/sos/plugins/vdsm.py b/sos/plugins/vdsm.py -index ab5c6130b..ae9c17c96 100644 ---- a/sos/plugins/vdsm.py -+++ b/sos/plugins/vdsm.py -@@ -65,6 +65,7 @@ def setup(self): - self.add_forbidden_path('/etc/pki/libvirt/private/*') - - self.add_cmd_output('service vdsmd status') -+ self.add_cmd_output('service supervdsmd status') - - self.add_copy_spec([ - '/tmp/vds_installer*', diff --git a/SOURCES/sos-bz1702806-openstack_instack-ansible-log.patch b/SOURCES/sos-bz1702806-openstack_instack-ansible-log.patch deleted file mode 100644 index 938273b..0000000 --- a/SOURCES/sos-bz1702806-openstack_instack-ansible-log.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 1b9c2032149488a2372d188a8ed3251e364f41cf Mon Sep 17 00:00:00 2001 -From: Emilien Macchi -Date: Wed, 24 Apr 2019 20:54:05 -0400 -Subject: [PATCH] [openstack_instack] add ansible.log - -Collect /var/lib/mistral/config-download-latest/ansible.log which is an -important log to be able to debug issues with Ansible playbooks. - -/var/lib/mistral/config-download-latest is a directory that exists -anyway on the undercloud and is the place where the ansible logs is -stored. - -Note: we don't want to collect the whole /var/lib/mistral because it -contains sensitive informations like username/passwords/endpoints. - -rhbz#1702806 -rhbz#1702802 - -Resolves: #1661 - -Signed-off-by: Emilien Macchi -Signed-off-by: Bryn M. Reeves ---- - sos/plugins/openstack_instack.py | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/sos/plugins/openstack_instack.py b/sos/plugins/openstack_instack.py -index e3470f5a..15e6c384 100644 ---- a/sos/plugins/openstack_instack.py -+++ b/sos/plugins/openstack_instack.py -@@ -22,7 +22,8 @@ NON_CONTAINERIZED_DEPLOY = [ - CONTAINERIZED_DEPLOY = [ - '/var/log/heat-launcher/', - '/home/stack/install-undercloud.log', -- '/home/stack/undercloud-install-*.tar.bzip2' -+ '/home/stack/undercloud-install-*.tar.bzip2', -+ '/var/lib/mistral/config-download-latest/ansible.log' - ] - - --- -2.17.2 - -From ba77701624dccf3ba98fee6e9cdb9b9d804068c2 Mon Sep 17 00:00:00 2001 -From: Pavel Moravec -Date: Tue, 9 Jul 2019 13:23:37 +0200 -Subject: [PATCH] [archive] convert absolute symlink targets to relative - -Calling _make_leading_paths for a symlink with absolute symlink target -must create the symlink relative to the source. This will prevent -creating symlinks outside sosreport build dir. - -Resolves: #1710 - -Signed-off-by: Pavel Moravec ---- - sos/archive.py | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/sos/archive.py b/sos/archive.py -index 9e19426c5..dcd6908d1 100644 ---- a/sos/archive.py -+++ b/sos/archive.py -@@ -232,6 +232,11 @@ def in_archive(path): - dest = self._make_leading_paths(target_src, mode=mode) - dest = os.path.normpath(dest) - -+ # In case symlink target is an absolute path, make it -+ # relative to the directory with symlink source -+ if os.path.isabs(target): -+ target = os.path.relpath(target, target_dir) -+ - self.log_debug("Making symlink '%s' -> '%s'" % - (abs_path, target)) - os.symlink(target, abs_path) diff --git a/SOURCES/sos-bz1709682-grub2-mkconfig-dont-remove-kernel-opts.patch b/SOURCES/sos-bz1709682-grub2-mkconfig-dont-remove-kernel-opts.patch new file mode 100644 index 0000000..3f20a54 --- /dev/null +++ b/SOURCES/sos-bz1709682-grub2-mkconfig-dont-remove-kernel-opts.patch @@ -0,0 +1,180 @@ +From 7097f737339f0cde6da923a4ce16a008d229cda7 Mon Sep 17 00:00:00 2001 +From: Pavel Moravec +Date: Mon, 16 Sep 2019 17:13:27 +0200 +Subject: [PATCH 1/2] [plugins] extend SoSPredicate by command output inclusion + test + +Add a predicate type in form + +cmd_outputs={'cmd': 'foo --help', 'output': 'bar'} + +that checks whether output of given command contains given string. + +Multiple commands/outputs can be provided in a list. + +Related to: #1682 + +Signed-off-by: Pavel Moravec +--- + sos/plugins/__init__.py | 57 +++++++++++++++++++++++++++++++++++------ + 1 file changed, 49 insertions(+), 8 deletions(-) + +diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py +index a0b291bea..516a61109 100644 +--- a/sos/plugins/__init__.py ++++ b/sos/plugins/__init__.py +@@ -115,6 +115,9 @@ class SoSPredicate(object): + #: Services enablement list + services = [] + ++ # Command output inclusion pairs {'cmd': 'foo --help', 'output': 'bar'} ++ cmd_outputs = [] ++ + def __str(self, quote=False, prefix="", suffix=""): + """Return a string representation of this SoSPredicate with + optional prefix, suffix and value quoting. +@@ -128,14 +131,23 @@ class SoSPredicate(object): + + services = self.services + services = [quotes % s for s in services] if quote else services +- pstr += "services=[%s]" % (",".join(services)) ++ pstr += "services=[%s], " % (",".join(services)) ++ ++ cmdoutputs = [ ++ "{ %s: %s, %s: %s }" % (quotes % "cmd", ++ quotes % cmdoutput['cmd'], ++ quotes % "output", ++ quotes % cmdoutput['output']) ++ for cmdoutput in self.cmd_outputs ++ ] ++ pstr += "cmdoutputs=[%s]" % (",".join(cmdoutputs)) + + return prefix + pstr + suffix + + def __str__(self): + """Return a string representation of this SoSPredicate. + +- "dry_run=False, kmods=[], services=[]" ++ "dry_run=False, kmods=[], services=[], cmdoutputs=[]" + """ + return self.__str() + +@@ -143,7 +155,7 @@ class SoSPredicate(object): + """Return a machine readable string representation of this + SoSPredicate. + +- "SoSPredicate(dry_run=False, kmods=[], services=[])" ++ "SoSPredicate(dry_run=False, kmods=[], services=[], cmdoutputs=[])" + """ + return self.__str(quote=True, prefix="SoSPredicate(", suffix=")") + +@@ -170,15 +182,39 @@ class SoSPredicate(object): + else: + return all(_svcs) + ++ def _eval_cmd_output(self, cmd_output): ++ '''Does 'cmd' output contain string 'output'?''' ++ if 'cmd' not in cmd_output or 'output' not in cmd_output: ++ return False ++ result = sos_get_command_output(cmd_output['cmd']) ++ if result['status'] != 0: ++ return False ++ for line in result['output'].splitlines(): ++ if cmd_output['output'] in line: ++ return True ++ return False ++ ++ def _eval_cmd_outputs(self): ++ if not self.cmd_outputs: ++ return True ++ ++ _cmds = [self._eval_cmd_output(c) for c in self.cmd_outputs] ++ ++ if self.required['commands'] == 'any': ++ return any(_cmds) ++ else: ++ return all(_cmds) ++ + def __nonzero__(self): + """Predicate evaluation hook. + """ + + # Null predicate? +- if not any([self.kmods, self.services, self.dry_run]): ++ if not any([self.kmods, self.services, self.cmd_outputs, self.dry_run]): + return True + +- return ((self._eval_kmods() and self._eval_services()) and not ++ return ((self._eval_kmods() and self._eval_services() and ++ self._eval_cmd_outputs()) and not + self.dry_run) + + def __bool__(self): +@@ -187,14 +223,17 @@ class SoSPredicate(object): + return self.__nonzero__() + + def __init__(self, owner, dry_run=False, kmods=[], services=[], +- required={}): ++ cmd_outputs=[], required={}): + """Initialise a new SoSPredicate object. + """ + self._owner = owner + self.kmods = list(kmods) + self.services = list(services) ++ if not isinstance(cmd_outputs, list): ++ cmd_outputs = [cmd_outputs] ++ self.cmd_outputs = cmd_outputs + self.dry_run = dry_run | self._owner.commons['cmdlineopts'].dry_run +- self.required = {'kmods': 'any', 'services': 'any'} ++ self.required = {'kmods': 'any', 'services': 'any', 'commands': 'any'} + self.required.update({ + k: v for k, v in required.items() if + required[k] != self.required[k] + +From 47e434c50e63f80e4b620e74d81c636c8c8a8d97 Mon Sep 17 00:00:00 2001 +From: Pavel Moravec +Date: Mon, 16 Sep 2019 17:15:40 +0200 +Subject: [PATCH 2/2] [grub2] call grub2-config with --no-grubenv-update when + appropriate + +On some newer grub2 versions, grub2-config removes extra args in +$kernel_opts until --no-grubenv-update option is used. + +Test if the option is present in "grub2-config --help" and if so, use it. + +Resolves: #1682 + +Signed-off-by: Pavel Moravec +--- +diff --git a/sos/plugins/grub2.py b/sos/plugins/grub2.py +index 9786de44d..0ca6fe096 100644 +--- a/sos/plugins/grub2.py ++++ b/sos/plugins/grub2.py +@@ -6,7 +6,8 @@ + # + # See the LICENSE file in the source distribution for further information. + +-from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin ++from sos.plugins import (Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin, ++ SoSPredicate) + + + class Grub2(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): +@@ -32,9 +33,16 @@ def setup(self): + self.add_cmd_output("ls -lanR /boot") + # call grub2-mkconfig with GRUB_DISABLE_OS_PROBER=true to prevent + # possible unwanted loading of some kernel modules ++ # further, check if the command supports --no-grubenv-update option ++ # to prevent removing of extra args in $kernel_opts, and (only) if so, ++ # call the command with this argument + env = {} + env['GRUB_DISABLE_OS_PROBER'] = 'true' +- self.add_cmd_output("grub2-mkconfig", env=env) ++ grub_cmd = 'grub2-mkconfig' ++ co = {'cmd': 'grub2-mkconfig --help', 'output': '--no-grubenv-update'} ++ if self.test_predicate(self, pred=SoSPredicate(self, cmd_outputs=co)): ++ grub_cmd += ' --no-grubenv-update' ++ self.add_cmd_output(grub_cmd, env=env) + + def postproc(self): + # the trailing space is required; python treats '_' as whitespace diff --git a/SOURCES/sos-bz1709906-frr-plugin.patch b/SOURCES/sos-bz1709906-frr-plugin.patch deleted file mode 100644 index dc43402..0000000 --- a/SOURCES/sos-bz1709906-frr-plugin.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 5969fe8ca4dcfd315c3df714c03c7e7344fa8047 Mon Sep 17 00:00:00 2001 -From: Pavel Moravec -Date: Tue, 9 Jul 2019 13:38:34 +0200 -Subject: [PATCH] [frr] FRR plugin - -A plugin for FRR alternative to Quagga. Path to conf is /etc/frr/. - -Resolves: #1666 - -Signed-off-by: Filip Krska -Signed-off-by: Pavel Moravec ---- - sos/plugins/frr.py | 25 +++++++++++++++++++++++++ - 1 file changed, 25 insertions(+) - create mode 100644 sos/plugins/frr.py - -diff --git a/sos/plugins/frr.py b/sos/plugins/frr.py -new file mode 100644 -index 000000000..031b2d935 ---- /dev/null -+++ b/sos/plugins/frr.py -@@ -0,0 +1,25 @@ -+# 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 -+ -+ -+class Frr(Plugin, RedHatPlugin): -+ """Frr routing service -+ """ -+ -+ plugin_name = 'frr' -+ profiles = ('network',) -+ -+ files = ('/etc/frr/zebra.conf',) -+ packages = ('frr',) -+ -+ def setup(self): -+ self.add_copy_spec("/etc/frr/") -+ -+# vim: set et ts=4 sw=4 : diff --git a/SOURCES/sos-bz1714243-sar-collect-older-data.patch b/SOURCES/sos-bz1714243-sar-collect-older-data.patch deleted file mode 100644 index 5984608..0000000 --- a/SOURCES/sos-bz1714243-sar-collect-older-data.patch +++ /dev/null @@ -1,48 +0,0 @@ -From b3d9fdf568e25997eb006e575d26fb301b91414b Mon Sep 17 00:00:00 2001 -From: Pavel Moravec -Date: Tue, 9 Jul 2019 13:15:48 +0200 -Subject: [PATCH] [sar] collect whole sar log dir - -Currently, sosreport does not collect files in saYYYYMMDD or -similar format. Assuming sar log dir contains only sar related data -it is safe to collect whole dir (up to size limit, from newest to -oldest files). - -Resolves: #1700 - -Signed-off-by: Pavel Moravec ---- - sos/plugins/sar.py | 19 ++----------------- - 1 file changed, 2 insertions(+), 17 deletions(-) - -diff --git a/sos/plugins/sar.py b/sos/plugins/sar.py -index 492c38a21..5a1b9f30a 100644 ---- a/sos/plugins/sar.py -+++ b/sos/plugins/sar.py -@@ -22,24 +22,9 @@ class Sar(Plugin,): - option_list = [("all_sar", "gather all system activity records", - "", False)] - -- # size-limit SAR data collected by default (MB) -- sa_size = 20 -- - def setup(self): -- if self.get_option("all_sar"): -- self.sa_size = 0 -- -- # Copy all sa??, sar??, sa??.* and sar??.* files, which will net -- # compressed and uncompressed versions, typically. -- for suffix in ('', '.*'): -- self.add_copy_spec( -- os.path.join(self.sa_path, "sa[0-3][0-9]" + suffix), -- sizelimit=self.sa_size, tailit=False -- ) -- self.add_copy_spec( -- os.path.join(self.sa_path, "sar[0-3][0-9]" + suffix), -- sizelimit=self.sa_size, tailit=False -- ) -+ self.add_copy_spec(self.sa_path, -+ sizelimit=0 if self.get_option("all_sar") else None) - - try: - dir_list = os.listdir(self.sa_path) diff --git a/SOURCES/sos-bz1717882-openstack-placement.patch b/SOURCES/sos-bz1717882-openstack-placement.patch deleted file mode 100644 index 931c9f9..0000000 --- a/SOURCES/sos-bz1717882-openstack-placement.patch +++ /dev/null @@ -1,145 +0,0 @@ -From b5d72bd91c8685e3551d6e796ca8559304b45785 Mon Sep 17 00:00:00 2001 -From: Lee Yarwood -Date: Mon, 24 Dec 2018 10:03:59 +0000 -Subject: [PATCH] [openstack] Extract Placement plugin from Nova - -The OpenStack Placement service is being extracted from Nova [1] -duringthe Stein development cycle [2]. This change extracts the -required plugin logic from the original Nova plugin into a new -Placement plugin ahead of this extraction. - -[1] https://docs.openstack.org/placement/latest/ -[2] https://releases.openstack.org/stein/schedule.html - -Co-Authored-by: Piotr Kopec - -Resolves: #1676 - -Signed-off-by: Lee Yarwood -Signed-off-by: Bryn M. Reeves ---- - sos/plugins/openstack_placement.py | 112 +++++++++++++++++++++++++++++ - 1 file changed, 112 insertions(+) - create mode 100644 sos/plugins/openstack_placement.py - -diff --git a/sos/plugins/openstack_placement.py b/sos/plugins/openstack_placement.py -new file mode 100644 -index 00000000..26b1a520 ---- /dev/null -+++ b/sos/plugins/openstack_placement.py -@@ -0,0 +1,112 @@ -+# Copyright (C) 2019 Red Hat, Inc., Lee Yarwood -+ -+# 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 OpenStackPlacement(Plugin): -+ """OpenStack Placement -+ """ -+ plugin_name = "openstack_placement" -+ profiles = ('openstack', 'openstack_controller') -+ -+ var_puppet_gen = "/var/lib/config-data/puppet-generated/placement" -+ -+ def setup(self): -+ -+ # collect commands output only if the openstack-placement-api service -+ # is running -+ -+ in_container = self.running_in_container() -+ -+ if self.service_is_running('openstack-placement-api') or in_container: -+ placement_config = "" -+ # if containerized we need to pass the config to the cont. -+ if in_container: -+ placement_config = "--config-dir " + self.var_puppet_gen + \ -+ "/etc/placement/" -+ self.add_cmd_output( -+ "placement-manage " + placement_config + " db version", -+ suggest_filename="placement-manage_db_version" -+ ) -+ -+ if self.get_option("all_logs"): -+ self.add_copy_spec([ -+ "/var/log/placement/", -+ "/var/log/containers/placement/", -+ "/var/log/containers/httpd/placement-api/" -+ ]) -+ else: -+ self.add_copy_spec([ -+ "/var/log/placement/*.log", -+ "/var/log/containers/placement/*.log", -+ "/var/log/containers/httpd/placement-api/*log", -+ ]) -+ -+ self.add_copy_spec([ -+ "/etc/placement/", -+ self.var_puppet_gen + "/etc/placement/", -+ self.var_puppet_gen + "/etc/my.cnf.d/tripleo.cnf", -+ self.var_puppet_gen + "/etc/httpd/conf/", -+ self.var_puppet_gen + "/etc/httpd/conf.d/", -+ self.var_puppet_gen + "/etc/httpd/conf.modules.d/*.conf", -+ ]) -+ -+ def running_in_container(self): -+ for runtime in ["docker", "podman"]: -+ container_status = self.get_command_output(runtime + " ps") -+ if container_status['status'] == 0: -+ for line in container_status['output'].splitlines(): -+ if line.endswith("placement_api"): -+ return True -+ return False -+ -+ def apply_regex_sub(self, regexp, subst): -+ self.do_path_regex_sub("/etc/placement/*", regexp, subst) -+ self.do_path_regex_sub( -+ self.var_puppet_gen + "/etc/placement/*", -+ regexp, subst -+ ) -+ -+ def postproc(self): -+ protect_keys = ["password"] -+ connection_keys = ["database_connection", "slave_connection"] -+ -+ self.apply_regex_sub( -+ r"((?m)^\s*(%s)\s*=\s*)(.*)" % "|".join(protect_keys), -+ r"\1*********" -+ ) -+ self.apply_regex_sub( -+ r"((?m)^\s*(%s)\s*=\s*(.*)://(\w*):)(.*)(@(.*))" % -+ "|".join(connection_keys), -+ r"\1*********\6" -+ ) -+ -+ -+class DebianPlacement(OpenStackPlacement, DebianPlugin, UbuntuPlugin): -+ -+ packages = ('placement') -+ -+ def setup(self): -+ super(DebianPlacement, self).setup() -+ -+ -+class RedHatPlacement(OpenStackPlacement, RedHatPlugin): -+ -+ packages = ('openstack-selinux') -+ -+ def setup(self): -+ super(RedHatPlacement, self).setup() -+ if self.get_option("all_logs"): -+ self.add_copy_spec("/var/log/httpd/placement*") -+ else: -+ self.add_copy_spec("/var/log/httpd/placement*.log") -+ -+# vim: set et ts=4 sw=4 : --- -2.21.0 - diff --git a/SOURCES/sos-bz1718087-redhat-local-name-not-rhn.patch b/SOURCES/sos-bz1718087-redhat-local-name-not-rhn.patch deleted file mode 100644 index b3177c1..0000000 --- a/SOURCES/sos-bz1718087-redhat-local-name-not-rhn.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 4aa7e6e383fd9a36931b1125a8e8cd8e3ebcf1de Mon Sep 17 00:00:00 2001 -From: Pavel Moravec -Date: Thu, 13 Jun 2019 16:39:54 +0200 -Subject: [PATCH] [policies] redhat policy to use hostname instead of rhn id - for local name - -As rhn is getting obsoleted and each host has its hostname, even redhat policy -should use host name as the local name. - -Resolves: #1702 - -Signed-off-by: Pavel Moravec ---- - sos/policies/redhat.py | 23 ----------------------- - 1 file changed, 23 deletions(-) - -diff --git a/sos/policies/redhat.py b/sos/policies/redhat.py -index 28d48d2d8..5fa1695c5 100644 ---- a/sos/policies/redhat.py -+++ b/sos/policies/redhat.py -@@ -19,14 +19,6 @@ - from sos import _sos as _ - from sos import SoSOptions - --sys.path.insert(0, "/usr/share/rhn/") --try: -- from up2date_client import up2dateAuth -- from rhn import rpclib --except ImportError: -- # might fail if non-RHEL -- pass -- - OS_RELEASE = "/etc/os-release" - - -@@ -174,9 +166,6 @@ def get_tmp_dir(self, opt_tmp_dir): - return self._tmp_dir - return opt_tmp_dir - -- def get_local_name(self): -- return self.host_name() -- - - # Container environment variables on Red Hat systems. - ENV_CONTAINER = 'container' -@@ -305,18 +294,6 @@ def dist_version(self): - pass - return False - -- def rhn_username(self): -- try: -- rhn_username = rpclib.xmlrpclib.loads( -- up2dateAuth.getSystemId())[0][0]['username'] -- return rhn_username.encode('utf-8', 'ignore') -- except Exception: -- # ignore any exception and return an empty username -- return "" -- -- def get_local_name(self): -- return self.rhn_username() or self.host_name() -- - def probe_preset(self): - # Package based checks - if self.pkg_by_name("satellite-common") is not None: diff --git a/SOURCES/sos-bz1719884-pcp-pmlogger-no-limit.patch b/SOURCES/sos-bz1719884-pcp-pmlogger-no-limit.patch deleted file mode 100644 index 8c12a1b..0000000 --- a/SOURCES/sos-bz1719884-pcp-pmlogger-no-limit.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 380737d0bf4021434db4d5e479f0b8a2aece6ec9 Mon Sep 17 00:00:00 2001 -From: Pavel Moravec -Date: Thu, 4 Apr 2019 10:43:24 +0200 -Subject: [PATCH] [pcp] collect pmlogger without a sizelimit - -sizelimit=None defaults to --log-size, use sizelimit=0 instead - -Resolves: #1632 - -Signed-off-by: Pavel Moravec ---- - sos/plugins/pcp.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sos/plugins/pcp.py b/sos/plugins/pcp.py -index da7158a6..da2a6611 100644 ---- a/sos/plugins/pcp.py -+++ b/sos/plugins/pcp.py -@@ -130,7 +130,7 @@ class Pcp(Plugin, RedHatPlugin, DebianPlugin): - pmlogger_ls = self.get_cmd_output_now("ls -t1 %s" % path) - if pmlogger_ls: - for line in open(pmlogger_ls).read().splitlines(): -- self.add_copy_spec(line, sizelimit=None) -+ self.add_copy_spec(line, sizelimit=0) - files_collected = files_collected + 1 - if self.countlimit and files_collected == self.countlimit: - break --- -2.17.2 - diff --git a/SOURCES/sos-bz1719885-plugin-vs-command-timeouts.patch b/SOURCES/sos-bz1719885-plugin-vs-command-timeouts.patch deleted file mode 100644 index 00e896e..0000000 --- a/SOURCES/sos-bz1719885-plugin-vs-command-timeouts.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 7c8c45dad3481cfaae3d3af9c188218aa14a3a6a Mon Sep 17 00:00:00 2001 -From: Pavel Moravec -Date: Tue, 9 Apr 2019 09:50:34 +0200 -Subject: [PATCH] [foreman,satellite] increase plugin default timeouts - -Those two plugins call commands with bigger timeouts than the default -plugin timeout is. That can unexpectedly kill the plugin execution when -the commands execution took longer than the plugin timeout (but within -cmd timeout). - -Resolves: #1642 - -Signed-off-by: Pavel Moravec ---- - sos/plugins/foreman.py | 1 + - sos/plugins/satellite.py | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/sos/plugins/foreman.py b/sos/plugins/foreman.py -index a1e937f3..8bcd26bd 100644 ---- a/sos/plugins/foreman.py -+++ b/sos/plugins/foreman.py -@@ -19,6 +19,7 @@ class Foreman(Plugin): - """ - - plugin_name = 'foreman' -+ plugin_timeout = 1800 - profiles = ('sysmgmt',) - packages = ('foreman', 'foreman-proxy') - option_list = [ -diff --git a/sos/plugins/satellite.py b/sos/plugins/satellite.py -index c50c2ec7..83733076 100644 ---- a/sos/plugins/satellite.py -+++ b/sos/plugins/satellite.py -@@ -14,6 +14,7 @@ class Satellite(Plugin, RedHatPlugin): - """ - - plugin_name = 'satellite' -+ plugin_timeout = 1200 - profiles = ('sysmgmt',) - verify_packages = ('spacewalk.*',) - satellite = False --- -2.17.2 - diff --git a/SOURCES/sos-bz1719886-sos-conf-disabled-plugins-manpages.patch b/SOURCES/sos-bz1719886-sos-conf-disabled-plugins-manpages.patch deleted file mode 100644 index bed3bde..0000000 --- a/SOURCES/sos-bz1719886-sos-conf-disabled-plugins-manpages.patch +++ /dev/null @@ -1,110 +0,0 @@ -From 4cb21e2c16b55e7506a3cefd9148ba4bf49dbce1 Mon Sep 17 00:00:00 2001 -From: Pavel Moravec -Date: Wed, 17 Apr 2019 13:17:24 +0200 -Subject: [PATCH] [sosreport] update sos.conf manpages by [general] section - description - -Since PR #1530, sosreport supports all command line options. Man pages -should document the enhancement. - -Resolves: #1652 - -Signed-off-by: Pavel Moravec ---- - man/en/sos.conf.5 | 38 ++++++++++++++++++++++++++++++++++---- - 1 file changed, 34 insertions(+), 4 deletions(-) - -diff --git a/man/en/sos.conf.5 b/man/en/sos.conf.5 -index b40a48e1..ad18d5f2 100644 ---- a/man/en/sos.conf.5 -+++ b/man/en/sos.conf.5 -@@ -6,19 +6,49 @@ sos.conf \- sosreport configuration - sosreport uses a configuration file at /etc/sos.conf. - .SH PARAMETERS - .sp --There are two sections in the sosreport configuration file: --plugins, and tunables. Options are set using 'ini'-style --\fBname = value\fP pairs. -+There are three sections in the sosreport configuration file: -+general, plugins and tunables. Options are set using 'ini'-style -+\fBname = value\fP pairs. Disabling/enabling a boolean option -+is done the same way like on command line (e.g. process.lsof=off). - - Some options accept a comma separated list of values. - -+Using options that dont expect a value (like all-logs or no-report) -+will result in enabling those options, regardless of value set. -+ -+Sections are parsed in the ordering: -+.br -+- \fB[general]\fP -+.br -+- \fB[plugins]\fP (disable) -+.br -+- \fB[plugins]\fP (enable) -+.br -+- \fB[tunables]\fP -+ -+.TP -+\fB[general]\fP -+