lrm_state 84 crmd/crmd_lrm.h lrm_state_is_local(lrm_state_t *lrm_state); lrm_state 91 crmd/crmd_lrm.h void lrm_state_reset_tables(lrm_state_t * lrm_state, gboolean reset_metadata); lrm_state 131 crmd/crmd_lrm.h void lrm_state_disconnect_only(lrm_state_t * lrm_state); lrm_state 132 crmd/crmd_lrm.h void lrm_state_disconnect(lrm_state_t * lrm_state); lrm_state 133 crmd/crmd_lrm.h int lrm_state_ipc_connect(lrm_state_t * lrm_state); lrm_state 134 crmd/crmd_lrm.h int lrm_state_remote_connect_async(lrm_state_t * lrm_state, const char *server, int port, lrm_state 136 crmd/crmd_lrm.h int lrm_state_is_connected(lrm_state_t * lrm_state); lrm_state 137 crmd/crmd_lrm.h int lrm_state_poke_connection(lrm_state_t * lrm_state); lrm_state 139 crmd/crmd_lrm.h int lrm_state_get_metadata(lrm_state_t * lrm_state, lrm_state 143 crmd/crmd_lrm.h int lrm_state_cancel(lrm_state_t * lrm_state, const char *rsc_id, const char *action, int interval); lrm_state 144 crmd/crmd_lrm.h int lrm_state_exec(lrm_state_t * lrm_state, const char *rsc_id, const char *action, const char *userdata, int interval, /* ms */ lrm_state 148 crmd/crmd_lrm.h lrmd_rsc_info_t *lrm_state_get_rsc_info(lrm_state_t * lrm_state, lrm_state 150 crmd/crmd_lrm.h int lrm_state_register_rsc(lrm_state_t * lrm_state, lrm_state 154 crmd/crmd_lrm.h int lrm_state_unregister_rsc(lrm_state_t * lrm_state, lrm_state 160 crmd/crmd_lrm.h lrmd_rsc_info_t *remote_ra_get_rsc_info(lrm_state_t * lrm_state, const char *rsc_id); lrm_state 161 crmd/crmd_lrm.h int remote_ra_cancel(lrm_state_t * lrm_state, const char *rsc_id, const char *action, int interval); lrm_state 162 crmd/crmd_lrm.h int remote_ra_exec(lrm_state_t * lrm_state, const char *rsc_id, const char *action, const char *userdata, int interval, /* ms */ lrm_state 166 crmd/crmd_lrm.h void remote_ra_cleanup(lrm_state_t * lrm_state); lrm_state 169 crmd/crmd_lrm.h gboolean remote_ra_is_in_maintenance(lrm_state_t * lrm_state); lrm_state 172 crmd/crmd_lrm.h gboolean process_lrm_event(lrm_state_t * lrm_state, lrmd_event_data_t * op, struct recurring_op_s *pending); lrm_state 47 crmd/lrm.c lrm_state_t *lrm_state; lrm_state 50 crmd/lrm.c static gboolean is_rsc_active(lrm_state_t * lrm_state, const char *rsc_id); lrm_state 51 crmd/lrm.c static gboolean build_active_RAs(lrm_state_t * lrm_state, xmlNode * rsc_list); lrm_state 53 crmd/lrm.c static int delete_rsc_status(lrm_state_t * lrm_state, const char *rsc_id, int call_options, lrm_state 56 crmd/lrm.c static lrmd_event_data_t *construct_op(lrm_state_t * lrm_state, xmlNode * rsc_op, lrm_state 58 crmd/lrm.c static void do_lrm_rsc_op(lrm_state_t * lrm_state, lrmd_rsc_info_t * rsc, const char *operation, lrm_state 64 crmd/lrm.c static gboolean lrm_state_verify_stopped(lrm_state_t * lrm_state, enum crmd_fsa_state cur_state, lrm_state 185 crmd/lrm.c update_history_cache(lrm_state_t * lrm_state, lrmd_rsc_info_t * rsc, lrmd_event_data_t * op) lrm_state 192 crmd/lrm.c delete_rsc_status(lrm_state, op->rsc_id, cib_quorum_override, NULL); lrm_state 202 crmd/lrm.c entry = g_hash_table_lookup(lrm_state->resource_history, op->rsc_id); lrm_state 206 crmd/lrm.c g_hash_table_insert(lrm_state->resource_history, entry->id, entry); lrm_state 292 crmd/lrm.c send_task_ok_ack(lrm_state_t *lrm_state, ha_msg_input_t *input, lrm_state 296 crmd/lrm.c lrmd_event_data_t *op = construct_op(lrm_state, input->xml, rsc_id, task); lrm_state 309 crmd/lrm.c lrm_state_t *lrm_state = NULL; lrm_state 326 crmd/lrm.c lrm_state = lrm_state_find(nodename); lrm_state 327 crmd/lrm.c CRM_ASSERT(lrm_state != NULL); lrm_state 329 crmd/lrm.c process_lrm_event(lrm_state, op, NULL); lrm_state 343 crmd/lrm.c lrm_state_t *lrm_state = NULL; lrm_state 348 crmd/lrm.c lrm_state = lrm_state_find_or_create(fsa_our_uname); lrm_state 349 crmd/lrm.c if (lrm_state == NULL) { lrm_state 355 crmd/lrm.c if (lrm_state_verify_stopped(lrm_state, cur_state, LOG_INFO) == FALSE) { lrm_state 364 crmd/lrm.c lrm_state_disconnect(lrm_state); lrm_state 365 crmd/lrm.c lrm_state_reset_tables(lrm_state, FALSE); lrm_state 373 crmd/lrm.c ret = lrm_state_ipc_connect(lrm_state); lrm_state 376 crmd/lrm.c if (lrm_state->num_lrm_register_fails < MAX_LRM_REG_FAILS) { lrm_state 378 crmd/lrm.c lrm_state->num_lrm_register_fails, lrm_state 379 crmd/lrm.c s_if_plural(lrm_state->num_lrm_register_fails), lrm_state 390 crmd/lrm.c lrm_state->num_lrm_register_fails, lrm_state 391 crmd/lrm.c s_if_plural(lrm_state->num_lrm_register_fails)); lrm_state 406 crmd/lrm.c lrm_state_verify_stopped(lrm_state_t * lrm_state, enum crmd_fsa_state cur_state, int log_level) lrm_state 427 crmd/lrm.c if (lrm_state->pending_ops && lrm_state_is_connected(lrm_state) == TRUE) { lrm_state 429 crmd/lrm.c lrm_state->pending_ops, stop_recurring_actions, lrm_state); lrm_state 430 crmd/lrm.c guint nremaining = g_hash_table_size(lrm_state->pending_ops); lrm_state 438 crmd/lrm.c if (lrm_state->pending_ops) { lrm_state 439 crmd/lrm.c g_hash_table_iter_init(&gIter, lrm_state->pending_ops); lrm_state 453 crmd/lrm.c g_hash_table_iter_init(&gIter, lrm_state->pending_ops); lrm_state 464 crmd/lrm.c if (lrm_state->resource_history == NULL) { lrm_state 474 crmd/lrm.c g_hash_table_iter_init(&gIter, lrm_state->resource_history); lrm_state 476 crmd/lrm.c if (is_rsc_active(lrm_state, entry->id) == FALSE) { lrm_state 486 crmd/lrm.c if (lrm_state->pending_ops) { lrm_state 489 crmd/lrm.c g_hash_table_iter_init(&hIter, lrm_state->pending_ops); lrm_state 666 crmd/lrm.c lrm_state_t *lrm_state = NULL; lrm_state 701 crmd/lrm.c lrm_state = lrm_state_find(node_name); lrm_state 702 crmd/lrm.c if (lrm_state == NULL) { lrm_state 708 crmd/lrm.c metadata = metadata_cache_get(lrm_state->metadata_cache, rsc); lrm_state 724 crmd/lrm.c int rc = lrm_state_get_metadata(lrm_state, rsc->class, lrm_state 734 crmd/lrm.c metadata = metadata_cache_update(lrm_state->metadata_cache, rsc, lrm_state 756 crmd/lrm.c is_rsc_active(lrm_state_t * lrm_state, const char *rsc_id) lrm_state 760 crmd/lrm.c entry = g_hash_table_lookup(lrm_state->resource_history, rsc_id); lrm_state 789 crmd/lrm.c build_active_RAs(lrm_state_t * lrm_state, xmlNode * rsc_list) lrm_state 794 crmd/lrm.c g_hash_table_iter_init(&iter, lrm_state->resource_history); lrm_state 812 crmd/lrm.c build_operation_update(xml_rsc, &(entry->rsc), entry->failed, lrm_state->node_name, __FUNCTION__); lrm_state 813 crmd/lrm.c build_operation_update(xml_rsc, &(entry->rsc), entry->last, lrm_state->node_name, __FUNCTION__); lrm_state 815 crmd/lrm.c build_operation_update(xml_rsc, &(entry->rsc), gIter->data, lrm_state->node_name, __FUNCTION__); lrm_state 823 crmd/lrm.c do_lrm_query_internal(lrm_state_t *lrm_state, int update_flags) lrm_state 830 crmd/lrm.c peer = crm_get_peer_full(0, lrm_state->node_name, CRM_GET_PEER_ANY); lrm_state 844 crmd/lrm.c build_active_RAs(lrm_state, rsc_list); lrm_state 854 crmd/lrm.c lrm_state_t *lrm_state = lrm_state_find(node_name); lrm_state 857 crmd/lrm.c if (!lrm_state) { lrm_state 861 crmd/lrm.c xml_state = do_lrm_query_internal(lrm_state, lrm_state 878 crmd/lrm.c notify_deleted(lrm_state_t * lrm_state, ha_msg_input_t * input, const char *rsc_id, int rc) lrm_state 888 crmd/lrm.c op = construct_op(lrm_state, input->xml, rsc_id, CRMD_ACTION_DELETE); lrm_state 923 crmd/lrm.c notify_deleted(event->lrm_state, op->input, event->rsc, event->rc); lrm_state 951 crmd/lrm.c delete_rsc_status(lrm_state_t * lrm_state, const char *rsc_id, int call_options, lrm_state 960 crmd/lrm.c max = strlen(rsc_template) + strlen(lrm_state->node_name) + strlen(rsc_id) + 1; lrm_state 962 crmd/lrm.c snprintf(rsc_xpath, max, rsc_template, lrm_state->node_name, rsc_id); lrm_state 972 crmd/lrm.c delete_rsc_entry(lrm_state_t * lrm_state, ha_msg_input_t * input, const char *rsc_id, lrm_state 985 crmd/lrm.c g_hash_table_remove(lrm_state->resource_history, rsc_id_copy); lrm_state 987 crmd/lrm.c delete_rsc_status(lrm_state, rsc_id_copy, cib_quorum_override, user_name); lrm_state 989 crmd/lrm.c g_hash_table_foreach_remove(lrm_state->pending_ops, lrm_remove_deleted_op, rsc_id_copy); lrm_state 994 crmd/lrm.c notify_deleted(lrm_state, input, rsc_id, rc); lrm_state 999 crmd/lrm.c event.lrm_state = lrm_state; lrm_state 1000 crmd/lrm.c g_hash_table_foreach_remove(lrm_state->deletion_ops, lrm_remove_deleted_rsc, &event); lrm_state 1011 crmd/lrm.c erase_lrm_history_by_op(lrm_state_t *lrm_state, lrmd_event_data_t *op) lrm_state 1070 crmd/lrm.c erase_lrm_history_by_id(lrm_state_t *lrm_state, const char *rsc_id, lrm_state 1079 crmd/lrm.c lrm_state->node_name, rsc_id, key, lrm_state 1084 crmd/lrm.c lrm_state->node_name, rsc_id, key, lrm_state 1088 crmd/lrm.c lrm_state->node_name, rsc_id, key); lrm_state 1130 crmd/lrm.c lrm_state_t *lrm_state = NULL; lrm_state 1132 crmd/lrm.c lrm_state = lrm_state_find(node_name); lrm_state 1133 crmd/lrm.c if (lrm_state == NULL) { lrm_state 1142 crmd/lrm.c erase_lrm_history_by_id(lrm_state, rsc_id, op_key, orig_op_key, 0); lrm_state 1147 crmd/lrm.c if (lrm_state->resource_history) { lrm_state 1148 crmd/lrm.c rsc_history_t *entry = g_hash_table_lookup(lrm_state->resource_history, lrm_state 1160 crmd/lrm.c cancel_op(lrm_state_t * lrm_state, const char *rsc_id, const char *key, int op, gboolean remove) lrm_state 1172 crmd/lrm.c pending = g_hash_table_lookup(lrm_state->pending_ops, key); lrm_state 1195 crmd/lrm.c rc = lrm_state_cancel(lrm_state, pending->rsc_id, pending->op_type, pending->interval); lrm_state 1221 crmd/lrm.c lrm_state_t *lrm_state; lrm_state 1233 crmd/lrm.c remove = !cancel_op(data->lrm_state, data->rsc->id, key, op->call_id, data->remove); lrm_state 1239 crmd/lrm.c cancel_op_key(lrm_state_t * lrm_state, lrmd_rsc_info_t * rsc, const char *key, gboolean remove) lrm_state 1251 crmd/lrm.c data.lrm_state = lrm_state; lrm_state 1253 crmd/lrm.c removed = g_hash_table_foreach_remove(lrm_state->pending_ops, cancel_action_by_key, &data); lrm_state 1255 crmd/lrm.c removed, g_hash_table_size(lrm_state->pending_ops)); lrm_state 1260 crmd/lrm.c get_lrm_resource(lrm_state_t * lrm_state, xmlNode * resource, xmlNode * op_msg, gboolean do_create) lrm_state 1272 crmd/lrm.c rsc = lrm_state_get_rsc_info(lrm_state, id, 0); lrm_state 1275 crmd/lrm.c rsc = lrm_state_get_rsc_info(lrm_state, long_id, 0); lrm_state 1284 crmd/lrm.c lrm_state_register_rsc(lrm_state, id, class, provider, type, lrmd_opt_drop_recurring); lrm_state 1286 crmd/lrm.c rsc = lrm_state_get_rsc_info(lrm_state, id, 0); lrm_state 1291 crmd/lrm.c crm_err("Could not add resource %s to LRM %s", id, lrm_state->node_name); lrm_state 1295 crmd/lrm.c if (lrm_state_is_local(lrm_state) == TRUE) { lrm_state 1305 crmd/lrm.c delete_resource(lrm_state_t * lrm_state, lrm_state 1320 crmd/lrm.c rc = lrm_state_unregister_rsc(lrm_state, id, 0); lrm_state 1334 crmd/lrm.c g_hash_table_insert(lrm_state->deletion_ops, ref, op); lrm_state 1342 crmd/lrm.c delete_rsc_entry(lrm_state, request, id, gIter, rc, user); lrm_state 1346 crmd/lrm.c get_fake_call_id(lrm_state_t *lrm_state, const char *rsc_id) lrm_state 1351 crmd/lrm.c if(lrm_state) { lrm_state 1352 crmd/lrm.c entry = g_hash_table_lookup(lrm_state->resource_history, rsc_id); lrm_state 1369 crmd/lrm.c force_reprobe(lrm_state_t *lrm_state, const char *from_sys, const char *from_host, const char *user_name, gboolean is_remote_node) lrm_state 1375 crmd/lrm.c crm_info("clearing resource history on node %s", lrm_state->node_name); lrm_state 1376 crmd/lrm.c g_hash_table_iter_init(&gIter, lrm_state->resource_history); lrm_state 1393 crmd/lrm.c delete_resource(lrm_state, entry->id, &entry->rsc, &gIter, from_sys, from_host, lrm_state 1398 crmd/lrm.c erase_status_tag(lrm_state->node_name, XML_CIB_TAG_LRM, cib_scope_local); lrm_state 1403 crmd/lrm.c update_attrd(lrm_state->node_name, CRM_OP_PROBED, NULL, user_name, is_remote_node); lrm_state 1407 crmd/lrm.c synthesize_lrmd_failure(lrm_state_t *lrm_state, xmlNode *action, int rc) lrm_state 1417 crmd/lrm.c crm_element_value(action, XML_LRM_ATTR_TASK_KEY), rc, target_node, lrm_state); lrm_state 1423 crmd/lrm.c crm_element_value(action, XML_ATTR_TRANSITION_KEY), rc, target_node, lrm_state); lrm_state 1427 crmd/lrm.c op = construct_op(lrm_state, action, ID(xml_rsc), operation); lrm_state 1430 crmd/lrm.c op->call_id = get_fake_call_id(lrm_state, op->rsc_id); lrm_state 1443 crmd/lrm.c crm_info("Faking result %d for %s_%s_%d on %s (%p)", op->rc, op->rsc_id, op->op_type, op->interval, target_node, lrm_state); lrm_state 1445 crmd/lrm.c if(lrm_state) { lrm_state 1446 crmd/lrm.c process_lrm_event(lrm_state, op, NULL); lrm_state 1475 crmd/lrm.c lrm_state_t *lrm_state = NULL; lrm_state 1496 crmd/lrm.c lrm_state = lrm_state_find(target_node); lrm_state 1498 crmd/lrm.c if (lrm_state == NULL && is_remote_node) { lrm_state 1507 crmd/lrm.c CRM_ASSERT(lrm_state != NULL); lrm_state 1546 crmd/lrm.c op = construct_op(lrm_state, input->xml, ID(xml_rsc), "asyncmon"); lrm_state 1551 crmd/lrm.c op->call_id = get_fake_call_id(lrm_state, op->rsc_id); lrm_state 1567 crmd/lrm.c rsc = get_lrm_resource(lrm_state, xml_rsc, input->xml, create_rsc); lrm_state 1570 crmd/lrm.c process_lrm_event(lrm_state, op, NULL); lrm_state 1589 crmd/lrm.c xmlNode *fragment = do_lrm_query_internal(lrm_state, node_update_all); lrm_state 1610 crmd/lrm.c xmlNode *data = do_lrm_query_internal(lrm_state, node_update_all); lrm_state 1621 crmd/lrm.c update_attrd(lrm_state->node_name, CRM_OP_PROBED, XML_BOOLEAN_TRUE, user_name, is_remote_node); lrm_state 1626 crmd/lrm.c force_reprobe(lrm_state, from_sys, from_host, user_name, is_remote_node); lrm_state 1656 crmd/lrm.c if(lrm_state_is_connected(lrm_state) == FALSE) { lrm_state 1657 crmd/lrm.c synthesize_lrmd_failure(lrm_state, input->xml, PCMK_OCF_CONNECTION_DIED); lrm_state 1661 crmd/lrm.c rsc = get_lrm_resource(lrm_state, xml_rsc, input->xml, create_rsc); lrm_state 1668 crmd/lrm.c synthesize_lrmd_failure(lrm_state, input->xml, PCMK_OCF_NOT_CONFIGURED); lrm_state 1672 crmd/lrm.c delete_rsc_entry(lrm_state, input, ID(xml_rsc), NULL, pcmk_ok, user_name); lrm_state 1675 crmd/lrm.c send_task_ok_ack(lrm_state, input, ID(xml_rsc), NULL, operation, lrm_state 1714 crmd/lrm.c in_progress = cancel_op_key(lrm_state, rsc, op_key, TRUE); lrm_state 1718 crmd/lrm.c in_progress = cancel_op(lrm_state, rsc->id, NULL, call, TRUE); lrm_state 1728 crmd/lrm.c erase_lrm_history_by_id(lrm_state, rsc->id, op_key, NULL, call); lrm_state 1729 crmd/lrm.c send_task_ok_ack(lrm_state, input, rsc->id, rsc, op_task, lrm_state 1733 crmd/lrm.c g_hash_table_remove(lrm_state->pending_ops, op_id); lrm_state 1749 crmd/lrm.c send_task_ok_ack(lrm_state, input, rsc->id, rsc, op_task, lrm_state 1760 crmd/lrm.c int cib_rc = delete_rsc_status(lrm_state, rsc->id, cib_dryrun | cib_sync_call, user_name); lrm_state 1769 crmd/lrm.c op = construct_op(lrm_state, input->xml, rsc->id, operation); lrm_state 1787 crmd/lrm.c delete_resource(lrm_state, rsc->id, rsc, NULL, from_sys, from_host, user_name, input, unregister); lrm_state 1790 crmd/lrm.c do_lrm_rsc_op(lrm_state, rsc, operation, input->xml, input->msg); lrm_state 1802 crmd/lrm.c construct_op(lrm_state_t * lrm_state, xmlNode * rsc_op, const char *rsc_id, const char *operation) lrm_state 1858 crmd/lrm.c lrmd_rsc_info_t *rsc = lrm_state_get_rsc_info(lrm_state, rsc_id, 0); lrm_state 1861 crmd/lrm.c metadata = metadata_cache_get(lrm_state->metadata_cache, rsc); lrm_state 1913 crmd/lrm.c rsc_history_t *entry = g_hash_table_lookup(lrm_state->resource_history, rsc_id); lrm_state 2013 crmd/lrm.c lrm_state_t *lrm_state = state_entry->data; lrm_state 2015 crmd/lrm.c if (!lrm_state_verify_stopped(lrm_state, cur_state, log_level)) { lrm_state 2028 crmd/lrm.c lrm_state_t *lrm_state; lrm_state 2040 crmd/lrm.c remove = !cancel_op(event->lrm_state, event->rsc->id, key, op->call_id, FALSE); lrm_state 2050 crmd/lrm.c lrm_state_t *lrm_state = user_data; lrm_state 2055 crmd/lrm.c remove = !cancel_op(lrm_state, op->rsc_id, key, op->call_id, FALSE); lrm_state 2100 crmd/lrm.c do_lrm_rsc_op(lrm_state_t * lrm_state, lrmd_rsc_info_t * rsc, const char *operation, xmlNode * msg, lrm_state 2122 crmd/lrm.c op = construct_op(lrm_state, msg, rsc->id, operation); lrm_state 2148 crmd/lrm.c data.lrm_state = lrm_state; lrm_state 2150 crmd/lrm.c lrm_state->pending_ops, stop_recurring_action_by_rsc, &data); lrm_state 2186 crmd/lrm.c record_pending_op(lrm_state->node_name, rsc, op); lrm_state 2192 crmd/lrm.c cancel_op_key(lrm_state, rsc, op_id, FALSE); lrm_state 2206 crmd/lrm.c call_id = lrm_state_exec(lrm_state, lrm_state 2211 crmd/lrm.c if (call_id <= 0 && lrm_state_is_local(lrm_state)) { lrm_state 2217 crmd/lrm.c crm_err("Operation %s on resource %s failed to execute on remote node %s: %d", operation, rsc->id, lrm_state->node_name, call_id); lrm_state 2218 crmd/lrm.c op->call_id = get_fake_call_id(lrm_state, rsc->id); lrm_state 2223 crmd/lrm.c process_lrm_event(lrm_state, op, NULL); lrm_state 2242 crmd/lrm.c g_hash_table_replace(lrm_state->pending_ops, call_id_s, pending); lrm_state 2424 crmd/lrm.c process_lrm_event(lrm_state_t * lrm_state, lrmd_event_data_t * op, struct recurring_op_s *pending) lrm_state 2439 crmd/lrm.c rsc = lrm_state_get_rsc_info(lrm_state, op->rsc_id, 0); lrm_state 2442 crmd/lrm.c pending = g_hash_table_lookup(lrm_state->pending_ops, op_id); lrm_state 2465 crmd/lrm.c update_id = do_update_resource(lrm_state->node_name, rsc, op); lrm_state 2484 crmd/lrm.c erase_lrm_history_by_op(lrm_state, op); lrm_state 2504 crmd/lrm.c } else if ((op->interval == 0) && g_hash_table_remove(lrm_state->pending_ops, op_id)) { lrm_state 2507 crmd/lrm.c op_key, op->call_id, op_id, g_hash_table_size(lrm_state->pending_ops)); lrm_state 2511 crmd/lrm.c g_hash_table_remove(lrm_state->pending_ops, op_id); lrm_state 2519 crmd/lrm.c op->rsc_id, lrm_state->node_name, lrm_state 2529 crmd/lrm.c op->rsc_id, lrm_state->node_name, lrm_state 2539 crmd/lrm.c op->rsc_id, lrm_state->node_name, lrm_state 2548 crmd/lrm.c op->rsc_id, lrm_state->node_name, lrm_state 2555 crmd/lrm.c crm_strdup_printf("%s-%s_%s_%d:%d", lrm_state->node_name, op->rsc_id, op->op_type, op->interval, op->call_id); lrm_state 2566 crmd/lrm.c crmd_alert_resource_op(lrm_state->node_name, op); lrm_state 2570 crmd/lrm.c metadata_cache_update(lrm_state->metadata_cache, rsc, metadata); lrm_state 2576 crmd/lrm.c delete_rsc_entry(lrm_state, NULL, op->rsc_id, NULL, pcmk_ok, NULL); lrm_state 2583 crmd/lrm.c update_history_cache(lrm_state, rsc, op); lrm_state 77 crmd/lrm_state.c lrm_state_t *lrm_state = user_data; lrm_state 82 crmd/lrm_state.c lrm_state->node_name, (char*)key, op->user_data); lrm_state 96 crmd/lrm_state.c event.remote_nodename = lrm_state->node_name; lrm_state 99 crmd/lrm_state.c process_lrm_event(lrm_state, &event, op); lrm_state 104 crmd/lrm_state.c lrm_state_is_local(lrm_state_t *lrm_state) lrm_state 106 crmd/lrm_state.c if (lrm_state == NULL || fsa_our_uname == NULL) { lrm_state 110 crmd/lrm_state.c if (strcmp(lrm_state->node_name, fsa_our_uname) != 0) { lrm_state 176 crmd/lrm_state.c lrm_state_t *lrm_state = data; lrm_state 178 crmd/lrm_state.c if (!lrm_state) { lrm_state 182 crmd/lrm_state.c crm_trace("Destroying proxy table %s with %d members", lrm_state->node_name, g_hash_table_size(proxy_table)); lrm_state 183 crmd/lrm_state.c g_hash_table_foreach_remove(proxy_table, remote_proxy_remove_by_node, (char *) lrm_state->node_name); lrm_state 184 crmd/lrm_state.c remote_ra_cleanup(lrm_state); lrm_state 185 crmd/lrm_state.c lrmd_api_delete(lrm_state->conn); lrm_state 187 crmd/lrm_state.c if (lrm_state->rsc_info_cache) { lrm_state 188 crmd/lrm_state.c crm_trace("Destroying rsc info cache with %d members", g_hash_table_size(lrm_state->rsc_info_cache)); lrm_state 189 crmd/lrm_state.c g_hash_table_destroy(lrm_state->rsc_info_cache); lrm_state 191 crmd/lrm_state.c if (lrm_state->resource_history) { lrm_state 192 crmd/lrm_state.c crm_trace("Destroying history op cache with %d members", g_hash_table_size(lrm_state->resource_history)); lrm_state 193 crmd/lrm_state.c g_hash_table_destroy(lrm_state->resource_history); lrm_state 195 crmd/lrm_state.c if (lrm_state->deletion_ops) { lrm_state 196 crmd/lrm_state.c crm_trace("Destroying deletion op cache with %d members", g_hash_table_size(lrm_state->deletion_ops)); lrm_state 197 crmd/lrm_state.c g_hash_table_destroy(lrm_state->deletion_ops); lrm_state 199 crmd/lrm_state.c if (lrm_state->pending_ops) { lrm_state 200 crmd/lrm_state.c crm_trace("Destroying pending op cache with %d members", g_hash_table_size(lrm_state->pending_ops)); lrm_state 201 crmd/lrm_state.c g_hash_table_destroy(lrm_state->pending_ops); lrm_state 203 crmd/lrm_state.c metadata_cache_free(lrm_state->metadata_cache); lrm_state 205 crmd/lrm_state.c free((char *)lrm_state->node_name); lrm_state 206 crmd/lrm_state.c free(lrm_state); lrm_state 210 crmd/lrm_state.c lrm_state_reset_tables(lrm_state_t * lrm_state, gboolean reset_metadata) lrm_state 212 crmd/lrm_state.c if (lrm_state->resource_history) { lrm_state 214 crmd/lrm_state.c g_hash_table_size(lrm_state->resource_history)); lrm_state 215 crmd/lrm_state.c g_hash_table_remove_all(lrm_state->resource_history); lrm_state 217 crmd/lrm_state.c if (lrm_state->deletion_ops) { lrm_state 219 crmd/lrm_state.c g_hash_table_size(lrm_state->deletion_ops)); lrm_state 220 crmd/lrm_state.c g_hash_table_remove_all(lrm_state->deletion_ops); lrm_state 222 crmd/lrm_state.c if (lrm_state->pending_ops) { lrm_state 224 crmd/lrm_state.c g_hash_table_size(lrm_state->pending_ops)); lrm_state 225 crmd/lrm_state.c g_hash_table_remove_all(lrm_state->pending_ops); lrm_state 227 crmd/lrm_state.c if (lrm_state->rsc_info_cache) { lrm_state 229 crmd/lrm_state.c g_hash_table_size(lrm_state->rsc_info_cache)); lrm_state 230 crmd/lrm_state.c g_hash_table_remove_all(lrm_state->rsc_info_cache); lrm_state 233 crmd/lrm_state.c metadata_cache_reset(lrm_state->metadata_cache); lrm_state 286 crmd/lrm_state.c lrm_state_t *lrm_state; lrm_state 288 crmd/lrm_state.c lrm_state = g_hash_table_lookup(lrm_state_table, node_name); lrm_state 289 crmd/lrm_state.c if (!lrm_state) { lrm_state 290 crmd/lrm_state.c lrm_state = lrm_state_create(node_name); lrm_state 293 crmd/lrm_state.c return lrm_state; lrm_state 342 crmd/lrm_state.c lrm_state_disconnect_only(lrm_state_t * lrm_state) lrm_state 346 crmd/lrm_state.c if (!lrm_state->conn) { lrm_state 349 crmd/lrm_state.c crm_trace("Disconnecting %s", lrm_state->node_name); lrm_state 351 crmd/lrm_state.c remote_proxy_disconnect_by_node(lrm_state->node_name); lrm_state 353 crmd/lrm_state.c ((lrmd_t *) lrm_state->conn)->cmds->disconnect(lrm_state->conn); lrm_state 356 crmd/lrm_state.c removed = g_hash_table_foreach_remove(lrm_state->pending_ops, fail_pending_op, lrm_state); lrm_state 357 crmd/lrm_state.c crm_trace("Synthesized %d operation failures for %s", removed, lrm_state->node_name); lrm_state 362 crmd/lrm_state.c lrm_state_disconnect(lrm_state_t * lrm_state) lrm_state 364 crmd/lrm_state.c if (!lrm_state->conn) { lrm_state 368 crmd/lrm_state.c lrm_state_disconnect_only(lrm_state); lrm_state 370 crmd/lrm_state.c lrmd_api_delete(lrm_state->conn); lrm_state 371 crmd/lrm_state.c lrm_state->conn = NULL; lrm_state 375 crmd/lrm_state.c lrm_state_is_connected(lrm_state_t * lrm_state) lrm_state 377 crmd/lrm_state.c if (!lrm_state->conn) { lrm_state 380 crmd/lrm_state.c return ((lrmd_t *) lrm_state->conn)->cmds->is_connected(lrm_state->conn); lrm_state 384 crmd/lrm_state.c lrm_state_poke_connection(lrm_state_t * lrm_state) lrm_state 387 crmd/lrm_state.c if (!lrm_state->conn) { lrm_state 390 crmd/lrm_state.c return ((lrmd_t *) lrm_state->conn)->cmds->poke_connection(lrm_state->conn); lrm_state 394 crmd/lrm_state.c lrm_state_ipc_connect(lrm_state_t * lrm_state) lrm_state 398 crmd/lrm_state.c if (!lrm_state->conn) { lrm_state 399 crmd/lrm_state.c lrm_state->conn = lrmd_api_new(); lrm_state 400 crmd/lrm_state.c ((lrmd_t *) lrm_state->conn)->cmds->set_callback(lrm_state->conn, lrm_op_callback); lrm_state 403 crmd/lrm_state.c ret = ((lrmd_t *) lrm_state->conn)->cmds->connect(lrm_state->conn, CRM_SYSTEM_CRMD, NULL); lrm_state 406 crmd/lrm_state.c lrm_state->num_lrm_register_fails++; lrm_state 408 crmd/lrm_state.c lrm_state->num_lrm_register_fails = 0; lrm_state 436 crmd/lrm_state.c lrm_state_t *lrm_state = NULL; lrm_state 442 crmd/lrm_state.c lrm_state = lrm_state_find(proxy->node_name); lrm_state 443 crmd/lrm_state.c if (lrm_state) { lrm_state 494 crmd/lrm_state.c lrm_state_t *lrm_state = userdata; lrm_state 502 crmd/lrm_state.c proxy = crmd_remote_proxy_new(lrmd, lrm_state->node_name, session, channel); lrm_state 515 crmd/lrm_state.c lrm_state->node_name); lrm_state 517 crmd/lrm_state.c if (!remote_ra_is_in_maintenance(lrm_state)) { lrm_state 519 crmd/lrm_state.c update_attrd(lrm_state->node_name, XML_CIB_ATTR_SHUTDOWN, now_s, NULL, TRUE); lrm_state 525 crmd/lrm_state.c lrm_state->node_name); lrm_state 530 crmd/lrm_state.c lrm_state->node_name); lrm_state 544 crmd/lrm_state.c CRM_CHECK(lrm_state->node_name, return); lrm_state 546 crmd/lrm_state.c crm_acl_get_set_user(request, F_LRMD_IPC_USER, lrm_state->node_name); lrm_state 565 crmd/lrm_state.c remote_proxy_cb(lrmd, lrm_state->node_name, msg); lrm_state 571 crmd/lrm_state.c lrm_state_remote_connect_async(lrm_state_t * lrm_state, const char *server, int port, lrm_state 576 crmd/lrm_state.c if (!lrm_state->conn) { lrm_state 577 crmd/lrm_state.c lrm_state->conn = lrmd_remote_api_new(lrm_state->node_name, server, port); lrm_state 578 crmd/lrm_state.c if (!lrm_state->conn) { lrm_state 581 crmd/lrm_state.c ((lrmd_t *) lrm_state->conn)->cmds->set_callback(lrm_state->conn, remote_lrm_op_callback); lrm_state 582 crmd/lrm_state.c lrmd_internal_set_proxy_callback(lrm_state->conn, lrm_state, crmd_remote_proxy_cb); lrm_state 587 crmd/lrm_state.c ((lrmd_t *) lrm_state->conn)->cmds->connect_async(lrm_state->conn, lrm_state->node_name, lrm_state 591 crmd/lrm_state.c lrm_state->num_lrm_register_fails++; lrm_state 593 crmd/lrm_state.c lrm_state->num_lrm_register_fails = 0; lrm_state 600 crmd/lrm_state.c lrm_state_get_metadata(lrm_state_t * lrm_state, lrm_state 605 crmd/lrm_state.c if (!lrm_state->conn) { lrm_state 608 crmd/lrm_state.c return ((lrmd_t *) lrm_state->conn)->cmds->get_metadata(lrm_state->conn, class, provider, agent, lrm_state 613 crmd/lrm_state.c lrm_state_cancel(lrm_state_t * lrm_state, const char *rsc_id, const char *action, int interval) lrm_state 615 crmd/lrm_state.c if (!lrm_state->conn) { lrm_state 622 crmd/lrm_state.c return remote_ra_cancel(lrm_state, rsc_id, action, interval); lrm_state 624 crmd/lrm_state.c return ((lrmd_t *) lrm_state->conn)->cmds->cancel(lrm_state->conn, rsc_id, action, interval); lrm_state 628 crmd/lrm_state.c lrm_state_get_rsc_info(lrm_state_t * lrm_state, const char *rsc_id, enum lrmd_call_options options) lrm_state 632 crmd/lrm_state.c if (!lrm_state->conn) { lrm_state 636 crmd/lrm_state.c return remote_ra_get_rsc_info(lrm_state, rsc_id); lrm_state 639 crmd/lrm_state.c rsc = g_hash_table_lookup(lrm_state->rsc_info_cache, rsc_id); lrm_state 642 crmd/lrm_state.c rsc = ((lrmd_t *) lrm_state->conn)->cmds->get_rsc_info(lrm_state->conn, rsc_id, options); lrm_state 647 crmd/lrm_state.c g_hash_table_insert(lrm_state->rsc_info_cache, rsc->id, rsc); lrm_state 655 crmd/lrm_state.c lrm_state_exec(lrm_state_t * lrm_state, const char *rsc_id, const char *action, const char *userdata, int interval, /* ms */ lrm_state 661 crmd/lrm_state.c if (!lrm_state->conn) { lrm_state 667 crmd/lrm_state.c return remote_ra_exec(lrm_state, lrm_state 671 crmd/lrm_state.c return ((lrmd_t *) lrm_state->conn)->cmds->exec(lrm_state->conn, lrm_state 682 crmd/lrm_state.c lrm_state_register_rsc(lrm_state_t * lrm_state, lrm_state 687 crmd/lrm_state.c if (!lrm_state->conn) { lrm_state 699 crmd/lrm_state.c return ((lrmd_t *) lrm_state->conn)->cmds->register_rsc(lrm_state->conn, rsc_id, class, lrm_state 704 crmd/lrm_state.c lrm_state_unregister_rsc(lrm_state_t * lrm_state, lrm_state 707 crmd/lrm_state.c if (!lrm_state->conn) { lrm_state 719 crmd/lrm_state.c g_hash_table_remove(lrm_state->rsc_info_cache, rsc_id); lrm_state 721 crmd/lrm_state.c return ((lrmd_t *) lrm_state->conn)->cmds->unregister_rsc(lrm_state->conn, rsc_id, options); lrm_state 740 crmd/lrm_state.c lrm_state_t *lrm_state; lrm_state 746 crmd/lrm_state.c lrm_state = lrm_state_find(fsa_our_uname); lrm_state 747 crmd/lrm_state.c if (lrm_state == NULL) { lrm_state 751 crmd/lrm_state.c lrmd_send_node_alert((lrmd_t *) lrm_state->conn, crmd_alert_list, lrm_state 759 crmd/lrm_state.c lrm_state_t *lrm_state; lrm_state 765 crmd/lrm_state.c lrm_state = lrm_state_find(fsa_our_uname); lrm_state 766 crmd/lrm_state.c if (lrm_state == NULL) { lrm_state 776 crmd/lrm_state.c lrmd_send_fencing_alert((lrmd_t *) lrm_state->conn, crmd_alert_list, lrm_state 784 crmd/lrm_state.c lrm_state_t *lrm_state; lrm_state 790 crmd/lrm_state.c lrm_state = lrm_state_find(fsa_our_uname); lrm_state 791 crmd/lrm_state.c if (lrm_state == NULL) { lrm_state 795 crmd/lrm_state.c lrmd_send_resource_alert((lrmd_t *) lrm_state->conn, crmd_alert_list, node, lrm_state 90 crmd/remote_lrmd_ra.c static int handle_remote_ra_start(lrm_state_t * lrm_state, remote_ra_cmd_t * cmd, int timeout_ms); lrm_state 91 crmd/remote_lrmd_ra.c static void handle_remote_ra_stop(lrm_state_t * lrm_state, remote_ra_cmd_t * cmd); lrm_state 318 crmd/remote_lrmd_ra.c lrm_state_t *lrm_state = lrm_state_find(cmd->rsc_id); lrm_state 319 crmd/remote_lrmd_ra.c remote_ra_data_t *ra_data = lrm_state? lrm_state->remote_ra_data : NULL; lrm_state 408 crmd/remote_lrmd_ra.c lrm_state_t *lrm_state = data; lrm_state 409 crmd/remote_lrmd_ra.c remote_ra_data_t *ra_data = lrm_state->remote_ra_data; lrm_state 423 crmd/remote_lrmd_ra.c rc = handle_remote_ra_start(lrm_state, cmd, cmd->remaining_timeout); lrm_state 447 crmd/remote_lrmd_ra.c lrm_state_t *lrm_state = NULL; lrm_state 453 crmd/remote_lrmd_ra.c lrm_state = lrm_state_find(cmd->rsc_id); lrm_state 455 crmd/remote_lrmd_ra.c handle_remote_ra_stop(lrm_state, cmd); lrm_state 464 crmd/remote_lrmd_ra.c lrm_state_t *lrm_state = NULL; lrm_state 467 crmd/remote_lrmd_ra.c lrm_state = lrm_state_find(cmd->rsc_id); lrm_state 469 crmd/remote_lrmd_ra.c crm_info("Poke async response timed out for node %s (%p)", cmd->rsc_id, lrm_state); lrm_state 474 crmd/remote_lrmd_ra.c if (lrm_state && lrm_state->remote_ra_data) { lrm_state 475 crmd/remote_lrmd_ra.c remote_ra_data_t *ra_data = lrm_state->remote_ra_data; lrm_state 488 crmd/remote_lrmd_ra.c if(lrm_state) { lrm_state 489 crmd/remote_lrmd_ra.c lrm_state_disconnect(lrm_state); lrm_state 495 crmd/remote_lrmd_ra.c synthesize_lrmd_success(lrm_state_t *lrm_state, const char *rsc_id, const char *op_type) lrm_state 499 crmd/remote_lrmd_ra.c if (lrm_state == NULL) { lrm_state 501 crmd/remote_lrmd_ra.c lrm_state = lrm_state_find(fsa_our_uname); lrm_state 503 crmd/remote_lrmd_ra.c CRM_ASSERT(lrm_state != NULL); lrm_state 513 crmd/remote_lrmd_ra.c process_lrm_event(lrm_state, &op, NULL); lrm_state 520 crmd/remote_lrmd_ra.c lrm_state_t *lrm_state = NULL; lrm_state 530 crmd/remote_lrmd_ra.c lrm_state = lrm_state_find(op->remote_nodename); lrm_state 531 crmd/remote_lrmd_ra.c if (!lrm_state || !lrm_state->remote_ra_data) { lrm_state 535 crmd/remote_lrmd_ra.c ra_data = lrm_state->remote_ra_data; lrm_state 548 crmd/remote_lrmd_ra.c lrm_state_disconnect_only(lrm_state); lrm_state 567 crmd/remote_lrmd_ra.c if (!remote_ra_is_in_maintenance(lrm_state)) { lrm_state 568 crmd/remote_lrmd_ra.c crm_err("Unexpected disconnect on remote-node %s", lrm_state->node_name); lrm_state 572 crmd/remote_lrmd_ra.c crm_notice("Disconnect on unmanaged remote-node %s", lrm_state->node_name); lrm_state 574 crmd/remote_lrmd_ra.c handle_remote_ra_stop(lrm_state, NULL); lrm_state 575 crmd/remote_lrmd_ra.c remote_node_down(lrm_state->node_name, DOWN_KEEP_LRM); lrm_state 577 crmd/remote_lrmd_ra.c synthesize_lrmd_success(NULL, lrm_state->node_name, "stop"); lrm_state 605 crmd/remote_lrmd_ra.c g_timeout_add(1000, retry_start_cmd_cb, lrm_state); lrm_state 616 crmd/remote_lrmd_ra.c lrm_state_reset_tables(lrm_state, TRUE); lrm_state 658 crmd/remote_lrmd_ra.c crm_err("remote-node %s unexpectedly disconneced during monitor operation", lrm_state->node_name); lrm_state 664 crmd/remote_lrmd_ra.c handle_remote_ra_stop(lrm_state, cmd); lrm_state 681 crmd/remote_lrmd_ra.c handle_remote_ra_stop(lrm_state_t * lrm_state, remote_ra_cmd_t * cmd) lrm_state 685 crmd/remote_lrmd_ra.c CRM_ASSERT(lrm_state); lrm_state 686 crmd/remote_lrmd_ra.c ra_data = lrm_state->remote_ra_data; lrm_state 690 crmd/remote_lrmd_ra.c g_hash_table_remove_all(lrm_state->pending_ops); lrm_state 694 crmd/remote_lrmd_ra.c lrm_state_reset_tables(lrm_state, FALSE); lrm_state 698 crmd/remote_lrmd_ra.c lrm_state_disconnect(lrm_state); lrm_state 719 crmd/remote_lrmd_ra.c handle_remote_ra_start(lrm_state_t * lrm_state, remote_ra_cmd_t * cmd, int timeout_ms) lrm_state 735 crmd/remote_lrmd_ra.c return lrm_state_remote_connect_async(lrm_state, server, port, timeout_used); lrm_state 742 crmd/remote_lrmd_ra.c lrm_state_t *lrm_state = user_data; lrm_state 743 crmd/remote_lrmd_ra.c remote_ra_data_t *ra_data = lrm_state->remote_ra_data; lrm_state 765 crmd/remote_lrmd_ra.c rc = handle_remote_ra_start(lrm_state, cmd, cmd->timeout); lrm_state 780 crmd/remote_lrmd_ra.c if (lrm_state_is_connected(lrm_state) == TRUE) { lrm_state 781 crmd/remote_lrmd_ra.c rc = lrm_state_poke_connection(lrm_state); lrm_state 814 crmd/remote_lrmd_ra.c handle_remote_ra_stop(lrm_state, cmd); lrm_state 835 crmd/remote_lrmd_ra.c remote_ra_data_init(lrm_state_t * lrm_state) lrm_state 839 crmd/remote_lrmd_ra.c if (lrm_state->remote_ra_data) { lrm_state 844 crmd/remote_lrmd_ra.c ra_data->work = mainloop_add_trigger(G_PRIORITY_HIGH, handle_remote_ra_exec, lrm_state); lrm_state 845 crmd/remote_lrmd_ra.c lrm_state->remote_ra_data = ra_data; lrm_state 849 crmd/remote_lrmd_ra.c remote_ra_cleanup(lrm_state_t * lrm_state) lrm_state 851 crmd/remote_lrmd_ra.c remote_ra_data_t *ra_data = lrm_state->remote_ra_data; lrm_state 866 crmd/remote_lrmd_ra.c lrm_state->remote_ra_data = NULL; lrm_state 883 crmd/remote_lrmd_ra.c remote_ra_get_rsc_info(lrm_state_t * lrm_state, const char *rsc_id) lrm_state 967 crmd/remote_lrmd_ra.c remote_ra_cancel(lrm_state_t * lrm_state, const char *rsc_id, const char *action, int interval) lrm_state 1061 crmd/remote_lrmd_ra.c remote_ra_exec(lrm_state_t * lrm_state, const char *rsc_id, const char *action, const char *userdata, int interval, /* ms */ lrm_state 1091 crmd/remote_lrmd_ra.c cmd->owner = strdup(lrm_state->node_name); lrm_state 1126 crmd/remote_lrmd_ra.c lrm_state_t *lrm_state = lrm_state_find(node_name); lrm_state 1128 crmd/remote_lrmd_ra.c if (lrm_state && lrm_state_is_connected(lrm_state)) { lrm_state 1129 crmd/remote_lrmd_ra.c remote_ra_data_t *ra_data = lrm_state->remote_ra_data; lrm_state 1193 crmd/remote_lrmd_ra.c remote_ra_maintenance(lrm_state_t * lrm_state, gboolean maintenance) lrm_state 1195 crmd/remote_lrmd_ra.c remote_ra_data_t *ra_data = lrm_state->remote_ra_data; lrm_state 1201 crmd/remote_lrmd_ra.c node = crm_remote_peer_get(lrm_state->node_name); lrm_state 1209 crmd/remote_lrmd_ra.c crm_perror(LOG_WARNING, "%s CIB node state update failed", lrm_state->node_name); lrm_state 1240 crmd/remote_lrmd_ra.c lrm_state_t *lrm_state = lrm_state_find(ID(node)); lrm_state 1243 crmd/remote_lrmd_ra.c if (lrm_state && lrm_state->remote_ra_data && lrm_state 1244 crmd/remote_lrmd_ra.c ((remote_ra_data_t *) lrm_state->remote_ra_data)->active) { lrm_state 1246 crmd/remote_lrmd_ra.c remote_ra_maintenance(lrm_state, lrm_state 1259 crmd/remote_lrmd_ra.c remote_ra_is_in_maintenance(lrm_state_t * lrm_state) lrm_state 1261 crmd/remote_lrmd_ra.c remote_ra_data_t *ra_data = lrm_state->remote_ra_data; lrm_state 37 lib/pengine/unpack.h extern gboolean unpack_lrm_resources(node_t * node, xmlNode * lrm_state,