Blame SOURCES/sos-bz1925419-gluster-pubkeys-statusfile.patch

264a38
From 51e8213fd3a83e717fe7ef35d48d5c541b077c5f Mon Sep 17 00:00:00 2001
264a38
From: Jose Castillo <jcastillo@redhat.com>
264a38
Date: Mon, 8 Feb 2021 16:25:34 +0100
264a38
Subject: [PATCH] [gluster] Add glusterd public keys and status files
264a38
264a38
This patch helps capture some missing files in the
264a38
gluster plugin, i.e.:
264a38
264a38
Files inside /var/lib/glusterd/glusterfind, like
264a38
*.status files, that store the required timestamps,
264a38
*.pem.pub files, that store ssh public keys.
264a38
We also need to omit the glusterfind_*_secret.pem,
264a38
which contains the openssh private key.
264a38
264a38
Files inside /var/lib/glusterd/.keys, that contains
264a38
*.pem.pub,  the ssh public key.
264a38
264a38
Closes: RHBZ#1925035, RHBZ#1925419
264a38
264a38
Resolves: #2411
264a38
264a38
Signed-off-by: Jose Castillo <jcastillo@redhat.com>
264a38
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
264a38
---
264a38
 sos/report/plugins/gluster.py | 8 +++++++-
264a38
 1 file changed, 7 insertions(+), 1 deletion(-)
264a38
264a38
diff --git a/sos/report/plugins/gluster.py b/sos/report/plugins/gluster.py
264a38
index 7b6a9298..e1a89df2 100644
264a38
--- a/sos/report/plugins/gluster.py
264a38
+++ b/sos/report/plugins/gluster.py
264a38
@@ -55,6 +55,9 @@ class Gluster(Plugin, RedHatPlugin):
264a38
 
264a38
     def setup(self):
264a38
         self.add_forbidden_path("/var/lib/glusterd/geo-replication/secret.pem")
264a38
+        self.add_forbidden_path(
264a38
+            "/var/lib/glusterd/glusterfind/glusterfind_*_secret.pem"
264a38
+        )
264a38
 
264a38
         self.add_cmd_output([
264a38
             "gluster peer status",
264a38
@@ -72,7 +75,10 @@ class Gluster(Plugin, RedHatPlugin):
264a38
             "/etc/glusterfs",
264a38
             "/var/lib/glusterd/",
264a38
             # collect nfs-ganesha related configuration
264a38
-            "/run/gluster/shared_storage/nfs-ganesha/"
264a38
+            "/run/gluster/shared_storage/nfs-ganesha/",
264a38
+            # collect status files and public ssh keys
264a38
+            "/var/lib/glusterd/.keys/",
264a38
+            "/var/lib/glusterd/glusterfind/"
264a38
         ] + glob.glob('/run/gluster/*tier-dht/*'))
264a38
 
264a38
         if not self.get_option("all_logs"):
264a38
-- 
264a38
2.26.2
264a38