From a492b22f5710f01ad3a18aad743d2b1eee058f6f Mon Sep 17 00:00:00 2001 From: Mohammed Rafi KC Date: Mon, 27 Apr 2015 17:18:36 +0530 Subject: glusterd/tiering : cksum mismatch for tiered volume Back port of http://review.gluster.org/#/c/10406 Once we updated the volinfo from orginator node, the hot type was overwritten with volume type. Then the same dictionary was sent to peer node to perform the commit of attach-tier, that will cause hot type to replace with volume type, eventually end up in cksum mismatch Change-Id: I402dceb4d672d0b3a7b91a92f52c1057050dbedc BUG: 1219845 Signed-off-by: Mohammed Rafi KC Reviewed-on: http://review.gluster.org/10677 Reviewed-by: Niels de Vos Tested-by: NetBSD Build System Tested-by: Gluster Build System --- cli/src/cli-cmd-volume.c | 2 +- xlators/mgmt/glusterd/src/glusterd-brick-ops.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c index a6df78ff188..4cb82a70719 100644 --- a/cli/src/cli-cmd-volume.c +++ b/cli/src/cli-cmd-volume.c @@ -939,7 +939,7 @@ cli_cmd_volume_attach_tier_cbk (struct cli_state *state, if (ret) goto out; - ret = dict_set_int32 (options, "type", type); + ret = dict_set_int32 (options, "hot-type", type); if (ret) goto out; diff --git a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c index 019766c5d83..13d0753704c 100644 --- a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c @@ -501,7 +501,7 @@ __glusterd_handle_add_brick (rpcsvc_request_t *req) goto out; } - ret = dict_get_int32 (dict, "type", &type); + ret = dict_get_int32 (dict, "hot-type", &type); if (ret) { gf_log (this->name, GF_LOG_ERROR, "failed to get type from dictionary"); @@ -1890,7 +1890,7 @@ glusterd_op_perform_attach_tier (dict_t *dict, else volinfo->tier_info.hot_replica_count = 1; volinfo->tier_info.hot_brick_count = count; - ret = dict_get_int32 (dict, "type", &type); + ret = dict_get_int32 (dict, "hot-type", &type); volinfo->tier_info.hot_type = type; ret = dict_set_int32 (dict, "type", GF_CLUSTER_TYPE_TIER); -- cgit