MCPcopy Create free account
hub / github.com/corosync/corosync / get_highest_node_id

Function get_highest_node_id

exec/votequorum.c:548–568  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

546}
547
548static void get_highest_node_id(void)
549{
550 struct cluster_node *node = NULL;
551 struct qb_list_head *tmp;
552
553 ENTER();
554
555 highest_node_id = us->node_id;
556
557 qb_list_for_each(tmp, &cluster_members_list) {
558 node = qb_list_entry(tmp, struct cluster_node, list);
559 if ((node->state == NODESTATE_MEMBER) &&
560 (node->node_id > highest_node_id)) {
561 highest_node_id = node->node_id;
562 }
563 }
564 log_printf(LOGSYS_LEVEL_DEBUG, "highest node id: " CS_PRI_NODE_ID " us: " CS_PRI_NODE_ID, highest_node_id, us->node_id);
565 icmap_set_uint32("runtime.votequorum.highest_node_id", highest_node_id);
566
567 LEAVE();
568}
569
570static int check_low_node_id_partition(void)
571{

Callers 1

are_we_quorateFunction · 0.85

Calls 1

icmap_set_uint32Function · 0.85

Tested by

no test coverage detected