diff options
author | Jan Jansky <jjansky@redhat.com> | 2020-07-16 14:34:49 +0200 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2020-07-16 11:33:51 -0400 |
commit | 7994ea1cc22ae256f08426ef37931b7b58f0fefc (patch) | |
tree | 91e1b66a3a13115749cc0d52b0f8c08b03df5195 | |
parent | 91917210e69977005bb254e0f08d4d38bfe49718 (diff) | |
download | sos-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.py | 5 |
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 |