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

Function get_lowest_node_id

exec/votequorum.c:526–546  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

524}
525
526static void get_lowest_node_id(void)
527{
528 struct cluster_node *node = NULL;
529 struct qb_list_head *tmp;
530
531 ENTER();
532
533 lowest_node_id = us->node_id;
534
535 qb_list_for_each(tmp, &cluster_members_list) {
536 node = qb_list_entry(tmp, struct cluster_node, list);
537 if ((node->state == NODESTATE_MEMBER) &&
538 (node->node_id < lowest_node_id)) {
539 lowest_node_id = node->node_id;
540 }
541 }
542 log_printf(LOGSYS_LEVEL_DEBUG, "lowest node id: " CS_PRI_NODE_ID " us: " CS_PRI_NODE_ID, lowest_node_id, us->node_id);
543 icmap_set_uint32("runtime.votequorum.lowest_node_id", lowest_node_id);
544
545 LEAVE();
546}
547
548static void get_highest_node_id(void)
549{

Callers 1

are_we_quorateFunction · 0.85

Calls 1

icmap_set_uint32Function · 0.85

Tested by

no test coverage detected