aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sos/plugins/gluster.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/sos/plugins/gluster.py b/sos/plugins/gluster.py
index cbcc3d34..a303f818 100644
--- a/sos/plugins/gluster.py
+++ b/sos/plugins/gluster.py
@@ -91,10 +91,24 @@ class Gluster(Plugin, RedHatPlugin):
"/etc/glusterd.rpmsave",
# common to all versions
"/etc/glusterfs",
- "/var/lib/glusterd/",
- "/var/log/glusterfs"
+ "/var/lib/glusterd/"
] + glob.glob('/var/run/gluster/*tier-dht/*'))
+ # collect logs - apply log_size for any individual file
+ # all_logs takes precedence over logsize
+ if not self.get_option("all_logs"):
+ limit = self.get_option("log_size")
+ else:
+ limit = 0
+
+ if limit:
+ for f in (glob.glob("/var/log/glusterfs/*log") +
+ glob.glob("/var/log/glusterfs/*/*log") +
+ glob.glob("/var/log/glusterfs/geo-replication/*/*log")):
+ self.add_copy_spec_limit(f, limit)
+ else:
+ self.add_copy_spec("/var/log/glusterfs")
+
self.make_preparations(self.statedump_dir)
if self.check_ext_prog("killall -USR1 glusterfs glusterfsd"):
# let all the processes catch the signal and create statedump file