From d837b4518c3148752b2eb4d55d22f22c57aa96c2 Mon Sep 17 00:00:00 2001 From: Anuradha Talur Date: Mon, 19 Nov 2018 17:57:18 -0800 Subject: mgmt/glusterd: Make changes related to cloudsync xlator 1) The placement of cloudsync xlator has been changed to make it shard xlator's child. If cloudsync has to work with shard in the graph, it needs to be child of shard. Change-Id: Ib55424fdcb7ce8edae9f19b8a6e3d3ba86c1f0c4 fixes: bz#1642168 Signed-off-by: Anuradha Talur --- xlators/mgmt/glusterd/src/glusterd-volgen.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-volgen.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index 5e3af387bae..75411f9d24a 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -4289,6 +4289,18 @@ client_graph_builder(volgen_graph_t *graph, glusterd_volinfo_t *volinfo, "tcp", set_dict); } + ret = dict_get_str_boolean(set_dict, "features.cloudsync", _gf_false); + if (ret == -1) + goto out; + + if (ret) { + xl = volgen_graph_add(graph, "features/cloudsync", volname); + if (!xl) { + ret = -1; + goto out; + } + } + ret = dict_get_str_boolean(set_dict, "features.shard", _gf_false); if (ret == -1) goto out; @@ -4490,18 +4502,6 @@ client_graph_builder(volgen_graph_t *graph, glusterd_volinfo_t *volinfo, if (ret) return -1; - ret = dict_get_str_boolean(set_dict, "features.cloudsync", _gf_false); - if (ret == -1) - goto out; - - if (ret) { - xl = volgen_graph_add(graph, "features/cloudsync", volname); - if (!xl) { - ret = -1; - goto out; - } - } - /* if the client is part of 'gfproxyd' server, then we need to keep the volume name as 'gfproxyd-', for better portmapper options */ subvol = volname; -- cgit