From 586000144be8919a234939ad43b04394d5f2636e Mon Sep 17 00:00:00 2001 From: Pavan Sondur Date: Fri, 29 Oct 2010 07:03:38 +0000 Subject: mgmt/glusterd: Start nfs before killing source brick in replace brick commit. Signed-off-by: Pavan Vilas Sondur Signed-off-by: Anand V. Avati BUG: 1235 (Bug for all pump/migrate commits) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1235 --- xlators/mgmt/glusterd/src/glusterd-op-sm.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index bc9cb330bdc..93f6fc18851 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -2976,6 +2976,12 @@ glusterd_op_replace_brick (gd1_mgmt_stage_op_req *req, dict_t *rsp_dict) "Received commit - will be adding dst brick and " "removing src brick"); + ret = glusterd_check_generate_start_nfs (volinfo); + if (ret) { + gf_log ("", GF_LOG_CRITICAL, "Failed to generate " + " nfs volume file"); + } + if (!glusterd_is_local_addr (dst_brickinfo->hostname) && replace_op != GF_REPLACE_OP_COMMIT_FORCE) { gf_log ("", GF_LOG_NORMAL, @@ -3016,13 +3022,6 @@ glusterd_op_replace_brick (gd1_mgmt_stage_op_req *req, dict_t *rsp_dict) if (ret) goto out; - ret = glusterd_check_generate_start_nfs (volinfo); - - if (ret) { - gf_log ("", GF_LOG_CRITICAL, "Failed to generate " - " nfs volume file"); - } - ret = glusterd_fetchspec_notify (THIS); glusterd_set_rb_status (volinfo, GF_RB_STATUS_NONE); volinfo->src_brick = volinfo->dst_brick = NULL; -- cgit