diff options
author | Anand Avati <avati@redhat.com> | 2012-12-04 16:00:36 -0800 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-12-04 16:27:48 -0800 |
commit | 6d1607becc4fd84f7422730f37582164c86127d2 (patch) | |
tree | 53f5d99989e875dc68729046223c095c7a70ad5b /cli/src | |
parent | 698deb33d731df6de84da8ae8ee4045e1543a168 (diff) |
Revert "glusterd: add "volume label" command"
This reverts commit dad16a51ba7e6b1c57529423c57257dbce97ee93
Test script causing "silent" failures during execution.
Change-Id: I26dbb8ed22256071cb415cc3aff572ef8372600e
Reviewed-on: http://review.gluster.org/4268
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'cli/src')
-rw-r--r-- | cli/src/cli-cmd-volume.c | 61 | ||||
-rw-r--r-- | cli/src/cli-rpc-ops.c | 61 |
2 files changed, 0 insertions, 122 deletions
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c index f1526abaeb5..4dcb99ce26e 100644 --- a/cli/src/cli-cmd-volume.c +++ b/cli/src/cli-cmd-volume.c @@ -1790,62 +1790,6 @@ out: return ret; } -int -cli_cmd_volume_label_cbk (struct cli_state *state, struct cli_cmd_word *word, - const char **words, int wordcount) -{ - 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; - cli_local_t *local = NULL; - - frame = create_frame (THIS, THIS->ctx->pool); - if (!frame) - goto out; - - if (wordcount != 4) { - cli_usage_out (word->pattern); - parse_error = 1; - goto out; - } - - options = dict_new(); - if (!options) { - cli_out ("Could not allocate dict for label_volume"); - goto out; - } - - ret = dict_set_str (options, "volname", (char *)words[2]); - if (ret) - goto out; - - ret = dict_set_str (options, "brick", (char *)words[3]); - if (ret) - goto out; - - proc = &cli_rpc_prog->proctable[GLUSTER_CLI_LABEL_VOLUME]; - - CLI_LOCAL_INIT (local, words, frame, options); - - if (proc->fn) { - ret = proc->fn (frame, THIS, options); - } - -out: - if (ret) { - cli_cmd_sent_status_get (&sent); - if ((sent == 0) && (parse_error = 0)) - cli_out ("Volume label failed"); - } - - CLI_STACK_DESTROY (frame); - - return ret; -} - struct cli_cmd volume_cmds[] = { { "volume info [all|<VOLNAME>]", cli_cmd_volume_info_cbk, @@ -1956,11 +1900,6 @@ struct cli_cmd volume_cmds[] = { "Clear locks held on path" }, - {"volume label <VOLNAME> <BRICK>", - cli_cmd_volume_label_cbk, - "Add a volume label to an empty replacement brick" - }, - { NULL, NULL, NULL } }; diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index e772137ed3e..da239b51ec3 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -6253,66 +6253,6 @@ out: return ret; } -int32_t -gf_cli_label_volume_cbk (struct rpc_req *req, struct iovec *iov, int count, - void *myframe) -{ - gf_cli_rsp rsp = {0,}; - int ret = -1; - dict_t *dict = NULL; - - if (-1 == req->rpc_status) - goto out; - ret = xdr_to_generic (*iov, &rsp, - (xdrproc_t)xdr_gf_cli_rsp); - if (ret < 0) { - - gf_log ("cli", GF_LOG_ERROR, "XDR decoding failed"); - goto out; - } - gf_log ("cli", GF_LOG_DEBUG, "Received response to label"); - - if (rsp.op_ret) { - cli_err ("Volume label unsuccessful"); - cli_err ("%s", rsp.op_errstr); - - } else { - cli_out ("Volume label successful"); - - } - - ret = rsp.op_ret; - -out: - if (dict) - dict_unref (dict); - cli_cmd_broadcast_response (ret); - return ret; -} - -int32_t -gf_cli_label_volume (call_frame_t *frame, xlator_t *this, void *data) -{ - gf_cli_req req = {{0,}}; - dict_t *options = NULL; - int ret = -1; - - if (!frame || !this || !data) - goto out; - - options = data; - - ret = cli_to_glusterd (&req, frame, gf_cli_label_volume_cbk, - (xdrproc_t) xdr_gf_cli_req, options, - GLUSTER_CLI_LABEL_VOLUME, this, cli_rpc_prog, - NULL); -out: - gf_log ("cli", GF_LOG_DEBUG, "Returning %d", ret); - - GF_FREE (req.dict.dict_val); - return ret; -} - int cli_to_glusterd (gf_cli_req *req, call_frame_t *frame, fop_cbk_fn_t cbkfn, xdrproc_t xdrproc, dict_t *dict, @@ -6424,7 +6364,6 @@ struct rpc_clnt_procedure gluster_cli_actors[GLUSTER_CLI_MAXVALUE] = { #ifdef HAVE_BD_XLATOR [GLUSTER_CLI_BD_OP] = {"BD_OP", gf_cli_bd_op}, #endif - [GLUSTER_CLI_LABEL_VOLUME] = {"LABEL_VOLUME", gf_cli_label_volume}, }; struct rpc_clnt_program cli_prog = { |