void post_cache_update(int instance) { xmlNode *no_op = NULL; crm_peer_seq = instance; crm_debug("Updated cache after membership event %d.", instance); g_hash_table_foreach(crm_peer_cache, reap_dead_nodes, NULL); set_bit(fsa_input_register, R_MEMBERSHIP); if (AM_I_DC) { populate_cib_nodes(node_update_quick | node_update_cluster | node_update_peer | node_update_expected, __FUNCTION__); } /* * If we lost nodes, we should re-check the election status * Safe to call outside of an election */ register_fsa_action(A_ELECTION_CHECK); /* Membership changed, remind everyone we're here. * This will aid detection of duplicate DCs */ no_op = create_request(CRM_OP_NOOP, NULL, NULL, CRM_SYSTEM_CRMD, AM_I_DC ? CRM_SYSTEM_DC : CRM_SYSTEM_CRMD, NULL); send_cluster_message(NULL, crm_msg_crmd, no_op, FALSE); free_xml(no_op); }
static void do_cib_replaced(const char *event, HA_Message *msg) { crm_debug("Updating the CIB after a replace"); populate_cib_nodes(fsa_cluster_conn, FALSE); do_update_cib_nodes(AM_I_DC, __FUNCTION__); if(AM_I_DC) { /* start the join process again so we get everyone's LRM status */ register_fsa_input(C_FSA_INTERNAL, I_ELECTION, NULL); } }
static void do_cib_replaced(const char *event, xmlNode *msg) { crm_debug("Updating the CIB after a replace: DC=%s", AM_I_DC?"true":"false"); if(AM_I_DC == FALSE) { return; } else if(fsa_state == S_FINALIZE_JOIN && is_set(fsa_input_register, R_CIB_ASKED)) { /* no need to restart the join - we asked for this replace op */ return; } /* start the join process again so we get everyone's LRM status */ populate_cib_nodes(FALSE); do_update_cib_nodes(TRUE, __FUNCTION__); register_fsa_input(C_FSA_INTERNAL, I_ELECTION, NULL); }