From 47ce812a322989a68ee6d56c4b3ebea67533dcbc Mon Sep 17 00:00:00 2001 From: Susant Palai Date: Mon, 26 Feb 2018 11:33:06 +0530 Subject: cli/glusterd: Add warning message in cli for user to check force-migration config for remove-brick operation. The cli will take input from the user before starting "remove-brick" start operation. The message/confirmation looks like the following: And also question for COMMIT_FORCE is changed. Fixes: bz#1572586 Change-Id: Ifdb6b108a646f50339dd196d6e65962864635139 Signed-off-by: Susant Palai --- cli/src/cli-cmd-parser.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'cli/src/cli-cmd-parser.c') diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index 950067550b..29043e0981 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -1991,7 +1991,7 @@ out: int32_t cli_cmd_volume_remove_brick_parse (const char **words, int wordcount, dict_t **options, int *question, - int *brick_count) + int *brick_count, int32_t *comm) { dict_t *dict = NULL; char *volname = NULL; @@ -2060,10 +2060,10 @@ cli_cmd_volume_remove_brick_parse (const char **words, int wordcount, wordcount--; if (!strcmp ("start", w)) { command = GF_OP_CMD_START; - } else if (!strcmp ("commit", w)) { - command = GF_OP_CMD_COMMIT; if (question) *question = 1; + } else if (!strcmp ("commit", w)) { + command = GF_OP_CMD_COMMIT; } else if (!strcmp ("stop", w)) { command = GF_OP_CMD_STOP; } else if (!strcmp ("status", w)) { @@ -2156,6 +2156,8 @@ out: GF_FREE (tmp_brick); GF_FREE (tmp_brick1); + *comm = command; + return ret; } -- cgit