public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: STABLE3 - cman: make cman_tool leave remove work even when no services are running.
@ 2009-07-28  7:48 Christine Caulfield
  0 siblings, 0 replies; only message in thread
From: Christine Caulfield @ 2009-07-28  7:48 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=cacde1952b0bd5f913185527349f6c9ad4d2400b
Commit:        cacde1952b0bd5f913185527349f6c9ad4d2400b
Parent:        5d55508f14db4363cd78759e6988a915fed1a417
Author:        Christine Caulfield <ccaulfie@redhat.com>
AuthorDate:    Tue Jul 28 08:46:36 2009 +0100
Committer:     Christine Caulfield <ccaulfie@redhat.com>
CommitterDate: Tue Jul 28 08:46:36 2009 +0100

cman: make cman_tool leave remove work even when no services are running.

cman_tool leave takes a shortcut internally if no services are listening
for shutdown events. Unfortunately, a bug in this shortcut means that the
leave flags gets lost, so quorum is not adjusted downwards.

This patch fixes that shortcut. I should make it clear that 'leave remove'
works fine if any cluster services are running.

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

diff --git a/cman/daemon/commands.c b/cman/daemon/commands.c
index 3607864..23ea810 100644
--- a/cman/daemon/commands.c
+++ b/cman/daemon/commands.c
@@ -1070,8 +1070,13 @@ 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) {
+		int leaveflags = CLUSTER_LEAVEFLAG_DOWN;
+
 		quit_threads = 1;
-		send_leave(CLUSTER_LEAVEFLAG_DOWN);
+		if (shutdown_flags & SHUTDOWN_REMOVE)
+			leaveflags |= CLUSTER_LEAVEFLAG_REMOVED;
+
+		send_leave(leaveflags);
 		return 0;
 	}
 	else {


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

only message in thread, other threads:[~2009-07-28  7:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-28  7:48 cluster: STABLE3 - cman: make cman_tool leave remove work even when no services are running 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).