Blame SOURCES/sos-bz1857697-gluster-state_files_deletion.patch

c3caec
From 30211bc276fc33e8d3f137c0860be54bbb537064 Mon Sep 17 00:00:00 2001
c3caec
From: Jan Jansky <jjansky@redhat.com>
c3caec
Date: Fri, 17 Jul 2020 09:51:58 +0200
c3caec
Subject: [PATCH] [gluster] remove generated state files
c3caec
c3caec
Remove also generated state files in
c3caec
/run/gluster.
c3caec
c3caec
Related: #2154
c3caec
Resolves: #2155
c3caec
c3caec
Signed-off-by: Jan Jansky <jjansky@redhat.com>
c3caec
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
c3caec
---
c3caec
 sos/plugins/gluster.py | 5 ++++-
c3caec
 1 file changed, 4 insertions(+), 1 deletion(-)
c3caec
c3caec
diff --git a/sos/plugins/gluster.py b/sos/plugins/gluster.py
c3caec
index 777f941..4a9ebe3 100644
c3caec
--- a/sos/plugins/gluster.py
c3caec
+++ b/sos/plugins/gluster.py
c3caec
@@ -44,7 +44,10 @@ class Gluster(Plugin, RedHatPlugin):
c3caec
             if not os.path.exists(self.statedump_dir):
c3caec
                 return
c3caec
             try:
c3caec
-                for name in glob.glob(self.statedump_dir + '/*.dump.[0-9]*'):
c3caec
+                remove_files = glob.glob(self.statedump_dir + '/*.dump.[0-9]*')
c3caec
+                remove_files.extend(glob.glob(self.statedump_dir +
c3caec
+                                    '/glusterd_state_[0-9]*_[0-9]*'))
c3caec
+                for name in remove_files:
c3caec
                     os.remove(name)
c3caec
             except OSError:
c3caec
                 pass
c3caec
-- 
c3caec
1.8.3.1
c3caec