From 070d93afe63f377539b56ed646b714bb281bd240 Mon Sep 17 00:00:00 2001 From: Sakshi Date: Mon, 22 Jun 2015 15:52:22 +0530 Subject: glusterfsd : newly added brick receives fops only after it is started When new bricks are added in the middle of an on-going fop like 'rm', the volfile changes without waiting for the newly added bricks to get port. Fops are sent to all bricks and may fail on some with ENOTCONN as these bricks may not have a port yet. This patch ensures that the volfile change happens only after all the bricks have a port. Change-Id: I7ed2413475f80d0cc8849fed33036ade8d75a191 BUG: 1233151 Signed-off-by: Sakshi Reviewed-on: http://review.gluster.org/11342 Reviewed-by: Atin Mukherjee Tested-by: Atin Mukherjee --- xlators/mgmt/glusterd/src/glusterd-brick-ops.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-brick-ops.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c index b14566aa1bb..8772dd1d108 100644 --- a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c @@ -1318,7 +1318,7 @@ glusterd_op_perform_add_bricks (glusterd_volinfo_t *volinfo, int32_t count, volinfo->subvol_count = (volinfo->brick_count / volinfo->dist_leaf_count); - ret = glusterd_create_volfiles_and_notify_services (volinfo); + ret = glusterd_create_volfiles (volinfo); if (ret) goto out; @@ -1396,6 +1396,9 @@ glusterd_op_perform_add_bricks (glusterd_volinfo_t *volinfo, int32_t count, _glusterd_restart_gsync_session, ¶m); } volinfo->caps = caps; + + ret = glusterd_fetchspec_notify (this); + out: GF_FREE (free_ptr1); GF_FREE (free_ptr2); -- cgit