From 08041c321229bdfb2cbe1b638fb4fabb0b9da013 Mon Sep 17 00:00:00 2001 From: Kaushal M Date: Mon, 12 Sep 2011 15:14:26 +0530 Subject: protocol/client : prevent client from reconnecting when server authentication fails This prevents the client from trying to reconnect on server authentication failure. Reconnecting on authentcation failure causes hung mounts on unauthorised clients. This patch fixes this problem. Also, mount.glusterfs script unmounts mount-point on mount failure to prevent hung mounts. Change-Id: I5615074d27948077bad491a38cecae1b7f5159fb BUG: 765240 Signed-off-by: Kaushal M Reviewed-on: http://review.gluster.com/398 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi --- libglusterfs/src/defaults.c | 3 ++- libglusterfs/src/globals.c | 1 + libglusterfs/src/glusterfs.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) (limited to 'libglusterfs') diff --git a/libglusterfs/src/defaults.c b/libglusterfs/src/defaults.c index df208c8805a..be2c9c55f4c 100644 --- a/libglusterfs/src/defaults.c +++ b/libglusterfs/src/defaults.c @@ -1248,9 +1248,10 @@ default_notify (xlator_t *this, int32_t event, void *data, ...) case GF_EVENT_CHILD_MODIFIED: case GF_EVENT_CHILD_DOWN: case GF_EVENT_CHILD_UP: + case GF_EVENT_AUTH_FAILED: { xlator_list_t *parent = this->parents; - /* Handle case of CHILD_* event specially, send it to fuse */ + /* Handle case of CHILD_* & AUTH_FAILED event specially, send it to fuse */ if (!parent && this->ctx && this->ctx->master) xlator_notify (this->ctx->master, event, this->graph, NULL); diff --git a/libglusterfs/src/globals.c b/libglusterfs/src/globals.c index 8b641123f15..9355a3a4672 100644 --- a/libglusterfs/src/globals.c +++ b/libglusterfs/src/globals.c @@ -396,6 +396,7 @@ char eventstring[GF_EVENT_MAXVAL+1][64] = { "New Volfile", "Translator Info", "Trigger Volume Heal", + "Authentication Failed", "Invalid event", }; diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h index 0642973cbad..680f0de98f2 100644 --- a/libglusterfs/src/glusterfs.h +++ b/libglusterfs/src/glusterfs.h @@ -379,6 +379,7 @@ typedef enum { GF_EVENT_GRAPH_NEW, GF_EVENT_TRANSLATOR_INFO, GF_EVENT_TRIGGER_HEAL, + GF_EVENT_AUTH_FAILED, GF_EVENT_MAXVAL, } glusterfs_event_t; -- cgit