From 7994ea1cc22ae256f08426ef37931b7b58f0fefc Mon Sep 17 00:00:00 2001 From: Jan Jansky Date: Thu, 16 Jul 2020 14:34:49 +0200 Subject: [gluster] remove generated state files Remove also generated state files in /run/gluster. Resolves: #2154 Signed-off-by: Jan Jansky Signed-off-by: Jake Hunsaker --- sos/report/plugins/gluster.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sos/report/plugins/gluster.py b/sos/report/plugins/gluster.py index 9815bbe7..7b6a9298 100644 --- a/sos/report/plugins/gluster.py +++ b/sos/report/plugins/gluster.py @@ -45,7 +45,10 @@ class Gluster(Plugin, RedHatPlugin): if not os.path.exists(self.statedump_dir): return try: - for name in glob.glob(self.statedump_dir + '/*.dump.[0-9]*'): + remove_files = glob.glob(self.statedump_dir + '/*.dump.[0-9]*') + remove_files.extend(glob.glob(self.statedump_dir + + '/glusterd_state_[0-9]*_[0-9]*')) + for name in remove_files: os.remove(name) except OSError: pass -- cgit