summaryrefslogtreecommitdiffstats
path: root/cli/src
diff options
context:
space:
mode:
authorVijay Bellur <vbellur@redhat.com>2013-12-22 10:28:54 +0530
committerVijay Bellur <vbellur@redhat.com>2013-12-22 08:29:27 -0800
commite19add96b3906c2911d8b568a0ebcfa44c5a6950 (patch)
tree04540d7d07ce082176127ff23d8be8f282f042f9 /cli/src
parent1832dbf0ba3d5153415c7e7f7eab935007cc8209 (diff)
cli: Throw a warning during creation of rdma volumes.
Change-Id: I75e5383dc7401886c6afe435488de0368050e4e4 BUG: 1017176 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/6558 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'cli/src')
-rw-r--r--cli/src/cli-cmd-volume.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c
index 216a2b6bfd9..e693f118277 100644
--- a/cli/src/cli-cmd-volume.c
+++ b/cli/src/cli-cmd-volume.c
@@ -346,6 +346,11 @@ cli_cmd_volume_create_cbk (struct cli_state *state, struct cli_cmd_word *word,
int32_t sub_count = 0;
int32_t type = GF_CLUSTER_TYPE_NONE;
cli_local_t *local = NULL;
+ char *trans_type = NULL;
+ char *question = "RDMA transport is"
+ " recommended only for testing purposes"
+ " in this release. Do you want to continue?";
+ gf_answer_t answer = GF_ANSWER_NO;
proc = &cli_rpc_prog->proctable[GLUSTER_CLI_CREATE_VOLUME];
@@ -392,6 +397,21 @@ cli_cmd_volume_create_cbk (struct cli_state *state, struct cli_cmd_word *word,
}
}
+ ret = dict_get_str (options, "transport", &trans_type);
+ if (ret) {
+ gf_log("cli", GF_LOG_ERROR, "Unable to get transport type");
+ goto out;
+ }
+
+ if (strcasestr (trans_type, "rdma")) {
+ answer =
+ cli_cmd_get_confirmation (state, question);
+ if (GF_ANSWER_NO == answer) {
+ ret = 0;
+ goto out;
+ }
+ }
+
if (state->mode & GLUSTER_MODE_SCRIPT) {
ret = dict_set_int32 (options, "force", _gf_true);
if (ret) {