summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-brick-ops.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c4
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-rebalance.c5
3 files changed, 8 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
index fe556afef41..1c1ad1bf89b 100644
--- a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
@@ -1506,7 +1506,7 @@ glusterd_op_remove_brick (dict_t *dict, char **op_errstr)
}
}
- /* Clear task-id on completion/stopping of remove-brick operation */
+ /* Clear task-id on commmitting/stopping of remove-brick operation */
if ((cmd != GF_OP_CMD_START) || (cmd != GF_OP_CMD_STATUS))
uuid_clear (volinfo->rebal.rebalance_id);
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index f39de3116df..8f08052170a 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -2121,7 +2121,7 @@ glusterd_op_status_volume (dict_t *dict, char **op_errstr,
!origin_glusterd)
goto out;
- if (glusterd_is_defrag_on (volinfo)) {
+ if (!uuid_is_null (volinfo->rebal.rebalance_id)) {
ret = _add_task_to_dict (rsp_dict, volinfo, volinfo->rebal.op,
tasks);
if (ret) {
@@ -2131,7 +2131,7 @@ glusterd_op_status_volume (dict_t *dict, char **op_errstr,
}
tasks++;
}
- if (glusterd_is_rb_ongoing (volinfo)) {
+ if (!uuid_is_null (volinfo->rep_brick.rb_id)) {
ret = _add_task_to_dict (rsp_dict, volinfo, GD_OP_REPLACE_BRICK,
tasks);
if (ret) {
diff --git a/xlators/mgmt/glusterd/src/glusterd-rebalance.c b/xlators/mgmt/glusterd/src/glusterd-rebalance.c
index 307cdf629dc..271de6111c8 100644
--- a/xlators/mgmt/glusterd/src/glusterd-rebalance.c
+++ b/xlators/mgmt/glusterd/src/glusterd-rebalance.c
@@ -634,6 +634,11 @@ glusterd_op_rebalance (dict_t *dict, char **op_errstr, dict_t *rsp_dict)
cmd, NULL, GD_OP_REBALANCE);
break;
case GF_DEFRAG_CMD_STOP:
+ /* Clear task-id only on explicitly stopping the
+ * rebalance process.
+ */
+ uuid_clear (volinfo->rebal.rebalance_id);
+
/* Fall back to the old volume file in case of decommission*/
list_for_each_entry_safe (brickinfo, tmp, &volinfo->bricks,
brick_list) {