path: root/xlators/mgmt/glusterd/src/glusterd-volgen.c
diff options
authorPrashanth Pai <>2018-10-27 16:32:05 +0530
committerAmar Tumballi <>2018-11-12 04:09:51 +0000
commit54a5f0a07817098134219aea9414b029013927f3 (patch)
tree80134ca2cbf9eb16ff41f13c2dac9e7a07da088f /xlators/mgmt/glusterd/src/glusterd-volgen.c
parent28b4096fe484f545ae578dcef040a69acf6205cd (diff)
glusterfsd: Make each multiplexed brick sign in
NOTE: This change will be consumed by brick mux implementation of glusterd2 only. No corresponsing change in glusterd1 has been made. When a multiplexed brick process is shutting down, it sends sign out requests to glusterd for all bricks that it contains. However, sign in request is only sent for a single brick. Consequently, glusterd has to use some tricky means to repopulate pmap registry with information of multiplexed bricks during glusterd restart. This change makes each multiplexed brick send a sign in request to glusterd2 which ensures that glusterd2 can easily repopulate pmap registry with port information. As a bonus, sign in request will now also contain PID of the brick sending the request so that glusterd2 can rely on this instead of having to read/manage brick pidfiles. Change-Id: I409501515bd9a28ee7a960faca080e97cabe5858 updates: bz#1193929 Signed-off-by: Prashanth Pai <>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-volgen.c')
1 files changed, 11 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index 4129147..9a6623c 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -4478,8 +4478,18 @@ client_graph_builder(volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
+ /* if the client is part of 'gfproxyd' server, then we need to keep the
+ volume name as 'gfproxyd-<volname>', for better portmapper options */
+ subvol = volname;
+ ret = dict_get_str_boolean(set_dict, "gfproxy-server", 0);
+ if (ret > 0) {
+ namelen = strlen(volinfo->volname) + SLEN("gfproxyd-") + 1;
+ subvol = alloca(namelen);
+ snprintf(subvol, namelen, "gfproxyd-%s", volname);
+ }
ret = -1;
- xl = volgen_graph_add_as(graph, "debug/io-stats", volname);
+ xl = volgen_graph_add_as(graph, "debug/io-stats", subvol);
if (!xl)
goto out;