diff options
author | Raghavan P <rpichai@redhat.com> | 2014-01-03 16:09:04 +0530 |
---|---|---|
committer | Raghavan P <rpichai@redhat.com> | 2014-01-08 14:48:21 +0530 |
commit | e0cce4cf7c22d5cd8ab6c2aff4ecf28c18c6a469 (patch) | |
tree | 5e30d20eaf43c77f77d5aa9d4351492af659b39f /xlators/mgmt/glusterd/src/glusterd-volgen.c | |
parent | 82ce8acfdfb141c6b34b6b6b43ef78eee891f9e8 (diff) |
Changes to NSR reconciliation code.
Following is list of changes:
1) Simulation of etcd using a file as a registry protected using locks.
2) Implement notifications for child up and child down.
3) Join a new brick into quorum.
4) add support for proper fencing and draining of IO required for reconciliaiton
5) misc changes and addressed review comments.
Change-Id: Iddd1137ad6205252ed03301888bb1e83fa2221e0
Signed-off-by: Raghavan P <rpichai@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-volgen.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volgen.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index 59bc7bcd5..fe33c8d7d 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -1468,6 +1468,11 @@ add_nsr_stuff (volgen_graph_t *graph, char *volname, char c_d[NSR_MAX_PATH_SIZE]; char *username = NULL, *password = NULL; gf_boolean_t enable_recon = _gf_false; +#ifdef HAVE_ETCD + uint32_t nsr_port = 27000; +#else + static uint32_t nsr_port = 27000; +#endif if (glusterd_volinfo_get_boolean(volinfo,"cluster.nsr.recon") > 0) { @@ -1623,7 +1628,7 @@ add_nsr_stuff (volgen_graph_t *graph, char *volname, get_vol_transport_type (volinfo, transt); if(xlator_set_option (xl, "transport-type", transt) == -1) return -1; - sprintf(s,"%d",27000); + sprintf(s,"%d",nsr_port); if(xlator_set_option (xl, "transport.socket.listen-port", s) == -1) return -1; strcpy(auth, "auth.addr."); @@ -1655,7 +1660,7 @@ add_nsr_stuff (volgen_graph_t *graph, char *volname, return -1; if(xlator_set_option (kid, "transport-type", transt) == -1) return -1; - sprintf(s,"%d",27000); + sprintf(s,"%d",nsr_port++); if(xlator_set_option (kid, "remote-port", s) == -1) return -1; snprintf (c_d, PATH_MAX, |