summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAravinda VK <avishwan@redhat.com>2015-03-31 18:26:48 +0530
committerVenky Shankar <vshankar@redhat.com>2015-04-01 10:35:20 -0700
commit0d36d4f6bab80dab2137e4049ee64e7cec180161 (patch)
tree7a3707884cef041a98696a51377a33715e709afb /tools
parentad0690d3bf979bf7098e718909d58399854c4560 (diff)
tools/glusterfind: Validate Volume name before session Create
Do not create Session directories if Volume does not exists. Change-Id: I60c9107135c2bed2a7198582267b2328dec7e868 Signed-off-by: Aravinda VK <avishwan@redhat.com> BUG: 1206065 Reviewed-on: http://review.gluster.org/10072 Reviewed-by: Kotresh HR <khiremat@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Venky Shankar <vshankar@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/glusterfind/src/main.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/glusterfind/src/main.py b/tools/glusterfind/src/main.py
index d97aafdbff1..81bddf55899 100644
--- a/tools/glusterfind/src/main.py
+++ b/tools/glusterfind/src/main.py
@@ -307,6 +307,10 @@ def mode_create(session_dir, args):
logger.debug("Init is called - Session: %s, Volume: %s"
% (args.session, args.volume))
+ execute(["gluster", "volume", "info", args.volume],
+ exit_msg="Unable to get volume details",
+ logger=logger)
+
mkdirp(session_dir, exit_on_err=True, logger=logger)
mkdirp(os.path.join(session_dir, args.volume), exit_on_err=True,
logger=logger)