summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-volgen.c
diff options
context:
space:
mode:
authorPoornima G <pgurusid@redhat.com>2018-01-26 15:34:43 +0530
committerAmar Tumballi <amarts@redhat.com>2018-01-30 05:00:52 +0000
commitd25b6065469eb978d40450b5aebcf5711fb50205 (patch)
treeae8cbb6dff9b7f1a0887b05adc57fa6ec96fa5e7 /xlators/mgmt/glusterd/src/glusterd-volgen.c
parent9bbee1c2bc91d194d7470dfe2351b7d8c7abe102 (diff)
quiesce, gfproxy: Implement failover across multiple gfproxy nodes
Updates: #242 Change-Id: I767e574a26e922760a7130bd209c178d74e8cf69 Signed-off-by: Poornima G <pgurusid@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-volgen.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index 235a4bd..3156475 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -4404,6 +4404,7 @@ client_graph_builder (volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
char *subvol = NULL;
size_t namelen = 0;
char *xl_id = NULL;
+ gf_boolean_t gfproxy_clnt = _gf_false;
GF_ASSERT (this);
GF_ASSERT (conf);
@@ -4429,6 +4430,7 @@ client_graph_builder (volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
if (ret == -1)
goto out;
} else {
+ gfproxy_clnt = _gf_true;
namelen = strlen (volinfo->volname) + strlen ("gfproxyd-") + 1;
subvol = alloca (namelen);
snprintf (subvol, namelen, "gfproxyd-%s", volinfo->volname);
@@ -4501,6 +4503,15 @@ client_graph_builder (volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
}
}
+ /* gfproxy needs the quiesce translator */
+ if (gfproxy_clnt) {
+ xl = volgen_graph_add (graph, "features/quiesce", volname);
+ if (!xl) {
+ ret = -1;
+ goto out;
+ }
+ }
+
if (conf->op_version == GD_OP_VERSION_MIN) {
ret = glusterd_volinfo_get_boolean (volinfo,
VKEY_FEATURES_QUOTA);