summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-cmd-volume.c
diff options
context:
space:
mode:
authorkarthik-us <ksubrahm@redhat.com>2018-09-10 15:07:43 +0530
committerAtin Mukherjee <amukherj@redhat.com>2018-09-11 02:35:35 +0000
commitf0bacb2a51fbb3cd6645ee94d83e0a01549852dc (patch)
tree4498ea18ac5f4bfa7c157d730a9ec54e26d3696b /cli/src/cli-cmd-volume.c
parent23fa1feaf0a3ab482628ab5b7b950d27e57fb46d (diff)
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 <ksubrahm@redhat.com>
Diffstat (limited to 'cli/src/cli-cmd-volume.c')
-rw-r--r--cli/src/cli-cmd-volume.c12
1 files changed, 7 insertions, 5 deletions
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;