summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cli/src/cli-rpc-ops.c4
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-rebalance.c8
2 files changed, 10 insertions, 2 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
index 2357369b474..935977ffd89 100644
--- a/cli/src/cli-rpc-ops.c
+++ b/cli/src/cli-rpc-ops.c
@@ -2402,10 +2402,10 @@ gf_cli_detach_tier_status_cbk (struct rpc_req *req, struct iovec *iov,
ret = rsp.op_ret;
if (rsp.op_ret == -1) {
if (strcmp (rsp.op_errstr, ""))
- snprintf (msg, sizeof (msg), "volume detach-tier %s: "
+ snprintf (msg, sizeof (msg), "volume tier detach %s: "
"failed: %s", cmd_str, rsp.op_errstr);
else
- snprintf (msg, sizeof (msg), "volume detach-tier %s: "
+ snprintf (msg, sizeof (msg), "volume tier detach %s: "
"failed", cmd_str);
if (global_state->mode & GLUSTER_MODE_XML)
diff --git a/xlators/mgmt/glusterd/src/glusterd-rebalance.c b/xlators/mgmt/glusterd/src/glusterd-rebalance.c
index 785e7bf7d3f..e232511d7c6 100644
--- a/xlators/mgmt/glusterd/src/glusterd-rebalance.c
+++ b/xlators/mgmt/glusterd/src/glusterd-rebalance.c
@@ -740,6 +740,14 @@ glusterd_op_stage_rebalance (dict_t *dict, char **op_errstr)
goto out;
}
}
+ if (strstr(cmd_str, "tier") != NULL) {
+ if (volinfo->type != GF_CLUSTER_TYPE_TIER) {
+ snprintf (msg, sizeof(msg), "volume %s is not "
+ "a tier volume.", volinfo->volname);
+ ret = -1;
+ goto out;
+ }
+ }
if (strstr(cmd_str, "detach-tier") != NULL) {
if (volinfo->type != GF_CLUSTER_TYPE_TIER) {
snprintf (msg, sizeof(msg), "volume %s is not "