public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: RHEL5 - qdisk: Fix undead loop messages
@ 2009-05-13 15:14 Lon Hohberger
  0 siblings, 0 replies; only message in thread
From: Lon Hohberger @ 2009-05-13 15:14 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=09d38d16f6f6422a23c3fd29347fa1dbf8f18fe6
Commit:        09d38d16f6f6422a23c3fd29347fa1dbf8f18fe6
Parent:        83a61282601bff7dd26e8bcf4ebd4b1f38d6e25c
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:13:56 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 090c71e..81999a0 100644
--- a/cman/qdisk/main.c
+++ b/cman/qdisk/main.c
@@ -272,7 +272,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.
@@ -307,12 +307,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);
@@ -347,6 +349,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));
@@ -369,6 +373,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 ;)
 		 */


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

only message in thread, other threads:[~2009-05-13 15:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-13 15:14 cluster: RHEL5 - qdisk: Fix undead loop messages Lon Hohberger

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).