diff options
-rw-r--r-- | cli/src/cli-cmd-parser.c | 10 | ||||
-rw-r--r-- | cli/src/cli-cmd-volume.c | 2 | ||||
-rw-r--r-- | cli/src/cli-rpc-ops.c | 13 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-syncop.c | 13 |
4 files changed, 21 insertions, 17 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index ac4221ff8c4..482010ce502 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -3826,16 +3826,6 @@ cli_cmd_volume_heal_options_parse (const char **words, int wordcount, } if (!strcmp (words[3], "info")) { - if (!strcmp (words[4], "healed")) { - ret = dict_set_int32 (dict, "heal-op", - GF_SHD_OP_HEALED_FILES); - goto done; - } - if (!strcmp (words[4], "heal-failed")) { - ret = dict_set_int32 (dict, "heal-op", - GF_SHD_OP_HEAL_FAILED_FILES); - goto done; - } if (!strcmp (words[4], "split-brain")) { ret = dict_set_int32 (dict, "heal-op", GF_SHD_OP_SPLIT_BRAIN_FILES); diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c index a7e0fc7ed03..7bedd29306f 100644 --- a/cli/src/cli-cmd-volume.c +++ b/cli/src/cli-cmd-volume.c @@ -3305,7 +3305,7 @@ struct cli_cmd volume_cmds[] = { { "volume heal <VOLNAME> [enable | disable | full |" "statistics [heal-count [replica <HOSTNAME:BRICKNAME>]] |" - "info [summary | healed | heal-failed | split-brain] |" + "info [summary | split-brain] |" "split-brain {bigger-file <FILE> | latest-mtime <FILE> |" "source-brick <HOSTNAME:BRICKNAME> [<FILE>]} |" "granular-entry-heal {enable | disable}]", diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index 1a92fb54ec9..2b15813e123 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -9141,13 +9141,13 @@ gf_cli_heal_volume_cbk (struct rpc_req *req, struct iovec *iov, operation = "Launching heal operation "; heal_op_str = "to perform index self heal"; substr = "\nUse heal info commands to check" - " status"; + " status."; break; case GF_SHD_OP_HEAL_FULL: operation = "Launching heal operation "; heal_op_str = "to perform full self heal"; substr = "\nUse heal info commands to check" - " status"; + " status."; break; case GF_SHD_OP_INDEX_SUMMARY: heal_op_str = "list of entries to be healed"; @@ -9200,10 +9200,11 @@ gf_cli_heal_volume_cbk (struct rpc_req *req, struct iovec *iov, } if (rsp.op_ret) { - 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); + if (strcmp (rsp.op_errstr, "")) { + cli_err ("%s%s on volume %s has been unsuccessful:", + operation, heal_op_str, volname); + cli_err ("%s", rsp.op_errstr); + } ret = rsp.op_ret; goto out; } else { diff --git a/xlators/mgmt/glusterd/src/glusterd-syncop.c b/xlators/mgmt/glusterd/src/glusterd-syncop.c index aa47517c356..31b08d76adc 100644 --- a/xlators/mgmt/glusterd/src/glusterd-syncop.c +++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c @@ -1039,6 +1039,19 @@ out: errno = args.op_errno; if (args.dict) dict_unref (args.dict); + if (args.op_ret && (*errstr == NULL)) { + if (op == GD_OP_HEAL_VOLUME) { + gf_asprintf (errstr, + "Glusterd Syncop Mgmt brick op '%s' failed." + " Please check glustershd log file for details.", + gd_op_list[op]); + } else { + gf_asprintf (errstr, + "Glusterd Syncop Mgmt brick op '%s' failed." + " Please check brick log file for details.", + gd_op_list[op]); + } + } gd_brick_op_req_free (req); return args.op_ret; } |