votequorum: honor onwire node flags change

internal flags were not propagated correctly in the node status

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
This commit is contained in:
Fabio M. Di Nitto 2012-01-31 09:48:24 +01:00
parent 9fa83dabbe
commit c16086bead

View File

@ -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);
}