summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
authorRavishankar N <ravishankar@redhat.com>2016-01-18 12:16:31 +0000
committerPranith Kumar Karampuri <pkarampu@redhat.com>2016-02-11 23:31:00 -0800
commitda33097c3d6492e3b468b4347e47c70828fb4320 (patch)
treed33d4362d311b4a16ebbde2baca8f3e0e1bc2828 /cli
parente29bf0b1f102308f114e04421d80696eebfbf6e3 (diff)
cli/ afr: op_ret for index heal launch
Problem: If index heal is launched when some of the bricks are down, glustershd of that node sends a -1 op_ret to glusterd which eventually propagates it to the CLI. Also, glusterd sometimes sends an err_str and sometimes not (depending on the failure happening in the brick-op phase or commit-op phase). So the message that gets displayed varies in each case: "Launching heal operation to perform index self heal on volume testvol has been unsuccessful" (OR) "Commit failed on <host>. Please check log file for details." Fix: 1. Modify afr_xl_op() to return -1 even if index healing of atleast one brick fails. 2. Ignore glusterd's error string in gf_cli_heal_volume_cbk and print a more meaningful message. The patch also fixes a bug in glusterfs_handle_translator_op() where if we encounter an error in notify of one xlator, we break out of the loop instead of sending the notify to other xlators. Change-Id: I957f6c4b4d0a45453ffd5488e425cab5a3e0acca BUG: 1302291 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/13303 Reviewed-by: Anuradha Talur <atalur@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'cli')
-rw-r--r--cli/src/cli-rpc-ops.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
index 4684679e557..6a296174b30 100644
--- a/cli/src/cli-rpc-ops.c
+++ b/cli/src/cli-rpc-ops.c
@@ -8469,13 +8469,10 @@ gf_cli_heal_volume_cbk (struct rpc_req *req, struct iovec *iov,
}
if (rsp.op_ret) {
- if (strcmp (rsp.op_errstr, "")) {
- cli_err ("%s", rsp.op_errstr);
- } else {
- cli_err ("%s%s on volume %s has been unsuccessful",
- operation, heal_op_str, volname);
- }
-
+ cli_err ("%s%s on volume %s has been unsuccessful on "
+ "bricks that are down. Please check if all brick "
+ "processes are running.",
+ operation, heal_op_str, volname);
ret = rsp.op_ret;
goto out;
} else {