From f0bacb2a51fbb3cd6645ee94d83e0a01549852dc Mon Sep 17 00:00:00 2001 From: karthik-us Date: Mon, 10 Sep 2018 15:07:43 +0530 Subject: cli: Add warning message while converting to replica 2 configuration Currently while creating replica 2 volume we display a warning message of ending up in split-brain. But while converting an existing volume from other configuration to replica 2 by add-brick or remove-brick operations we do not show any such messages. With this fix in add-brick and remove-brick cases also we will display the same warning message and prompt for confirmation if the configuration changes to replica 2. Change-Id: Ifc4ed6994a087d2403894f4e743c4eb41633276b fixes: bz#1627044 Signed-off-by: karthik-us --- cli/src/cli-cmd-volume.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'cli/src/cli-cmd-volume.c') diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c index d8b9e25f198..3d075a326bf 100644 --- a/cli/src/cli-cmd-volume.c +++ b/cli/src/cli-cmd-volume.c @@ -1023,7 +1023,8 @@ cli_cmd_volume_add_brick_cbk (struct cli_state *state, if (!frame) goto out; - ret = cli_cmd_volume_add_brick_parse (words, wordcount, &options, 0); + ret = cli_cmd_volume_add_brick_parse (state, words, wordcount, &options, + 0); if (ret) { cli_usage_out (word->pattern); parse_error = 1; @@ -1155,7 +1156,8 @@ do_cli_cmd_volume_attach_tier (struct cli_state *state, if (!frame) goto out; - ret = cli_cmd_volume_add_brick_parse (words, wordcount, &options, &type); + ret = cli_cmd_volume_add_brick_parse (state, words, wordcount, &options, + &type); if (ret) { cli_usage_out (word->pattern); parse_error = 1; @@ -2032,9 +2034,9 @@ cli_cmd_volume_remove_brick_cbk (struct cli_state *state, if (!frame) goto out; - ret = cli_cmd_volume_remove_brick_parse (words, wordcount, &options, - &need_question, &brick_count, - &command); + ret = cli_cmd_volume_remove_brick_parse (state, words, wordcount, + &options, &need_question, + &brick_count, &command); if (ret) { cli_usage_out (word->pattern); parse_error = 1; -- cgit