diff options
Diffstat (limited to 'xlators/protocol/client')
-rw-r--r-- | xlators/protocol/client/src/client-handshake.c | 1 | ||||
-rw-r--r-- | xlators/protocol/client/src/client.c | 16 | ||||
-rw-r--r-- | xlators/protocol/client/src/client.h | 4 |
3 files changed, 18 insertions, 3 deletions
diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c index ff0e162c644..adf53f15ea8 100644 --- a/xlators/protocol/client/src/client-handshake.c +++ b/xlators/protocol/client/src/client-handshake.c @@ -1744,6 +1744,7 @@ client_query_portmap_cbk (struct rpc_req *req, struct iovec *iov, int count, voi } conf->portmap_err_logged = 0; + conf->disconnect_err_logged = 0; config.remote_port = rsp.port; rpc_clnt_reconfig (conf->rpc, &config); diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c index 3b5ecb0aa9e..e24282e285e 100644 --- a/xlators/protocol/client/src/client.c +++ b/xlators/protocol/client/src/client.c @@ -2092,9 +2092,19 @@ client_rpc_notify (struct rpc_clnt *rpc, void *mydata, rpc_clnt_event_t event, client_register_grace_timer (this, conf); if (!conf->skip_notify) { - if (conf->connected) - gf_log (this->name, GF_LOG_INFO, - "disconnected"); + if (conf->connected) { + gf_log (this->name, + ((!conf->disconnect_err_logged) + ? GF_LOG_INFO : GF_LOG_DEBUG), + "disconnected from %s. Client process " + "will keep trying to connect to " + "glusterd until brick's port is " + "available", + conf->rpc->conn.trans->peerinfo.identifier); + + if (conf->portmap_err_logged) + conf->disconnect_err_logged = 1; + } /* If the CHILD_DOWN event goes to parent xlator multiple times, the logic of parent xlator notify diff --git a/xlators/protocol/client/src/client.h b/xlators/protocol/client/src/client.h index 0a27c095c88..37ba264ce38 100644 --- a/xlators/protocol/client/src/client.h +++ b/xlators/protocol/client/src/client.h @@ -93,6 +93,10 @@ typedef struct clnt_conf { which was sent earlier */ char portmap_err_logged; /* flag used to prevent excessive logging */ + char disconnect_err_logged; /* flag used to prevent + excessive disconnect + logging */ + char need_different_port; /* flag used to change the portmap path in case of 'tcp,rdma' on server */ |