cli: volume-info <VOLNAME>, peer-status to report failure before exit
BUG: 1181203 Change-Id: I84260d66135b1980f93b258d5de58c9e6b7a8402 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/9399 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
This commit is contained in:
parent
30ad195d49
commit
217253b692
@ -302,6 +302,9 @@ cli_cmd_await_response (unsigned time)
|
||||
return cli_op_ret;
|
||||
}
|
||||
|
||||
/* This function must be called _only_ after all actions associated with
|
||||
* command processing is complete. Otherwise, gluster process may exit before
|
||||
* reporting results to stdout/stderr. */
|
||||
int
|
||||
cli_cmd_broadcast_response (int32_t status)
|
||||
{
|
||||
|
@ -484,10 +484,11 @@ gf_cli_list_friends_cbk (struct rpc_req *req, struct iovec *iov,
|
||||
ret = 0;
|
||||
|
||||
out:
|
||||
cli_cmd_broadcast_response (ret);
|
||||
if (ret)
|
||||
cli_err ("%s: failed", cmd);
|
||||
|
||||
cli_cmd_broadcast_response (ret);
|
||||
|
||||
if (dict)
|
||||
dict_destroy (dict);
|
||||
|
||||
@ -850,10 +851,11 @@ next:
|
||||
|
||||
ret = 0;
|
||||
out:
|
||||
cli_cmd_broadcast_response (ret);
|
||||
if (ret)
|
||||
cli_err ("%s", err_str);
|
||||
|
||||
cli_cmd_broadcast_response (ret);
|
||||
|
||||
if (dict)
|
||||
dict_destroy (dict);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user