From 3ed7d6de25cba5e24351fd4771e84c7182436916 Mon Sep 17 00:00:00 2001 From: Aravinda VK Date: Tue, 7 Apr 2015 16:47:15 +0530 Subject: tools/glusterfind: Check existence of Session Use glusterfind list command to check a session is valid or not glusterfind list --session --volume Session exists if return code($?) is zero else invalid session Change-Id: I37faa09e4e1bf2f10725dd8e5b0cc36a36a3cad4 Signed-off-by: Aravinda VK BUG: 1205057 Reviewed-on: http://review.gluster.org/10154 Reviewed-by: Kotresh HR Tested-by: Gluster Build System --- tools/glusterfind/src/main.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tools/glusterfind') diff --git a/tools/glusterfind/src/main.py b/tools/glusterfind/src/main.py index 81bddf55899..17043dca213 100644 --- a/tools/glusterfind/src/main.py +++ b/tools/glusterfind/src/main.py @@ -453,6 +453,9 @@ def mode_list(session_dir, args): volname.ljust(25), human_time(last_processed).ljust(25))) + if not output and (args.session or args.volume): + fail("Invalid Session", logger=logger) + def main(): args = _get_args() -- cgit