From 40ce0d6b12a105c975a58bf308b73ca677c7d5fb Mon Sep 17 00:00:00 2001 From: Krishnan Parthasarathi Date: Tue, 8 Jan 2013 08:53:51 +0530 Subject: glusterd: Don't persist enable-pump in volinfo->dict - enable-pump option in the pump xlator is set during a replace-brick session. This was persisted in the volinfo->dict for volume file generation. It has two 'harmful' side-effects, a) It would lead to volinfo cksum divergence among peers in cluster (for the same version no.) during a replace-brick session. b) "enable-pump" key would appear in "gluster volume info VOLNAME". This key is used internally in volume file generation code to optionally load the pump xlator in the source brick. It is _not_ an volume option. Change-Id: I37a8e7186e2985d187e4a166a599cf69145a90f9 BUG: 886000 Signed-off-by: Krishnan Parthasarathi Reviewed-on: http://review.gluster.org/4367 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/mgmt/glusterd/src/glusterd-replace-brick.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c index c57be5196ed..a91c2ee1c64 100644 --- a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c +++ b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c @@ -634,6 +634,8 @@ rb_regenerate_volfiles (glusterd_volinfo_t *volinfo, ret = glusterd_create_rb_volfiles (volinfo, brickinfo); + dict_del (dict, "enable-pump"); + out: return ret; } @@ -1727,11 +1729,6 @@ glusterd_op_replace_brick (dict_t *dict, dict_t *rsp_dict) /* fall through */ case GF_REPLACE_OP_COMMIT_FORCE: { - ret = dict_set_int32 (volinfo->dict, "enable-pump", 0); - gf_log (this->name, GF_LOG_DEBUG, - "Received commit - will be adding dst brick and " - "removing src brick"); - if (!glusterd_is_local_addr (dst_brickinfo->hostname)) { gf_log (this->name, GF_LOG_DEBUG, "I AM THE DESTINATION HOST"); @@ -1813,12 +1810,6 @@ glusterd_op_replace_brick (dict_t *dict, dict_t *rsp_dict) } } - ret = dict_set_int32 (volinfo->dict, "enable-pump", 0); - if (ret) { - gf_log (this->name, GF_LOG_CRITICAL, - "Unable to disable pump"); - } - if (!glusterd_is_local_addr (src_brickinfo->hostname)) { ret = rb_src_brick_restart (volinfo, src_brickinfo, 0); -- cgit