summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-op-sm.c
diff options
context:
space:
mode:
authorKaushal M <kaushal@redhat.com>2013-02-14 12:47:54 +0530
committerVijay Bellur <vbellur@redhat.com>2013-03-05 01:05:59 -0800
commitda9a63e66d4a22135811f1c548124e07c2a466c0 (patch)
tree715ff3853b7afe135093c389fb33ecc9392f6edd /xlators/mgmt/glusterd/src/glusterd-op-sm.c
parent09ebc7087b0ebcfbb6346fdcc31599c926ac3e2a (diff)
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. BUG: 857330 Change-Id: I0f86c6bbe7acec586ee0ea6e663369ea26171904 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/4617 Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 7d84e664d..da1e8f83f 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) {