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

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=88bea81933b3dfbe0b9dfe53db6003d9f4a11f70
Commit:        88bea81933b3dfbe0b9dfe53db6003d9f4a11f70
Parent:        59855af76c7022af96b8f89e8d3057768942936b
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:52:26 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 94e835e..34af7de 100644
--- a/cman/daemon/commands.c
+++ b/cman/daemon/commands.c
@@ -1004,7 +1004,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;
@@ -1015,6 +1015,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:54 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:54 cluster: master - 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).