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: master - qdisk: Fix undead loop messages Date: Wed, 06 May 2009 13:24:00 -0000 [thread overview] Message-ID: <20090506132333.05DE4120285@lists.fedorahosted.org> (raw) Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=a538afc19def645fe787f75237c469363025d2d7 Commit: a538afc19def645fe787f75237c469363025d2d7 Parent: 4552bf6c408b35ca1f0c8fde164cd08b547c5ccc Author: Lon Hohberger <lhh@redhat.com> AuthorDate: Wed May 6 09:21:27 2009 -0400 Committer: Lon Hohberger <lhh@redhat.com> CommitterDate: Wed May 6 09:23:26 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 8e7e5b9..d1865cd 100644 --- a/cman/qdisk/main.c +++ b/cman/qdisk/main.c @@ -288,7 +288,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. @@ -323,12 +323,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)) { logt_print(LOG_CRIT, "Node %d is undead.\n", ni[x].ni_status.ps_nodeid); logt_print(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); @@ -363,6 +365,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)); @@ -385,6 +389,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) { + + logt_print(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-06 13:24 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=20090506132333.05DE4120285@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: linkBe 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).