From 51632e1eec3ff88d19867dc8d266068dd7db432a Mon Sep 17 00:00:00 2001 From: Mohammed Rafi KC Date: Thu, 10 Sep 2015 11:52:27 +0530 Subject: tier/glusterd: volume status failed after detach start After triggering detach start on a tiered volume fails. This because of brick count was wrongly setting in rebal dictionary. Change-Id: I6a472bf2653a07522416699420161f2fb1746aef BUG: 1261757 Signed-off-by: Mohammed Rafi KC Reviewed-on: http://review.gluster.org/12146 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Dan Lambright Tested-by: Dan Lambright --- xlators/mgmt/glusterd/src/glusterd-brick-ops.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'xlators/mgmt/glusterd') diff --git a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c index 8cb2bb33f4c..efc379b68c8 100644 --- a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c @@ -2386,10 +2386,14 @@ glusterd_op_remove_brick (dict_t *dict, char **op_errstr) goto out; } + if (volinfo->type == GF_CLUSTER_TYPE_TIER) + count = glusterd_set_detach_bricks(dict, volinfo); + /* Save the list of bricks for later usage only on starting a * remove-brick. Right now this is required for displaying the task * parameters with task status in volume status. */ + if (start_remove) { bricks_dict = dict_new (); if (!bricks_dict) { @@ -2405,9 +2409,6 @@ glusterd_op_remove_brick (dict_t *dict, char **op_errstr) } } - if (volinfo->type == GF_CLUSTER_TYPE_TIER) - count = glusterd_set_detach_bricks(dict, volinfo); - while ( i <= count) { snprintf (key, 256, "brick%d", i); ret = dict_get_str (dict, key, &brick); -- cgit