summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAravinda VK <avishwan@redhat.com>2015-04-07 16:47:15 +0530
committerVijay Bellur <vbellur@redhat.com>2015-04-09 09:52:33 +0000
commit3ed7d6de25cba5e24351fd4771e84c7182436916 (patch)
treed0159406f30d2c0eb415028fe5715ed0dbdf838d /tools
parent0086a55bb7de1ef5dc7a24583f5fc2b560e835fd (diff)
tools/glusterfind: Check existence of Session
Use glusterfind list command to check a session is valid or not glusterfind list --session <SESSION> --volume <VOLUME> Session exists if return code($?) is zero else invalid session Change-Id: I37faa09e4e1bf2f10725dd8e5b0cc36a36a3cad4 Signed-off-by: Aravinda VK <avishwan@redhat.com> BUG: 1205057 Reviewed-on: http://review.gluster.org/10154 Reviewed-by: Kotresh HR <khiremat@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/glusterfind/src/main.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/glusterfind/src/main.py b/tools/glusterfind/src/main.py
index 81bddf5..17043dc 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()