summaryrefslogtreecommitdiffstats
path: root/tools/glusterfind
diff options
context:
space:
mode:
authorMilind Changire <mchangir@redhat.com>2016-12-07 17:27:02 +0530
committerAravinda VK <avishwan@redhat.com>2016-12-07 22:05:48 -0800
commit2b4b928ed350286192b63b10b18f85c669b741f8 (patch)
tree012d89a60df7089f71c2ebabed7d92c9fe118b11 /tools/glusterfind
parenta268e2865c21ec8d2b4fed26715e986cfcc66fad (diff)
tools/glusterfind: avoid deleting keys directory
Problem: gluster volume delete mistakenly deletes the .keys directory under /var/lib/glusterd/glusterfind. Solution: Check for ".keys" directory and avoid deleting it. Change-Id: Ia595c8bf3f423c1ad5d6faa183a29598c07a11f9 BUG: 1402369 Signed-off-by: Milind Changire <mchangir@redhat.com> Reviewed-on: http://review.gluster.org/16052 Reviewed-by: Aravinda VK <avishwan@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'tools/glusterfind')
-rwxr-xr-xtools/glusterfind/S57glusterfind-delete-post.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/glusterfind/S57glusterfind-delete-post.py b/tools/glusterfind/S57glusterfind-delete-post.py
index 9e7774a..fb6c222 100755
--- a/tools/glusterfind/S57glusterfind-delete-post.py
+++ b/tools/glusterfind/S57glusterfind-delete-post.py
@@ -46,6 +46,10 @@ def main():
ls_glusterfind_dir = []
for session in ls_glusterfind_dir:
+ # don't blow away the keys directory
+ if session == ".keys":
+ continue
+
# Possible session directory
volume_session_path = os.path.join(glusterfind_dir,
session,