glusterd: Added checks for remove-brick handler.
Removing bricks in a plain stripe-replicate is failed if replica count is not reduced explicitly. Change-Id: I6d0de4862595744d1d1998b9a287c34c53d7fe5f BUG: 770561 Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-on: http://review.gluster.com/2577 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
This commit is contained in:
parent
60862f5916
commit
0a4ac03309
@ -643,6 +643,17 @@ glusterd_handle_remove_brick (rpcsvc_request_t *req)
|
||||
}
|
||||
}
|
||||
|
||||
if (!replica_count &&
|
||||
(volinfo->type == GF_CLUSTER_TYPE_STRIPE_REPLICATE) &&
|
||||
(volinfo->brick_count == volinfo->dist_leaf_count)) {
|
||||
snprintf (err_str, 2048, "Removing bricks from stripe-replicate"
|
||||
" configuration is not allowed without reducing "
|
||||
"replica or stripe count explicitly.");
|
||||
gf_log (THIS->name, GF_LOG_ERROR, "%s", err_str);
|
||||
ret = -1;
|
||||
goto out;
|
||||
}
|
||||
|
||||
brick_list = GF_MALLOC (120000 * sizeof(*brick_list),gf_common_mt_char);
|
||||
|
||||
if (!brick_list) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user