From f2d0baecfffe96231b52304ad0560c0697150fff Mon Sep 17 00:00:00 2001 From: Kaushik BV Date: Sun, 15 May 2011 04:59:53 +0000 Subject: mgmt/glusterd: Display a warning message to CLI in case of a corrupt geo-rep session Signed-off-by: Csaba Henk Signed-off-by: Anand Avati BUG: 2828 (gluster geo-rep stop should not show unsuccessful when the status is corrupt) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2828 --- cli/src/cli-rpc-ops.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'cli') diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index 4e3ae1ab50d..ff606746d38 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -2653,7 +2653,6 @@ out: return ret; } - int gf_cli3_1_gsync_config_command (dict_t *dict) { @@ -2758,6 +2757,7 @@ gf_cli3_1_gsync_set_cbk (struct rpc_req *req, struct iovec *iov, int ret = 0; gf1_cli_gsync_set_rsp rsp = {0, }; dict_t *dict = NULL; + char *gsync_status = NULL; char *master = NULL; char *slave = NULL; @@ -2792,6 +2792,13 @@ gf_cli3_1_gsync_set_cbk (struct rpc_req *req, struct iovec *iov, goto out; } + ret = dict_get_str (dict, "gsync-status", &gsync_status); + if (!ret) + cli_out (gsync_status); + else + ret = 0; + + switch (rsp.type) { case GF_GSYNC_OPTION_TYPE_START: case GF_GSYNC_OPTION_TYPE_STOP: -- cgit