cluster: RHEL6 - qdiskd: Watch for other nodes leaving while waiting for master reelection

jruemker jruemker at fedoraproject.org
Thu Aug 27 20:09:24 UTC 2015


Gitweb:        http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=06116f1663094f0dfad88e9285ebd86d13f46248
Commit:        06116f1663094f0dfad88e9285ebd86d13f46248
Parent:        c8387c1f4ef9ec52cceb52e89f89bdf464df5d40
Author:        John Ruemker <jruemker at redhat.com>
AuthorDate:    Thu Aug 27 16:04:11 2015 -0400
Committer:     John Ruemker <jruemker at redhat.com>
CommitterDate: Thu Aug 27 16:04:11 2015 -0400

qdiskd: Watch for other nodes leaving while waiting for master reelection

With master_wins mode enabled, the master waits for reelection of
another node before the daemon will exit.  However if another node
happens to leave while the master is waiting, the master does not
recognize the transition of that member to not-running, and thus
continues waiting for it to take over as master, when it never will

Signed-off-by: John Ruemker <jruemker at redhat.com>
---
 cman/qdisk/main.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/cman/qdisk/main.c b/cman/qdisk/main.c
index c633442..f3c7307 100644
--- a/cman/qdisk/main.c
+++ b/cman/qdisk/main.c
@@ -1297,7 +1297,8 @@ quorum_reelect_master(qd_ctx *ctx, node_info_t *ni, int max)
 		read_node_blocks(ctx, ni, max);
 
 		for (x = 0; x < max; x++) {
-			if (ni[x].ni_state >= S_RUN) {
+			if (ni[x].ni_status.ps_nodeid != ctx->qc_my_id &&
+			    ni[x].ni_status.ps_state >= S_RUN) {
 				found = 1;
 			}
 		}


More information about the cluster-commits mailing list