public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: STABLE2 - cman: Return an error if 'cman_tool leave' is attempted during shutdown
@ 2009-01-02 12:56 Christine Caulfield
  0 siblings, 0 replies; only message in thread
From: Christine Caulfield @ 2009-01-02 12:56 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=7c75c1d88c4b4aef4475df26c49637ca9ec026c5
Commit:        7c75c1d88c4b4aef4475df26c49637ca9ec026c5
Parent:        da8be36733c9947828f9a6ff05a65fef0e1af1a0
Author:        Christine Caulfield <ccaulfie@redhat.com>
AuthorDate:    Fri Jan 2 12:52:26 2009 +0000
Committer:     Christine Caulfield <ccaulfie@redhat.com>
CommitterDate: Fri Jan 2 12:54:57 2009 +0000

cman: Return an error if 'cman_tool leave' is attempted during shutdown

There were some occasions when 'cman_tool leave' simply returned success
even though shutdown had already started. This fixes those.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
---
 cman/daemon/commands.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/cman/daemon/commands.c b/cman/daemon/commands.c
index 8146956..e40c087 100644
--- a/cman/daemon/commands.c
+++ b/cman/daemon/commands.c
@@ -922,7 +922,7 @@ static int do_cmd_try_shutdown(struct connection *con, char *cmdbuf)
 	int flags = *(int *)cmdbuf;
 
 	/* Are we already in shutdown ? */
-	if (shutdown_con)
+	if (shutdown_con || quit_threads)
 		return -EALREADY;
 
 	shutdown_con = con;
@@ -933,6 +933,7 @@ static int do_cmd_try_shutdown(struct connection *con, char *cmdbuf)
 
 	/* If no-one is listening for events then we can just go down now */
 	if (shutdown_expected == 0) {
+		quit_threads = 1;
 		send_leave(CLUSTER_LEAVEFLAG_DOWN);
 		return 0;
 	}


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-01-02 12:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-02 12:56 cluster: STABLE2 - cman: Return an error if 'cman_tool leave' is attempted during shutdown Christine Caulfield

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).