From ef830366a38d9420ad9a5065226b1911125ca8aa Mon Sep 17 00:00:00 2001 From: Kaushal M Date: Thu, 14 Feb 2013 12:47:54 +0530 Subject: glusterd: Fix check for task-id existence in 'volume status' This fixes the issue of task-id tests failing randomly. The condition used to check rebalance/remove-brick was running was wrong, which could lead to the task-id for these tasks to not be displayed even when the actual commit hadn't occured. Change-Id: I765daceda5b6bed1387342c15f9ea00552ac85f5 BUG: 857330 Signed-off-by: Kaushal M Reviewed-on: http://review.gluster.org/4514 Reviewed-by: Krishnan Parthasarathi Tested-by: Gluster Build System --- xlators/mgmt/glusterd/src/glusterd-op-sm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index f39de3116..8f0805217 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) { -- cgit