Blame SOURCES/sos-bz2055002-rebase-sos-add-sos-help.patch

60f42e
From b5389aa195675f473acdd22f20017a8854ff82d0 Mon Sep 17 00:00:00 2001
60f42e
From: Pavel Moravec <pmoravec@redhat.com>
60f42e
Date: Wed, 16 Feb 2022 08:43:32 +0100
60f42e
Subject: [PATCH] [man] Mention sos-help in main sos manpage
60f42e
60f42e
Related to #2860
60f42e
60f42e
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
60f42e
---
60f42e
 man/en/sos.1 | 8 ++++++++
60f42e
 1 file changed, 8 insertions(+)
60f42e
60f42e
diff --git a/man/en/sos.1 b/man/en/sos.1
60f42e
index ce4918f99..c335b7e10 100644
60f42e
--- a/man/en/sos.1
60f42e
+++ b/man/en/sos.1
60f42e
@@ -67,6 +67,14 @@ May be invoked via either \fBsos clean\fR, \fBsos cleaner\fR, \fBsos mask\fR,
60f42e
 or via the \fB--clean\fR, \fB--cleaner\fR or \fB --mask\fR options
60f42e
 for \fBreport\fR and \fBcollect\fR.
60f42e
 
60f42e
+.TP
60f42e
+.B help
60f42e
+This subcommand is used to retrieve more detailed information on the various SoS
60f42e
+commands and components than is directly available in either other manpages or
60f42e
+--help output.
60f42e
+
60f42e
+See \fB sos help --help\fR and \fB man sos-help\fR for more information.
60f42e
+
60f42e
 .SH GLOBAL OPTIONS
60f42e
 sos components provide their own set of options, however the following are available
60f42e
 to be set across all components.
60f42e
From ac4eb48fa35c13b99ada41540831412480babf8d Mon Sep 17 00:00:00 2001
60f42e
From: Pavel Moravec <pmoravec@redhat.com>
60f42e
Date: Wed, 16 Feb 2022 08:44:16 +0100
60f42e
Subject: [PATCH] [setup] Add sos-help to build process
60f42e
60f42e
Resolves: #2860
60f42e
Closes: #2861
60f42e
60f42e
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
60f42e
---
60f42e
 setup.py | 5 +++--
60f42e
 1 file changed, 3 insertions(+), 2 deletions(-)
60f42e
60f42e
diff --git a/setup.py b/setup.py
60f42e
index 25e87a71b..8db8641f0 100644
60f42e
--- a/setup.py
60f42e
+++ b/setup.py
60f42e
@@ -90,7 +90,7 @@ def copy_file (self, filename, dirname):
60f42e
         ('share/man/man1', ['man/en/sosreport.1', 'man/en/sos-report.1',
60f42e
                             'man/en/sos.1', 'man/en/sos-collect.1',
60f42e
                             'man/en/sos-collector.1', 'man/en/sos-clean.1',
60f42e
-                            'man/en/sos-mask.1']),
60f42e
+                            'man/en/sos-mask.1', 'man/en/sos-help.1']),
60f42e
         ('share/man/man5', ['man/en/sos.conf.5']),
60f42e
         ('share/licenses/sos', ['LICENSE']),
60f42e
         ('share/doc/sos', ['AUTHORS', 'README.md']),
60f42e
@@ -102,7 +102,8 @@ def copy_file (self, filename, dirname):
60f42e
         'sos.policies.package_managers', 'sos.policies.init_systems',
60f42e
         'sos.report', 'sos.report.plugins', 'sos.collector',
60f42e
         'sos.collector.clusters', 'sos.collector.transports', 'sos.cleaner',
60f42e
-        'sos.cleaner.mappings', 'sos.cleaner.parsers', 'sos.cleaner.archives'
60f42e
+        'sos.cleaner.mappings', 'sos.cleaner.parsers', 'sos.cleaner.archives',
60f42e
+        'sos.help'
60f42e
     ],
60f42e
     cmdclass=cmdclass,
60f42e
     command_options=command_options,
60f42e
From de9b020a72d1ceda39587db4c6d5acf72cd90da2 Mon Sep 17 00:00:00 2001
60f42e
From: Fernando Royo <froyo@redhat.com>
60f42e
Date: Tue, 15 Feb 2022 10:00:38 +0100
60f42e
Subject: [PATCH] [ovn_central] Rename container responsable of Red Hat
60f42e
 ovn_central plugin
60f42e
60f42e
ovn_central plugin is running by container with
60f42e
name 'ovn-dbs-bundle*', a typo has been identified and
60f42e
this cause plugin ovn_central not enabled by default as it
60f42e
does not recognize any container responsible of this.
60f42e
60f42e
This patch fix this container name match, searching schema db
60f42e
keeping backward compatibility with openvswitch.
60f42e
---
60f42e
 sos/report/plugins/ovn_central.py | 23 ++++++++++++-----------
60f42e
 1 file changed, 12 insertions(+), 11 deletions(-)
