From 641e91fa83ae70514745d55728e1e32a740c2401 Mon Sep 17 00:00:00 2001 From: Gaurav Kumar Garg Date: Wed, 6 May 2015 18:18:25 +0530 Subject: tiering/cli: while attaching tier to volume cli should ask question Because of tiering feature is recommended only for testing purpose in this release, attaching tier should get a confirmation from the user before proceeding with the command. Change-Id: I141bbb1d0439f0a28eb51d17f7800908e35c75ad BUG: 1219057 Signed-off-by: Gaurav Kumar Garg Reviewed-on: http://review.gluster.org/10613 Reviewed-by: Atin Mukherjee Reviewed-by: Dan Lambright Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- cli/src/cli-cmd-volume.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c index 6458d04208d..c9c6b65f35f 100644 --- a/cli/src/cli-cmd-volume.c +++ b/cli/src/cli-cmd-volume.c @@ -845,14 +845,23 @@ cli_cmd_volume_attach_tier_cbk (struct cli_state *state, dict_t *options = NULL; int sent = 0; int parse_error = 0; - gf_answer_t answer = GF_ANSWER_NO; cli_local_t *local = NULL; int type = 0; + char *question = "Attach tier is recommended only " + "for testing purposes in this " + "release. Do you want to continue?"; + gf_answer_t answer = GF_ANSWER_NO; frame = create_frame (THIS, THIS->ctx->pool); if (!frame) goto out; + answer = cli_cmd_get_confirmation (state, question); + if (GF_ANSWER_NO == answer) { + ret = 0; + goto out; + } + ret = cli_cmd_volume_add_brick_parse (words, wordcount, &options, &type); if (ret) { cli_usage_out (word->pattern); -- cgit