From c16086beadb49db144f1a1af29e13a654c996e13 Mon Sep 17 00:00:00 2001 From: "Fabio M. Di Nitto" Date: Tue, 31 Jan 2012 09:48:24 +0100 Subject: [PATCH] votequorum: honor onwire node flags change internal flags were not propagated correctly in the node status Signed-off-by: Fabio M. Di Nitto Reviewed-by: Jan Friesse --- exec/votequorum.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/exec/votequorum.c b/exec/votequorum.c index a194d1e1..afef5cf9 100644 --- a/exec/votequorum.c +++ b/exec/votequorum.c @@ -1008,6 +1008,7 @@ static void message_handler_req_exec_votequorum_nodeinfo ( struct cluster_node *node; int old_votes; int old_expected; + uint16_t old_flags; nodestate_t old_state; int new_node = 0; int allow_downgrade = 0; @@ -1030,9 +1031,11 @@ static void message_handler_req_exec_votequorum_nodeinfo ( old_votes = node->votes; old_expected = node->expected_votes; old_state = node->state; + old_flags = node->flags; /* Update node state */ node->votes = req_exec_quorum_nodeinfo->votes; + node->flags = req_exec_quorum_nodeinfo->flags; node->state = NODESTATE_MEMBER; if ((!cluster_is_quorate) && @@ -1067,6 +1070,7 @@ static void message_handler_req_exec_votequorum_nodeinfo ( req_exec_quorum_nodeinfo->first_trans || old_votes != node->votes || old_expected != node->expected_votes || + old_flags != node->flags || old_state != node->state) { recalculate_quorum(allow_downgrade, 0); }