From 5a4f4a945661a8bb24735524e152ccd5b1ba571a Mon Sep 17 00:00:00 2001 From: Atin Mukherjee Date: Wed, 11 May 2016 18:24:40 +0530 Subject: glusterd: copy real_path from older brickinfo during brick import In glusterd_import_new_brick () new_brickinfo->real_path will not be populated for the first time and hence if the underlying file system is bad for the same brick, import will fail resulting in inconsistent configuration data. Fix is to populate real_path from old brickinfo object. Also there were many cases where we were unnecessarily calling realpath() and that may cause in failure. For eg - if a remove brick is executed with a brick whoose underlying file system has crashed, remove-brick fails since realpath() call fails. We'd need to call realpath() here as the value is of no use.Hence passing construct_realpath as _gf_false in glusterd_volume_brickinfo_get_by_brick () is a must in such cases. Change-Id: I7ec93871dc9e616f5d565ad5e540b2f1cacaf9dc BUG: 1335531 Signed-off-by: Atin Mukherjee Reviewed-on: http://review.gluster.org/14306 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Kaushal M --- xlators/mgmt/glusterd/src/glusterd-rebalance.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-rebalance.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-rebalance.c b/xlators/mgmt/glusterd/src/glusterd-rebalance.c index 60d1b204da5..fff6b3c2d91 100644 --- a/xlators/mgmt/glusterd/src/glusterd-rebalance.c +++ b/xlators/mgmt/glusterd/src/glusterd-rebalance.c @@ -603,7 +603,7 @@ glusterd_brick_validation (dict_t *dict, char *key, data_t *value, ret = glusterd_volume_brickinfo_get_by_brick (value->data, volinfo, &brickinfo, - _gf_true); + _gf_false); if (ret) { gf_msg (this->name, GF_LOG_ERROR, EINVAL, GD_MSG_BRICK_NOT_FOUND, -- cgit