/* CRM_OP_JOIN_OFFERメッセージをcrm_peer_cacheキャッシュに認識されているクラスターメンバーのcrmdプロセスに送信する */
void
do_dc_join_offer_all(long long action,
		     enum crmd_fsa_cause cause,
		     enum crmd_fsa_state cur_state,
		     enum crmd_fsa_input current_input,
		     fsa_data_t *msg_data)
{
	/* reset everyones status back to down or in_ccm in the CIB
	 *
	 * any nodes that are active in the CIB but not in the CCM list
	 *   will be seen as offline by the PE anyway
	 */
	current_join_id++;
	initialize_join(TRUE);
/* 	do_update_cib_nodes(TRUE, __FUNCTION__); */

	/* 現在のDCをクリア */
	update_dc(NULL);
	if(cause == C_HA_MESSAGE && current_input == I_NODE_JOIN) {
	    crm_info("A new node joined the cluster");
	}
	
	/* rm_peer_cacheキャッシュに認識されているクラスターメンバーのcrmdプロセス */
	/* にCRM_OP_JOIN_OFFERメッセージを送信する */
	g_hash_table_foreach(crm_peer_cache, join_make_offer, NULL);
	
	/* dont waste time by invoking the PE yet; */
	/* CRM_OP_JOIN_OFFERメッセージを送信後、welcomed_nodesハッシュテーブルのメンバー数をログで出力 */
	crm_info("join-%d: Waiting on %d outstanding join acks",
		 current_join_id, g_hash_table_size(welcomed_nodes));
}
Example #2
0
/*	 A_DC_JOIN_OFFER_ALL	*/
void
do_dc_join_offer_all(long long action,
                     enum crmd_fsa_cause cause,
                     enum crmd_fsa_state cur_state,
                     enum crmd_fsa_input current_input, fsa_data_t * msg_data)
{
    /* reset everyone's status back to down or in_ccm in the CIB
     *
     * any nodes that are active in the CIB but not in the CCM list
     *   will be seen as offline by the PE anyway
     */
    current_join_id++;
    initialize_join(TRUE);
/* 	do_update_cib_nodes(TRUE, __FUNCTION__); */

    update_dc(NULL);
    if (cause == C_HA_MESSAGE && current_input == I_NODE_JOIN) {
        crm_info("A new node joined the cluster");
    }
    g_hash_table_foreach(crm_peer_cache, join_make_offer, NULL);

    /* don't waste time by invoking the PE yet; */
    crm_info("join-%d: Waiting on %d outstanding join acks",
             current_join_id, crmd_join_phase_count(crm_join_welcomed));
}