summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.c6
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.h1
3 files changed, 9 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index c840803fbf0..0a43fd69ae5 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -4260,6 +4260,7 @@ __glusterd_peer_rpc_notify (struct rpc_clnt *rpc, void *mydata,
switch (event) {
case RPC_CLNT_CONNECT:
{
+ rpc_clnt_set_connected (&rpc->conn);
gf_log (this->name, GF_LOG_DEBUG, "got RPC_CLNT_CONNECT");
peerinfo->connected = 1;
peerinfo->quorum_action = _gf_true;
@@ -4272,6 +4273,7 @@ __glusterd_peer_rpc_notify (struct rpc_clnt *rpc, void *mydata,
case RPC_CLNT_DISCONNECT:
{
+ rpc_clnt_unset_connected (&rpc->conn);
gf_log (this->name, GF_LOG_DEBUG, "got RPC_CLNT_DISCONNECT %d",
peerinfo->state.state);
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c
index 1a6aa81d30c..691d410cd44 100644
--- a/xlators/mgmt/glusterd/src/glusterd.c
+++ b/xlators/mgmt/glusterd/src/glusterd.c
@@ -1648,5 +1648,11 @@ struct volume_options options[] = {
.type = GF_OPTION_TYPE_STR,
.description = "directory where the bricks for the snapshots will be created"
},
+ { .key = {"ping-timeout"},
+ .type = GF_OPTION_TYPE_INT,
+ .min = 1,
+ .max = 100,
+ .default_value = "30",
+ },
{ .key = {NULL} },
};
diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h
index 9e3eb417929..cbcaecd919d 100644
--- a/xlators/mgmt/glusterd/src/glusterd.h
+++ b/xlators/mgmt/glusterd/src/glusterd.h
@@ -179,6 +179,7 @@ typedef struct {
char *snap_bricks_directory;
gf_store_handle_t *missed_snaps_list_shandle;
struct list_head missed_snaps_list;
+ int ping_timeout;
} glusterd_conf_t;