60f42e
60f42e
diff --git a/sos/report/plugins/ovn_central.py b/sos/report/plugins/ovn_central.py
60f42e
index 2f0438df3..2f34bff09 100644
60f42e
--- a/sos/report/plugins/ovn_central.py
60f42e
+++ b/sos/report/plugins/ovn_central.py
60f42e
@@ -24,7 +24,7 @@ class OVNCentral(Plugin):
60f42e
     short_desc = 'OVN Northd'
60f42e
     plugin_name = "ovn_central"
60f42e
     profiles = ('network', 'virt')
60f42e
-    containers = ('ovs-db-bundle.*',)
60f42e
+    containers = ('ovn-dbs-bundle.*',)
60f42e
 
60f42e
     def get_tables_from_schema(self, filename, skip=[]):
60f42e
         if self._container_name:
60f42e
@@ -66,7 +66,7 @@ def add_database_output(self, tables, cmds, ovn_cmd):
60f42e
             cmds.append('%s list %s' % (ovn_cmd, table))
60f42e
 
60f42e
     def setup(self):
60f42e
-        self._container_name = self.get_container_by_name('ovs-dbs-bundle.*')
60f42e
+        self._container_name = self.get_container_by_name(self.containers[0])
60f42e
 
60f42e
         ovs_rundir = os.environ.get('OVS_RUNDIR')
60f42e
         for pidfile in ['ovnnb_db.pid', 'ovnsb_db.pid', 'ovn-northd.pid']:
60f42e
@@ -110,12 +110,11 @@ def setup(self):
60f42e
             'ovn-sbctl get-connection',
60f42e
         ]
60f42e
 
60f42e
-        schema_dir = '/usr/share/openvswitch'
60f42e
-
60f42e
-        nb_tables = self.get_tables_from_schema(self.path_join(
60f42e
-            schema_dir, 'ovn-nb.ovsschema'))
60f42e
-
60f42e
-        self.add_database_output(nb_tables, nbctl_cmds, 'ovn-nbctl')
60f42e
+        # backward compatibility
60f42e
+        for path in ['/usr/share/openvswitch', '/usr/share/ovn']:
60f42e
+            nb_tables = self.get_tables_from_schema(self.path_join(
60f42e
+                path, 'ovn-nb.ovsschema'))
60f42e
+            self.add_database_output(nb_tables, nbctl_cmds, 'ovn-nbctl')
60f42e
 
60f42e
         cmds = ovsdb_cmds
60f42e
         cmds += nbctl_cmds
60f42e
@@ -125,9 +124,11 @@ def setup(self):
60f42e
               format(self.ovn_sbdb_sock_path),
60f42e
               "output": "Leader: self"}
60f42e
         if self.test_predicate(self, pred=SoSPredicate(self, cmd_outputs=co)):
60f42e
-            sb_tables = self.get_tables_from_schema(self.path_join(
60f42e
-                schema_dir, 'ovn-sb.ovsschema'), ['Logical_Flow'])
60f42e
-            self.add_database_output(sb_tables, sbctl_cmds, 'ovn-sbctl')
60f42e
+            # backward compatibility
60f42e
+            for path in ['/usr/share/openvswitch', '/usr/share/ovn']:
60f42e
+                sb_tables = self.get_tables_from_schema(self.path_join(
60f42e
+                    path, 'ovn-sb.ovsschema'), ['Logical_Flow'])
60f42e
+                self.add_database_output(sb_tables, sbctl_cmds, 'ovn-sbctl')
60f42e
             cmds += sbctl_cmds
60f42e
 
60f42e
         # If OVN is containerized, we need to run the above commands inside
60f42e
From 7ebb2ce0bcd13c1b3aada648aceb20b5aff636d9 Mon Sep 17 00:00:00 2001
60f42e
From: Jake Hunsaker <jhunsake@redhat.com>
60f42e
Date: Tue, 15 Feb 2022 14:18:02 -0500
60f42e
Subject: [PATCH] [host] Skip entire /etc/sos/cleaner directory
60f42e
60f42e
While `default_mapping` is typically the only file expected under
60f42e
`/etc/sos/cleaner/` it is possible for other mapping files (such as
60f42e
backups) to appear there.
60f42e
60f42e
Make the `add_forbidden_path()` spec here target the entire cleaner
60f42e
directory to avoid ever capturing these map files.
60f42e
60f42e
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
60f42e
---
60f42e
 sos/report/plugins/host.py | 2 +-
60f42e
 1 file changed, 1 insertion(+), 1 deletion(-)
60f42e
60f42e
diff --git a/sos/report/plugins/host.py b/sos/report/plugins/host.py
60f42e
index 5e21da7b8..95a3b9cd9 100644
60f42e
--- a/sos/report/plugins/host.py
60f42e
+++ b/sos/report/plugins/host.py
60f42e
@@ -20,7 +20,7 @@ class Host(Plugin, IndependentPlugin):
60f42e
 
60f42e
     def setup(self):
60f42e
 
60f42e
-        self.add_forbidden_path('/etc/sos/cleaner/default_mapping')
60f42e
+        self.add_forbidden_path('/etc/sos/cleaner')
60f42e
 
60f42e
         self.add_cmd_output('hostname', root_symlink='hostname')
60f42e
         self.add_cmd_output('uptime', root_symlink='uptime')