diff options
author | hari gowtham <hgowtham@redhat.com> | 2015-11-24 10:31:35 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2015-12-02 02:25:37 -0800 |
commit | 905b3d26a794510892f6a9b51139bc9cfd947c02 (patch) | |
tree | f297022e8348371db4a0a9f3f8b7b369faf66a04 /xlators | |
parent | 189a2302822f20ec9741002ebc9b18ea80c2837f (diff) |
glusterd:Removing error message in glusterd log during upgrade
when one of the gluster node is upgraded to 3.7 from a lower
version and a mixed cluster is formed, tier related error
messages are displayed in the glusterd log which are removed
Change-Id: I8d0fc43ce049990a6a52306317ea1298a0a91390
BUG: 1282461
Signed-off-by: hari gowtham <hgowtham@redhat.com>
Reviewed-on: http://review.gluster.org/12587
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 49 |
1 files changed, 38 insertions, 11 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index b068d40ff1a..461a6047dff 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -8105,6 +8105,8 @@ glusterd_volume_status_copy_to_op_ctx_dict (dict_t *aggr, dict_t *rsp_dict) dict_t *ctx_dict = NULL; char key[PATH_MAX] = {0,}; char *volname = NULL; + glusterd_volinfo_t *volinfo = NULL; + GF_ASSERT (rsp_dict); @@ -8197,27 +8199,52 @@ glusterd_volume_status_copy_to_op_ctx_dict (dict_t *aggr, dict_t *rsp_dict) goto out; } - ret = dict_get_int32 (rsp_dict, "hot_brick_count", &hot_brick_count); + ret = dict_get_str (ctx_dict, "volname", &volname); if (ret) { - gf_msg (THIS->name, GF_LOG_ERROR, errno, - GD_MSG_DICT_GET_FAILED, - "Failed to get hot brick count from rsp_dict"); + gf_msg (THIS->name, GF_LOG_ERROR, 0, + GD_MSG_DICT_SET_FAILED, + "Failed to get volname"); goto out; } - ret = dict_set_int32 (ctx_dict, "hot_brick_count", hot_brick_count); + ret = glusterd_volinfo_find (volname, &volinfo); if (ret) { - gf_msg (THIS->name, GF_LOG_ERROR, errno, - GD_MSG_DICT_SET_FAILED, - "Failed to update hot_brick_count"); + gf_msg (THIS->name, GF_LOG_ERROR, 0, + GD_MSG_VOLINFO_GET_FAIL, + "Failed to get volinfo for volume: %s", + volname); goto out; } - ret = dict_get_int32 (rsp_dict, "type", &type); + + if (volinfo->type == GF_CLUSTER_TYPE_TIER) { + ret = dict_get_int32 (rsp_dict, "hot_brick_count", + &hot_brick_count); + if (ret) { + gf_msg (THIS->name, GF_LOG_ERROR, errno, + GD_MSG_DICT_GET_FAILED, + "Failed to get hot brick count from rsp_dict"); + goto out; + } + + + ret = dict_get_int32 (rsp_dict, "type", &type); + if (ret) { + gf_msg (THIS->name, GF_LOG_ERROR, errno, + GD_MSG_DICT_GET_FAILED, + "Failed to get type from rsp_dict"); + goto out; + } + + + } + + ret = dict_set_int32 (ctx_dict, "hot_brick_count", + hot_brick_count); if (ret) { gf_msg (THIS->name, GF_LOG_ERROR, errno, - GD_MSG_DICT_GET_FAILED, - "Failed to get type from rsp_dict"); + GD_MSG_DICT_SET_FAILED, + "Failed to update hot_brick_count"); goto out; } |