diff options
author | Mohammed Rafi KC <rkavunga@redhat.com> | 2015-09-10 11:52:27 +0530 |
---|---|---|
committer | Dan Lambright <dlambrig@redhat.com> | 2015-09-18 09:55:46 -0700 |
commit | 51632e1eec3ff88d19867dc8d266068dd7db432a (patch) | |
tree | d6eddaf9622672b9fea2578ae95df82e931fc00d /xlators | |
parent | cb8db8dfce0394e30cb25983a402de7beaa9c63f (diff) |
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 <rkavunga@redhat.com>
Reviewed-on: http://review.gluster.org/12146
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Tested-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-brick-ops.c | 7 |
1 files changed, 4 insertions, 3 deletions
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); |