public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
From: Christine Caulfield <chrissie@fedoraproject.org>
To: cluster-cvs-relay@redhat.com
Subject: cluster: RHEL5 - cman: make cman_tool leave remove work even when no services are running.
Date: Tue, 28 Jul 2009 08:26:00 -0000	[thread overview]
Message-ID: <20090728082607.7B486120378@lists.fedorahosted.org> (raw)

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=9c41df00092d785b3ad9fcb094bd0461581d3d95
Commit:        9c41df00092d785b3ad9fcb094bd0461581d3d95
Parent:        470a0f93bc2071a1ef26177b854cd7279730c247
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:51:46 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, 7 insertions(+), 0 deletions(-)

diff --git a/cman/daemon/commands.c b/cman/daemon/commands.c
index 710449e..d400b25 100644
--- a/cman/daemon/commands.c
+++ b/cman/daemon/commands.c
@@ -947,6 +947,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) {
 		send_leave(CLUSTER_LEAVEFLAG_DOWN);
+		int leaveflags = CLUSTER_LEAVEFLAG_DOWN;
+
+		quit_threads = 1;
+		if (shutdown_flags & SHUTDOWN_REMOVE)
+			leaveflags |= CLUSTER_LEAVEFLAG_REMOVED;
+
+		send_leave(leaveflags);
 		return 0;
 	}
 	else {


                 reply	other threads:[~2009-07-28  8:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090728082607.7B486120378@lists.fedorahosted.org \
    --to=chrissie@fedoraproject.org \
    --cc=cluster-cvs-relay@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).