summaryrefslogtreecommitdiffstats
path: root/glusterfsd/src
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-01-17 10:51:17 +0000
committerAnand V. Avati <avati@dev.gluster.com>2011-01-27 12:17:49 -0800
commit89f556574552abe80d9afe155eb366634375846c (patch)
treecb62ac95ba9c2a08f0b3f81ecf945b1439918915 /glusterfsd/src
parent0e651882a9aadcb35ea764ea65c05c3661175e00 (diff)
glusterfsd-mgmt: handle the RPC_DISCONNECT event properly
This patch solves the issue of hanging mount point in case of wrong server name is given during mount command Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1453 (mount command didn't give error message) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1453
Diffstat (limited to 'glusterfsd/src')
-rw-r--r--glusterfsd/src/glusterfsd-mgmt.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c
index be8b77f4f..bcfd966bf 100644
--- a/glusterfsd/src/glusterfsd-mgmt.c
+++ b/glusterfsd/src/glusterfsd-mgmt.c
@@ -443,6 +443,14 @@ mgmt_rpc_notify (struct rpc_clnt *rpc, void *mydata, rpc_clnt_event_t event,
ctx = this->ctx;
switch (event) {
+ case RPC_CLNT_DISCONNECT:
+ if (!ctx->active) {
+ gf_log ("glusterfsd-mgmt", GF_LOG_ERROR,
+ "failed to connect with remote-host: %s",
+ strerror (errno));
+ cleanup_and_exit (1);
+ }
+ break;
case RPC_CLNT_CONNECT:
rpc_clnt_set_connected (&((struct rpc_clnt*)ctx->mgmt)->conn);