public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: RHEL4 - qdisk: Fix undead loop messages
@ 2009-05-13 15:41 Lon Hohberger
0 siblings, 0 replies; only message in thread
From: Lon Hohberger @ 2009-05-13 15:41 UTC (permalink / raw)
To: cluster-cvs-relay
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 ;)
*/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-05-13 15:41 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:41 cluster: RHEL4 - 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).