aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Jansky <jjansky@redhat.com>2020-07-16 14:34:49 +0200
committerJake Hunsaker <jhunsake@redhat.com>2020-07-16 11:33:51 -0400
commit7994ea1cc22ae256f08426ef37931b7b58f0fefc (patch)
tree91e1b66a3a13115749cc0d52b0f8c08b03df5195
parent91917210e69977005bb254e0f08d4d38bfe49718 (diff)
downloadsos-7994ea1cc22ae256f08426ef37931b7b58f0fefc.tar.gz
[gluster] remove generated state files
Remove also generated state files in /run/gluster. Resolves: #2154 Signed-off-by: Jan Jansky <jjansky@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r--sos/report/plugins/gluster.py5
1 files changed, 4 insertions, 1 deletions
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