public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
From: Lon Hohberger <lon@fedoraproject.org>
To: cluster-cvs-relay@redhat.com
Subject: cluster: RHEL4 - qdisk: Fix undead loop messages
Date: Wed, 13 May 2009 15:41:00 -0000	[thread overview]
Message-ID: <20090513152923.559491201D4@lists.fedorahosted.org> (raw)

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=7e42a3de483b24db070d28357325c27aecf6c21f
Commit:        7e42a3de483b24db070d28357325c27aecf6c21f
Parent:        779a71b145323ad97e5b73a58178e20a357b5a11
Author:        Lon Hohberger <lhh@redhat.com>
AuthorDate:    Wed May 6 09:21:27 2009 -0400
Committer:     Lon Hohberger <lhh@redhat.com>
CommitterDate: Wed May 13 11:29:17 2009 -0400

qdisk: Fix undead loop messages

Signed-off-by: Lon Hohberger <lhh@redhat.com>
---
 cman/qdisk/main.c |   27 ++++++++++++++++++++++++---
 1 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/cman/qdisk/main.c b/cman/qdisk/main.c
index 538bc88..2cc2530 100644
--- a/cman/qdisk/main.c
+++ b/cman/qdisk/main.c
@@ -268,7 +268,7 @@ check_transitions(qd_ctx *ctx, node_info_t *ni, int max, memb_mask_t mask)
 			ni[x].ni_state = S_EVICT;
 			ni[x].ni_status.ps_state = S_EVICT;
 			ni[x].ni_evil_incarnation = 
-				ni[x].ni_status.ps_incarnation;
+				ni[x].ni_incarnation;
 			
 			/*
 			   Write eviction notice if we're the master.
@@ -303,12 +303,14 @@ check_transitions(qd_ctx *ctx, node_info_t *ni, int max, memb_mask_t mask)
 		 */
 		if (ni[x].ni_evil_incarnation &&
                     (ni[x].ni_evil_incarnation == 
-		     ni[x].ni_status.ps_incarnation)) {
+ 		     ni[x].ni_status.ps_incarnation) &&
+ 		    (ni[x].ni_status.ps_updatenode ==
+ 		     ni[x].ni_status.ps_nodeid)) {
 			clulog(LOG_CRIT, "Node %d is undead.\n",
 			       ni[x].ni_status.ps_nodeid);
 
 			clulog(LOG_ALERT,
-			       "Writing eviction notice for node %d\n",
+			       "Writing eviction notice (again) for node %d\n",
 			       ni[x].ni_status.ps_nodeid);
 			qd_write_status(ctx, ni[x].ni_status.ps_nodeid,
 					S_EVICT, NULL, NULL, NULL);
@@ -343,6 +345,8 @@ check_transitions(qd_ctx *ctx, node_info_t *ni, int max, memb_mask_t mask)
 			       ni[x].ni_status.ps_nodeid);
 			ni[x].ni_incarnation =
 			    ni[x].ni_status.ps_incarnation;
+			ni[x].ni_evil_incarnation = 0;
+
 			if (mask)
 				set_bit(mask, (ni[x].ni_status.ps_nodeid-1),
 					sizeof(memb_mask_t));
@@ -365,6 +369,23 @@ check_transitions(qd_ctx *ctx, node_info_t *ni, int max, memb_mask_t mask)
 			continue;
 		}
 
+  		/*
+ 		   Case 6:  Check for a node which has changed its
+ 		   incarnation # quickly (e.g. killall -9 qdiskd;
+ 		   qdiskd).  Not a transition.
+ 		 */
+ 		if (state_run(ni[x].ni_state) &&
+ 		    ni[x].ni_incarnation != ni[x].ni_status.ps_incarnation) {
+ 
+ 			clulog(LOG_DEBUG, "Node %d incarnation # changed\n",
+ 			       ni[x].ni_status.ps_nodeid);
+ 			ni[x].ni_incarnation =
+ 			    ni[x].ni_status.ps_incarnation;
+ 			ni[x].ni_evil_incarnation = 0;
+ 
+ 			continue;
+ 		}
+ 
 		/*
 		   All other cases: Believe the node's reported state ;)
 		 */


                 reply	other threads:[~2009-05-13 15:41 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=20090513152923.559491201D4@lists.fedorahosted.org \
    --to=lon@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).