From 38a5a035ccba395dde991ab849a26b6f65257a16 Mon Sep 17 00:00:00 2001
From: Milind Changire <mchangir@redhat.com>
Date: Wed, 5 Aug 2015 16:21:51 +0530
Subject: [PATCH 307/320] tools/glusterfind: password prompts for peer nodes on delete
SSH keys getting deleted on local node caused password prompts for peer
nodes on a delete operation.
This race for session directory cleanup on local node is now addressed
by avoiding the delete path for local node in node_cmd()
The session directory tree is deleted anyway in mode_delete()
Change-Id: I8d000b01f523fffc0336bbec51b55099c0d4430f
BUG: 1234213
Reviewed-on: http://review.gluster.org/#/c/11832/
Reviewed-on: http://review.gluster.org/#/c/11693/
Signed-off-by: Milind Changire <mchangir@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/54471
Reviewed-by: Saravanakumar Arumugam <sarumuga@redhat.com>
Reviewed-by: Kotresh Hiremath Ravishankar <khiremat@redhat.com>
Reviewed-by: Aravinda Vishwanathapura Krishna Murthy <avishwan@redhat.com>
Tested-by: Aravinda Vishwanathapura Krishna Murthy <avishwan@redhat.com>
---
tools/glusterfind/src/main.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/tools/glusterfind/src/main.py b/tools/glusterfind/src/main.py
index b4d2c7e..6c2568e 100644
--- a/tools/glusterfind/src/main.py
+++ b/tools/glusterfind/src/main.py
@@ -55,6 +55,12 @@ def node_cmd(host, host_uuid, task, cmd, args, opts):
"""
localdir = is_host_local(host_uuid)
+ # this is so to avoid deleting the ssh keys on local node which otherwise
+ # cause ssh password prompts on the console (race conditions)
+ # mode_delete() should be cleaning up the session tree
+ if localdir and task == "delete":
+ return
+
pem_key_path = get_pem_key_path(args.session, args.volume)
if not localdir:
--
1.7.1