From d914cd909b9a99d7645b633000940195277bb6ff 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: 1219032 Signed-off-by: Gaurav Kumar Garg Reviewed-on: http://review.gluster.org/10610 Tested-by: Gluster Build System Tested-by: NetBSD Build System Reviewed-by: Vijay Bellur --- cli/src/cli-cmd-volume.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'cli') diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c index d121ac9473..ba4aac4939 100644 --- a/cli/src/cli-cmd-volume.c +++ b/cli/src/cli-cmd-volume.c @@ -892,14 +892,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