summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohammed Rafi KC <rkavunga@redhat.com>2015-09-10 11:52:27 +0530
committerDan Lambright <dlambrig@redhat.com>2015-10-08 06:39:04 -0700
commitc026598c52839c959b8b746d3b3fb574d96c726e (patch)
tree9279e277f770abc181b57333ca1f3205ff42e9d5
parentdbd8013d25a7ff1a47c6f035f93e51a7f6047a17 (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. Back port of> >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> (cherry picked from commit 51632e1eec3ff88d19867dc8d266068dd7db432a) Change-Id: I6b75c243873700dcb498303f1f308dea177feb4f BUG: 1261758 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/12244 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>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-brick-ops.c7
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 cb206ba9db7..982e96b4970 100644
--- a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
@@ -2474,10 +2474,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) {
@@ -2493,9 +2497,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);