From 51e8213fd3a83e717fe7ef35d48d5c541b077c5f Mon Sep 17 00:00:00 2001 From: Jose Castillo Date: Mon, 8 Feb 2021 16:25:34 +0100 Subject: [PATCH] [gluster] Add glusterd public keys and status files This patch helps capture some missing files in the gluster plugin, i.e.: Files inside /var/lib/glusterd/glusterfind, like *.status files, that store the required timestamps, *.pem.pub files, that store ssh public keys. We also need to omit the glusterfind_*_secret.pem, which contains the openssh private key. Files inside /var/lib/glusterd/.keys, that contains *.pem.pub, the ssh public key. Closes: RHBZ#1925035, RHBZ#1925419 Resolves: #2411 Signed-off-by: Jose Castillo Signed-off-by: Jake Hunsaker --- sos/report/plugins/gluster.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sos/report/plugins/gluster.py b/sos/report/plugins/gluster.py index 7b6a9298..e1a89df2 100644 --- a/sos/report/plugins/gluster.py +++ b/sos/report/plugins/gluster.py @@ -55,6 +55,9 @@ class Gluster(Plugin, RedHatPlugin): def setup(self): self.add_forbidden_path("/var/lib/glusterd/geo-replication/secret.pem") + self.add_forbidden_path( + "/var/lib/glusterd/glusterfind/glusterfind_*_secret.pem" + ) self.add_cmd_output([ "gluster peer status", @@ -72,7 +75,10 @@ class Gluster(Plugin, RedHatPlugin): "/etc/glusterfs", "/var/lib/glusterd/", # collect nfs-ganesha related configuration - "/run/gluster/shared_storage/nfs-ganesha/" + "/run/gluster/shared_storage/nfs-ganesha/", + # collect status files and public ssh keys + "/var/lib/glusterd/.keys/", + "/var/lib/glusterd/glusterfind/" ] + glob.glob('/run/gluster/*tier-dht/*')) if not self.get_option("all_logs"): -- 2.26.2 From 4fb834ec862228afb276ccbd45aa86c66044ea66 Mon Sep 17 00:00:00 2001 From: Pavel Moravec Date: Mon, 15 Mar 2021 09:09:51 +0100 Subject: [PATCH] [gluster] collect public keys from the right dir Collection of glusterfind dir is achieved by /var/lib/gluster so it doesn't be collected explicitly. /var/lib/glusterd/glusterfind/.keys/ subdir is required to be explicitly collected, as add_copy_spec uses glob.glob() that skips hidden files. Resolves: #2451 Signed-off-by: Pavel Moravec Signed-off-by: Jake Hunsaker --- sos/report/plugins/gluster.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sos/report/plugins/gluster.py b/sos/report/plugins/gluster.py index e1a89df2..952cab63 100644 --- a/sos/report/plugins/gluster.py +++ b/sos/report/plugins/gluster.py @@ -76,9 +76,8 @@ class Gluster(Plugin, RedHatPlugin): "/var/lib/glusterd/", # collect nfs-ganesha related configuration "/run/gluster/shared_storage/nfs-ganesha/", - # collect status files and public ssh keys - "/var/lib/glusterd/.keys/", - "/var/lib/glusterd/glusterfind/" + # collect public ssh keys (a_s_c skips implicit hidden files) + "/var/lib/glusterd/glusterfind/.keys/", ] + glob.glob('/run/gluster/*tier-dht/*')) if not self.get_option("all_logs"): -- 2.26.2