summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-cmd-volume.c
diff options
context:
space:
mode:
authorGaurav Kumar Garg <ggarg@redhat.com>2015-03-27 15:20:03 +0530
committerKaushal M <kaushal@redhat.com>2015-05-07 00:06:23 -0700
commit07e3f407b311c80e3437b1f650cae62f814d995b (patch)
tree41094414501c4140098eb20cf1d31abc261e550d /cli/src/cli-cmd-volume.c
parent84a0baabfb9aa29348d8b17b7517870d46023ab3 (diff)
glusterd: remove replace brick with data migration support form cli/glusterd
Replace-brick operation with data migration support have been deprecated from gluster. With this fix replace brick command will support only one commad gluster volume replace-brick <VOLNAME> <SOURCE-BRICK> <NEW-BRICK> {commit force} Change-Id: Ib81d49e5d8e7eaa4ccb5830cfec2bc081191b43b BUG: 1094119 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/10101 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
Diffstat (limited to 'cli/src/cli-cmd-volume.c')
-rw-r--r--cli/src/cli-cmd-volume.c36
1 files changed, 7 insertions, 29 deletions
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c
index 0dfb647b92c..d121ac94739 100644
--- a/cli/src/cli-cmd-volume.c
+++ b/cli/src/cli-cmd-volume.c
@@ -1655,18 +1655,13 @@ cli_cmd_volume_replace_brick_cbk (struct cli_state *state,
const char **words,
int wordcount)
{
- int ret = -1;
- rpc_clnt_procedure_t *proc = NULL;
- call_frame_t *frame = NULL;
+ int ret = -1;
+ rpc_clnt_procedure_t *proc = NULL;
+ call_frame_t *frame = NULL;
dict_t *options = NULL;
- int sent = 0;
- int parse_error = 0;
+ int sent = 0;
+ int parse_error = 0;
cli_local_t *local = NULL;
- int replace_op = 0;
- char *q = "All replace-brick commands except "
- "commit force are deprecated. "
- "Do you want to continue?";
- gf_answer_t answer = GF_ANSWER_NO;
#ifdef GF_SOLARIS_HOST_OS
cli_out ("Command not supported on Solaris");
@@ -1686,24 +1681,6 @@ cli_cmd_volume_replace_brick_cbk (struct cli_state *state,
goto out;
}
- ret = dict_get_int32 (options, "operation", &replace_op);
- if (replace_op != GF_REPLACE_OP_COMMIT_FORCE) {
- answer = cli_cmd_get_confirmation (state, q);
- if (GF_ANSWER_NO == answer) {
- ret = 0;
- goto out;
- }
- }
-
- if (state->mode & GLUSTER_MODE_WIGNORE) {
- ret = dict_set_int32 (options, "force", _gf_true);
- if (ret) {
- gf_log ("cli", GF_LOG_ERROR, "Failed to set force"
- "option");
- goto out;
- }
- }
-
CLI_LOCAL_INIT (local, words, frame, options);
if (proc->fn) {
@@ -2604,7 +2581,8 @@ struct cli_cmd volume_cmds[] = {
cli_cmd_volume_defrag_cbk,
"rebalance operations"},
- { "volume replace-brick <VOLNAME> <BRICK> <NEW-BRICK> {start [force]|pause|abort|status|commit [force]}",
+ { "volume replace-brick <VOLNAME> <SOURCE-BRICK> <NEW-BRICK> "
+ "{commit force}",
cli_cmd_volume_replace_brick_cbk,
"replace-brick operations"},