summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-rpc-ops.c
diff options
context:
space:
mode:
authorKaushal M <kaushal@gluster.com>2011-09-14 18:29:18 +0530
committerVijay Bellur <vijay@gluster.com>2011-10-01 05:54:42 -0700
commitacea7409a35d03c438ff2738f701add26f0061c9 (patch)
treeb9a46fcf984a97f55b706f2373dcfdad12f5e81c /cli/src/cli-rpc-ops.c
parent795c8996c18f5e8ef5986581644374d0c5068772 (diff)
glusterd, cli: adds 'force' for 'peer detach'
Adds add a 'force' option to 'peer detach' to forcefully detach a peer from a cluster, even when the cluster contains volumes with bricks on the peer. Change-Id: I134df51c16a07345c8869b318141d427b572eba5 BUG: 3549 Reviewed-on: http://review.gluster.com/429 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kp@gluster.com>
Diffstat (limited to 'cli/src/cli-rpc-ops.c')
-rw-r--r--cli/src/cli-rpc-ops.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
index 1e77ae0ab71..f8662ea5528 100644
--- a/cli/src/cli-rpc-ops.c
+++ b/cli/src/cli-rpc-ops.c
@@ -1718,6 +1718,7 @@ gf_cli3_1_deprobe (call_frame_t *frame, xlator_t *this,
dict_t *dict = NULL;
char *hostname = NULL;
int port = 0;
+ int flags = 0;
if (!frame || !this || !data) {
ret = -1;
@@ -1733,9 +1734,13 @@ gf_cli3_1_deprobe (call_frame_t *frame, xlator_t *this,
if (ret)
port = CLI_GLUSTERD_PORT;
+ ret = dict_get_int32 (dict, "flags", &flags);
+ if (ret)
+ flags = 0;
+
req.hostname = hostname;
req.port = port;
-
+ req.flags = flags;
ret = cli_cmd_submit (&req, frame, cli_rpc_prog,
GLUSTER_CLI_DEPROBE, NULL,
this, gf_cli3_1_deprobe_cbk,