14f8ab
From 039a3f81209706261fc809eac94564e81a3377da Mon Sep 17 00:00:00 2001
14f8ab
From: Sanju Rakonde <srakonde@redhat.com>
14f8ab
Date: Wed, 25 Sep 2019 14:55:19 +0530
14f8ab
Subject: [PATCH 300/302] cli: remove the warning displayed when remove brick
14f8ab
 start issued
14f8ab
14f8ab
remove-brick start command gives displays below error:
14f8ab
14f8ab
It is recommended that remove-brick be run with cluster.force-migration
14f8ab
option disabled to prevent possible data corruption. Doing so will ensure
14f8ab
that files that receive writes during migration will not be migrated and
14f8ab
will need to be manually copied after the remove-brick commit operation.
14f8ab
Please check the value of the option and update accordingly.
14f8ab
Do you want to continue with your current cluster.force-migration settings? (y/n)
14f8ab
14f8ab
As we are not qualifying cluster.force-migration for 3.5.0,
14f8ab
we should not display this message. So, removing it.
14f8ab
14f8ab
Label: DOWNSTREAM ONLY
14f8ab
14f8ab
BUG: 1755227
14f8ab
Change-Id: I409f2059d43c5e867788f19d2ccb8d6d839520f7
14f8ab
fixes: bz#1755227
14f8ab
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
14f8ab
Reviewed-on: https://code.engineering.redhat.com/gerrit/182009
14f8ab
Tested-by: RHGS Build Bot <nigelb@redhat.com>
14f8ab
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
14f8ab
---
14f8ab
 cli/src/cli-cmd-parser.c |  2 --
14f8ab
 cli/src/cli-cmd-volume.c | 11 -----------
14f8ab
 2 files changed, 13 deletions(-)
14f8ab
14f8ab
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
14f8ab
index 92ceb8e..4456a7b 100644
14f8ab
--- a/cli/src/cli-cmd-parser.c
14f8ab
+++ b/cli/src/cli-cmd-parser.c
14f8ab
@@ -2101,8 +2101,6 @@ cli_cmd_volume_remove_brick_parse(struct cli_state *state, const char **words,
14f8ab
         wordcount--;
14f8ab
         if (!strcmp("start", w)) {
14f8ab
             command = GF_OP_CMD_START;
14f8ab
-            if (question)
14f8ab
-                *question = 1;
14f8ab
         } else if (!strcmp("commit", w)) {
14f8ab
             command = GF_OP_CMD_COMMIT;
14f8ab
         } else if (!strcmp("stop", w)) {
14f8ab
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c
14f8ab
index a42e663..6b958bd 100644
14f8ab
--- a/cli/src/cli-cmd-volume.c
14f8ab
+++ b/cli/src/cli-cmd-volume.c
14f8ab
@@ -2088,17 +2088,6 @@ cli_cmd_volume_remove_brick_cbk(struct cli_state *state,
14f8ab
             "Remove-brick force will not migrate files from the "
14f8ab
             "removed bricks, so they will no longer be available"
14f8ab
             " on the volume.\nDo you want to continue?";
14f8ab
-    } else if (command == GF_OP_CMD_START) {
14f8ab
-        question =
14f8ab
-            "It is recommended that remove-brick be run with"
14f8ab
-            " cluster.force-migration option disabled to prevent"
14f8ab
-            " possible data corruption. Doing so will ensure that"
14f8ab
-            " files that receive writes during migration will not"
14f8ab
-            " be migrated and will need to be manually copied"
14f8ab
-            " after the remove-brick commit operation. Please"
14f8ab
-            " check the value of the option and update accordingly."
14f8ab
-            " \nDo you want to continue with your current"
14f8ab
-            " cluster.force-migration settings?";
14f8ab
     }
14f8ab
 
14f8ab
     if (!brick_count) {
14f8ab
-- 
14f8ab
1.8.3.1
14f8ab