diff options
Diffstat (limited to 'xlators/mgmt/glusterd')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-brick-ops.c | 9 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volgen.c | 16 |
2 files changed, 21 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c index c69d2ada238..4a39c6462fa 100644 --- a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c @@ -467,6 +467,11 @@ __glusterd_handle_add_brick (rpcsvc_request_t *req) } ret = dict_get_int32 (dict, "type", &type); + if (ret) { + gf_log (this->name, GF_LOG_ERROR, + "failed to get type from dictionary"); + goto out; + } goto brick_val; } @@ -547,9 +552,11 @@ brick_val: if (type != volinfo->type) { ret = dict_set_int32 (dict, "type", type); - if (ret) + if (ret) { gf_log (this->name, GF_LOG_ERROR, "failed to set the new type in dict"); + goto out; + } } ret = glusterd_op_begin_synctask (req, GD_OP_ADD_BRICK, dict); diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index a56d6d5ccca..58328b553a4 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -3397,12 +3397,22 @@ volume_volgen_graph_build_clusters_tier (volgen_graph_t *graph, hxl = first_of(graph); - volinfo->type = GF_CLUSTER_TYPE_TIER; + volinfo->type = GF_CLUSTER_TYPE_TIER; + xl = volgen_graph_add_nolink (graph, "cluster/tier", "%s", "tier-dht", 0); + if (!xl) + goto out; + gf_asprintf(&rule, "%s-hot-dht", st_volname); - xlator_set_option(xl, "rule", rule); - xlator_set_option(xl, "xattr-name", "trusted.tier-gfid"); + + ret = xlator_set_option(xl, "rule", rule); + if (ret) + goto out; + + ret = xlator_set_option(xl, "xattr-name", "trusted.tier-gfid"); + if (ret) + goto out; ret = volgen_xlator_link (xl, cxl); ret = volgen_xlator_link (xl, hxl); |