cmd 88 daemons/controld/controld_remote_ra.c static int handle_remote_ra_start(lrm_state_t * lrm_state, remote_ra_cmd_t * cmd, int timeout_ms); cmd 89 daemons/controld/controld_remote_ra.c static void handle_remote_ra_stop(lrm_state_t * lrm_state, remote_ra_cmd_t * cmd); cmd 95 daemons/controld/controld_remote_ra.c remote_ra_cmd_t *cmd = user_data; cmd 97 daemons/controld/controld_remote_ra.c if (!cmd) { cmd 100 daemons/controld/controld_remote_ra.c if (cmd->delay_id) { cmd 101 daemons/controld/controld_remote_ra.c g_source_remove(cmd->delay_id); cmd 103 daemons/controld/controld_remote_ra.c if (cmd->interval_id) { cmd 104 daemons/controld/controld_remote_ra.c g_source_remove(cmd->interval_id); cmd 106 daemons/controld/controld_remote_ra.c if (cmd->monitor_timeout_id) { cmd 107 daemons/controld/controld_remote_ra.c g_source_remove(cmd->monitor_timeout_id); cmd 109 daemons/controld/controld_remote_ra.c if (cmd->takeover_timeout_id) { cmd 110 daemons/controld/controld_remote_ra.c g_source_remove(cmd->takeover_timeout_id); cmd 112 daemons/controld/controld_remote_ra.c free(cmd->owner); cmd 113 daemons/controld/controld_remote_ra.c free(cmd->rsc_id); cmd 114 daemons/controld/controld_remote_ra.c free(cmd->action); cmd 115 daemons/controld/controld_remote_ra.c free(cmd->userdata); cmd 116 daemons/controld/controld_remote_ra.c free(cmd->exit_reason); cmd 117 daemons/controld/controld_remote_ra.c lrmd_key_value_freeall(cmd->params); cmd 118 daemons/controld/controld_remote_ra.c free(cmd); cmd 137 daemons/controld/controld_remote_ra.c remote_ra_cmd_t *cmd = data; cmd 140 daemons/controld/controld_remote_ra.c cmd->interval_id = 0; cmd 141 daemons/controld/controld_remote_ra.c connection_rsc = lrm_state_find(cmd->rsc_id); cmd 145 daemons/controld/controld_remote_ra.c ra_data->recurring_cmds = g_list_remove(ra_data->recurring_cmds, cmd); cmd 147 daemons/controld/controld_remote_ra.c ra_data->cmds = g_list_append(ra_data->cmds, cmd); cmd 156 daemons/controld/controld_remote_ra.c remote_ra_cmd_t *cmd = data; cmd 159 daemons/controld/controld_remote_ra.c cmd->delay_id = 0; cmd 160 daemons/controld/controld_remote_ra.c connection_rsc = lrm_state_find(cmd->rsc_id); cmd 299 daemons/controld/controld_remote_ra.c check_remote_node_state(remote_ra_cmd_t *cmd) cmd 302 daemons/controld/controld_remote_ra.c if (cmd->rc != PCMK_OCF_OK) { cmd 306 daemons/controld/controld_remote_ra.c if (pcmk__str_eq(cmd->action, "start", pcmk__str_casei)) { cmd 307 daemons/controld/controld_remote_ra.c remote_node_up(cmd->rsc_id); cmd 309 daemons/controld/controld_remote_ra.c } else if (pcmk__str_eq(cmd->action, "migrate_from", pcmk__str_casei)) { cmd 317 daemons/controld/controld_remote_ra.c crm_node_t *node = crm_remote_peer_get(cmd->rsc_id); cmd 322 daemons/controld/controld_remote_ra.c } else if (pcmk__str_eq(cmd->action, "stop", pcmk__str_casei)) { cmd 323 daemons/controld/controld_remote_ra.c lrm_state_t *lrm_state = lrm_state_find(cmd->rsc_id); cmd 329 daemons/controld/controld_remote_ra.c remote_node_down(cmd->rsc_id, DOWN_KEEP_LRM); cmd 335 daemons/controld/controld_remote_ra.c crm_remote_peer_cache_remove(cmd->rsc_id); cmd 352 daemons/controld/controld_remote_ra.c report_remote_ra_result(remote_ra_cmd_t * cmd) cmd 356 daemons/controld/controld_remote_ra.c check_remote_node_state(cmd); cmd 359 daemons/controld/controld_remote_ra.c op.rsc_id = cmd->rsc_id; cmd 360 daemons/controld/controld_remote_ra.c op.op_type = cmd->action; cmd 361 daemons/controld/controld_remote_ra.c op.user_data = cmd->userdata; cmd 362 daemons/controld/controld_remote_ra.c op.exit_reason = cmd->exit_reason; cmd 363 daemons/controld/controld_remote_ra.c op.timeout = cmd->timeout; cmd 364 daemons/controld/controld_remote_ra.c op.interval_ms = cmd->interval_ms; cmd 365 daemons/controld/controld_remote_ra.c op.rc = cmd->rc; cmd 366 daemons/controld/controld_remote_ra.c op.op_status = cmd->op_status; cmd 367 daemons/controld/controld_remote_ra.c op.t_run = (unsigned int) cmd->start_time; cmd 368 daemons/controld/controld_remote_ra.c op.t_rcchange = (unsigned int) cmd->start_time; cmd 369 daemons/controld/controld_remote_ra.c if (cmd->reported_success && cmd->rc != PCMK_OCF_OK) { cmd 385 daemons/controld/controld_remote_ra.c if (cmd->params) { cmd 389 daemons/controld/controld_remote_ra.c for (tmp = cmd->params; tmp; tmp = tmp->next) { cmd 394 daemons/controld/controld_remote_ra.c op.call_id = cmd->call_id; cmd 395 daemons/controld/controld_remote_ra.c op.remote_nodename = cmd->owner; cmd 405 daemons/controld/controld_remote_ra.c update_remaining_timeout(remote_ra_cmd_t * cmd) cmd 407 daemons/controld/controld_remote_ra.c cmd->remaining_timeout = ((cmd->timeout / 1000) - (time(NULL) - cmd->start_time)) * 1000; cmd 415 daemons/controld/controld_remote_ra.c remote_ra_cmd_t *cmd = NULL; cmd 421 daemons/controld/controld_remote_ra.c cmd = ra_data->cur_cmd; cmd 422 daemons/controld/controld_remote_ra.c if (!pcmk__strcase_any_of(cmd->action, "start", "migrate_from", NULL)) { cmd 425 daemons/controld/controld_remote_ra.c update_remaining_timeout(cmd); cmd 427 daemons/controld/controld_remote_ra.c if (cmd->remaining_timeout > 0) { cmd 428 daemons/controld/controld_remote_ra.c rc = handle_remote_ra_start(lrm_state, cmd, cmd->remaining_timeout); cmd 432 daemons/controld/controld_remote_ra.c cmd->rc = PCMK_OCF_UNKNOWN_ERROR; cmd 433 daemons/controld/controld_remote_ra.c cmd->op_status = PCMK_LRM_OP_ERROR; cmd 434 daemons/controld/controld_remote_ra.c report_remote_ra_result(cmd); cmd 440 daemons/controld/controld_remote_ra.c free_cmd(cmd); cmd 453 daemons/controld/controld_remote_ra.c remote_ra_cmd_t *cmd = data; cmd 455 daemons/controld/controld_remote_ra.c crm_info("takeover event timed out for node %s", cmd->rsc_id); cmd 456 daemons/controld/controld_remote_ra.c cmd->takeover_timeout_id = 0; cmd 458 daemons/controld/controld_remote_ra.c lrm_state = lrm_state_find(cmd->rsc_id); cmd 460 daemons/controld/controld_remote_ra.c handle_remote_ra_stop(lrm_state, cmd); cmd 461 daemons/controld/controld_remote_ra.c free_cmd(cmd); cmd 470 daemons/controld/controld_remote_ra.c remote_ra_cmd_t *cmd = data; cmd 472 daemons/controld/controld_remote_ra.c lrm_state = lrm_state_find(cmd->rsc_id); cmd 475 daemons/controld/controld_remote_ra.c cmd->rsc_id, (lrm_state? "" : " (no LRM state)")); cmd 476 daemons/controld/controld_remote_ra.c cmd->monitor_timeout_id = 0; cmd 477 daemons/controld/controld_remote_ra.c cmd->op_status = PCMK_LRM_OP_TIMEOUT; cmd 478 daemons/controld/controld_remote_ra.c cmd->rc = PCMK_OCF_UNKNOWN_ERROR; cmd 483 daemons/controld/controld_remote_ra.c if (ra_data->cur_cmd == cmd) { cmd 491 daemons/controld/controld_remote_ra.c report_remote_ra_result(cmd); cmd 492 daemons/controld/controld_remote_ra.c free_cmd(cmd); cmd 528 daemons/controld/controld_remote_ra.c remote_ra_cmd_t *cmd = NULL; cmd 600 daemons/controld/controld_remote_ra.c cmd = ra_data->cur_cmd; cmd 604 daemons/controld/controld_remote_ra.c if (op->type == lrmd_event_connect && pcmk__strcase_any_of(cmd->action, "start", cmd 607 daemons/controld/controld_remote_ra.c update_remaining_timeout(cmd); cmd 611 daemons/controld/controld_remote_ra.c cmd->op_status = PCMK_LRM_OP_ERROR; cmd 612 daemons/controld/controld_remote_ra.c cmd->rc = PCMK_OCF_INVALID_PARAM; cmd 613 daemons/controld/controld_remote_ra.c cmd->exit_reason = strdup("Authentication key not readable"); cmd 615 daemons/controld/controld_remote_ra.c } else if (cmd->remaining_timeout > 3000) { cmd 616 daemons/controld/controld_remote_ra.c crm_trace("rescheduling start, remaining timeout %d", cmd->remaining_timeout); cmd 622 daemons/controld/controld_remote_ra.c cmd->remaining_timeout); cmd 623 daemons/controld/controld_remote_ra.c cmd->op_status = PCMK_LRM_OP_TIMEOUT; cmd 624 daemons/controld/controld_remote_ra.c cmd->rc = PCMK_OCF_UNKNOWN_ERROR; cmd 629 daemons/controld/controld_remote_ra.c cmd->rc = PCMK_OCF_OK; cmd 630 daemons/controld/controld_remote_ra.c cmd->op_status = PCMK_LRM_OP_DONE; cmd 634 daemons/controld/controld_remote_ra.c crm_debug("Remote connection event matched %s action", cmd->action); cmd 635 daemons/controld/controld_remote_ra.c report_remote_ra_result(cmd); cmd 638 daemons/controld/controld_remote_ra.c } else if (op->type == lrmd_event_poke && pcmk__str_eq(cmd->action, "monitor", pcmk__str_casei)) { cmd 640 daemons/controld/controld_remote_ra.c if (cmd->monitor_timeout_id) { cmd 641 daemons/controld/controld_remote_ra.c g_source_remove(cmd->monitor_timeout_id); cmd 642 daemons/controld/controld_remote_ra.c cmd->monitor_timeout_id = 0; cmd 648 daemons/controld/controld_remote_ra.c if (!cmd->reported_success) { cmd 649 daemons/controld/controld_remote_ra.c cmd->rc = PCMK_OCF_OK; cmd 650 daemons/controld/controld_remote_ra.c cmd->op_status = PCMK_LRM_OP_DONE; cmd 651 daemons/controld/controld_remote_ra.c report_remote_ra_result(cmd); cmd 652 daemons/controld/controld_remote_ra.c cmd->reported_success = 1; cmd 655 daemons/controld/controld_remote_ra.c crm_debug("Remote poke event matched %s action", cmd->action); cmd 658 daemons/controld/controld_remote_ra.c if (cmd->interval_ms && (cmd->cancel == FALSE)) { cmd 659 daemons/controld/controld_remote_ra.c ra_data->recurring_cmds = g_list_append(ra_data->recurring_cmds, cmd); cmd 660 daemons/controld/controld_remote_ra.c cmd->interval_id = g_timeout_add(cmd->interval_ms, cmd 661 daemons/controld/controld_remote_ra.c recurring_helper, cmd); cmd 662 daemons/controld/controld_remote_ra.c cmd = NULL; /* prevent free */ cmd 666 daemons/controld/controld_remote_ra.c } else if (op->type == lrmd_event_disconnect && pcmk__str_eq(cmd->action, "monitor", pcmk__str_casei)) { cmd 667 daemons/controld/controld_remote_ra.c if (ra_data->active == TRUE && (cmd->cancel == FALSE)) { cmd 668 daemons/controld/controld_remote_ra.c cmd->rc = PCMK_OCF_UNKNOWN_ERROR; cmd 669 daemons/controld/controld_remote_ra.c cmd->op_status = PCMK_LRM_OP_ERROR; cmd 670 daemons/controld/controld_remote_ra.c report_remote_ra_result(cmd); cmd 676 daemons/controld/controld_remote_ra.c } else if (op->type == lrmd_event_new_client && pcmk__str_eq(cmd->action, "stop", pcmk__str_casei)) { cmd 678 daemons/controld/controld_remote_ra.c handle_remote_ra_stop(lrm_state, cmd); cmd 690 daemons/controld/controld_remote_ra.c free_cmd(cmd); cmd 695 daemons/controld/controld_remote_ra.c handle_remote_ra_stop(lrm_state_t * lrm_state, remote_ra_cmd_t * cmd) cmd 724 daemons/controld/controld_remote_ra.c if (cmd) { cmd 725 daemons/controld/controld_remote_ra.c cmd->rc = PCMK_OCF_OK; cmd 726 daemons/controld/controld_remote_ra.c cmd->op_status = PCMK_LRM_OP_DONE; cmd 728 daemons/controld/controld_remote_ra.c report_remote_ra_result(cmd); cmd 733 daemons/controld/controld_remote_ra.c handle_remote_ra_start(lrm_state_t * lrm_state, remote_ra_cmd_t * cmd, int timeout_ms) cmd 741 daemons/controld/controld_remote_ra.c for (tmp = cmd->params; tmp; tmp = tmp->next) { cmd 761 daemons/controld/controld_remote_ra.c remote_ra_cmd_t *cmd; cmd 771 daemons/controld/controld_remote_ra.c cmd = first->data; cmd 772 daemons/controld/controld_remote_ra.c if (cmd->delay_id) { cmd 780 daemons/controld/controld_remote_ra.c if (!strcmp(cmd->action, "start") || !strcmp(cmd->action, "migrate_from")) { cmd 782 daemons/controld/controld_remote_ra.c rc = handle_remote_ra_start(lrm_state, cmd, cmd->timeout); cmd 786 daemons/controld/controld_remote_ra.c cmd->action); cmd 787 daemons/controld/controld_remote_ra.c ra_data->cur_cmd = cmd; cmd 791 daemons/controld/controld_remote_ra.c cmd->action); cmd 792 daemons/controld/controld_remote_ra.c cmd->rc = PCMK_OCF_UNKNOWN_ERROR; cmd 793 daemons/controld/controld_remote_ra.c cmd->op_status = PCMK_LRM_OP_ERROR; cmd 795 daemons/controld/controld_remote_ra.c report_remote_ra_result(cmd); cmd 797 daemons/controld/controld_remote_ra.c } else if (!strcmp(cmd->action, "monitor")) { cmd 802 daemons/controld/controld_remote_ra.c cmd->rc = PCMK_OCF_UNKNOWN_ERROR; cmd 803 daemons/controld/controld_remote_ra.c cmd->op_status = PCMK_LRM_OP_ERROR; cmd 807 daemons/controld/controld_remote_ra.c cmd->op_status = PCMK_LRM_OP_DONE; cmd 808 daemons/controld/controld_remote_ra.c cmd->rc = PCMK_OCF_NOT_RUNNING; cmd 813 daemons/controld/controld_remote_ra.c cmd->rsc_id); cmd 814 daemons/controld/controld_remote_ra.c ra_data->cur_cmd = cmd; cmd 815 daemons/controld/controld_remote_ra.c cmd->monitor_timeout_id = g_timeout_add(cmd->timeout, monitor_timeout_cb, cmd); cmd 818 daemons/controld/controld_remote_ra.c report_remote_ra_result(cmd); cmd 820 daemons/controld/controld_remote_ra.c } else if (!strcmp(cmd->action, "stop")) { cmd 829 daemons/controld/controld_remote_ra.c cmd->takeover_timeout_id = g_timeout_add((cmd->timeout/2), connection_takeover_timeout_cb, cmd); cmd 830 daemons/controld/controld_remote_ra.c ra_data->cur_cmd = cmd; cmd 834 daemons/controld/controld_remote_ra.c handle_remote_ra_stop(lrm_state, cmd); cmd 836 daemons/controld/controld_remote_ra.c } else if (!strcmp(cmd->action, "migrate_to")) { cmd 838 daemons/controld/controld_remote_ra.c cmd->rc = PCMK_OCF_OK; cmd 839 daemons/controld/controld_remote_ra.c cmd->op_status = PCMK_LRM_OP_DONE; cmd 840 daemons/controld/controld_remote_ra.c report_remote_ra_result(cmd); cmd 841 daemons/controld/controld_remote_ra.c } else if (pcmk__str_any_of(cmd->action, CRMD_ACTION_RELOAD, cmd 852 daemons/controld/controld_remote_ra.c cmd->rc = PCMK_OCF_OK; cmd 853 daemons/controld/controld_remote_ra.c cmd->op_status = PCMK_LRM_OP_DONE; cmd 854 daemons/controld/controld_remote_ra.c report_remote_ra_result(cmd); cmd 857 daemons/controld/controld_remote_ra.c free_cmd(cmd); cmd 946 daemons/controld/controld_remote_ra.c remote_ra_cmd_t *cmd = NULL; cmd 950 daemons/controld/controld_remote_ra.c cmd = gIter->data; cmd 951 daemons/controld/controld_remote_ra.c if ((cmd->interval_ms > 0) && pcmk__str_eq(cmd->action, "monitor", pcmk__str_casei)) { cmd 952 daemons/controld/controld_remote_ra.c rm_list = g_list_append(rm_list, cmd); cmd 957 daemons/controld/controld_remote_ra.c cmd = gIter->data; cmd 959 daemons/controld/controld_remote_ra.c cmd->rc = PCMK_OCF_UNKNOWN_ERROR; cmd 960 daemons/controld/controld_remote_ra.c cmd->op_status = PCMK_LRM_OP_ERROR; cmd 962 daemons/controld/controld_remote_ra.c cmd->action, cmd->rsc_id, cmd->interval_ms, cmd->userdata); cmd 963 daemons/controld/controld_remote_ra.c report_remote_ra_result(cmd); cmd 965 daemons/controld/controld_remote_ra.c list = g_list_remove(list, cmd); cmd 966 daemons/controld/controld_remote_ra.c free_cmd(cmd); cmd 977 daemons/controld/controld_remote_ra.c remote_ra_cmd_t *cmd = NULL; cmd 981 daemons/controld/controld_remote_ra.c cmd = gIter->data; cmd 982 daemons/controld/controld_remote_ra.c if ((cmd->interval_ms == interval_ms) cmd 983 daemons/controld/controld_remote_ra.c && pcmk__str_eq(cmd->action, action, pcmk__str_casei)) { cmd 986 daemons/controld/controld_remote_ra.c cmd = NULL; cmd 988 daemons/controld/controld_remote_ra.c if (cmd) { cmd 989 daemons/controld/controld_remote_ra.c list = g_list_remove(list, cmd); cmd 990 daemons/controld/controld_remote_ra.c free_cmd(cmd); cmd 1026 daemons/controld/controld_remote_ra.c remote_ra_cmd_t *cmd = NULL; cmd 1043 daemons/controld/controld_remote_ra.c cmd = ra_data->cur_cmd; cmd 1048 daemons/controld/controld_remote_ra.c cmd = gIter->data; cmd 1049 daemons/controld/controld_remote_ra.c if ((cmd->interval_ms == interval_ms) cmd 1050 daemons/controld/controld_remote_ra.c && pcmk__str_eq(cmd->action, "monitor", pcmk__str_casei)) { cmd 1056 daemons/controld/controld_remote_ra.c cmd = gIter->data; cmd 1057 daemons/controld/controld_remote_ra.c if ((cmd->interval_ms == interval_ms) cmd 1058 daemons/controld/controld_remote_ra.c && pcmk__str_eq(cmd->action, "monitor", pcmk__str_casei)) { cmd 1068 daemons/controld/controld_remote_ra.c cmd->rsc_id, "monitor", interval_ms); cmd 1072 daemons/controld/controld_remote_ra.c free(cmd->userdata); cmd 1073 daemons/controld/controld_remote_ra.c cmd->userdata = strdup(userdata); cmd 1077 daemons/controld/controld_remote_ra.c if (cmd->reported_success) { cmd 1078 daemons/controld/controld_remote_ra.c cmd->start_time = time(NULL); cmd 1079 daemons/controld/controld_remote_ra.c cmd->call_id = generate_callid(); cmd 1080 daemons/controld/controld_remote_ra.c cmd->reported_success = 0; cmd 1086 daemons/controld/controld_remote_ra.c if (cmd->interval_id) { cmd 1087 daemons/controld/controld_remote_ra.c g_source_remove(cmd->interval_id); cmd 1088 daemons/controld/controld_remote_ra.c cmd->interval_id = 0; cmd 1089 daemons/controld/controld_remote_ra.c recurring_helper(cmd); cmd 1092 daemons/controld/controld_remote_ra.c return cmd; cmd 1104 daemons/controld/controld_remote_ra.c remote_ra_cmd_t *cmd = NULL; cmd 1121 daemons/controld/controld_remote_ra.c cmd = handle_dup_monitor(ra_data, interval_ms, userdata); cmd 1122 daemons/controld/controld_remote_ra.c if (cmd) { cmd 1123 daemons/controld/controld_remote_ra.c rc = cmd->call_id; cmd 1127 daemons/controld/controld_remote_ra.c cmd = calloc(1, sizeof(remote_ra_cmd_t)); cmd 1128 daemons/controld/controld_remote_ra.c cmd->owner = strdup(lrm_state->node_name); cmd 1129 daemons/controld/controld_remote_ra.c cmd->rsc_id = strdup(rsc_id); cmd 1130 daemons/controld/controld_remote_ra.c cmd->action = strdup(action); cmd 1131 daemons/controld/controld_remote_ra.c cmd->userdata = strdup(userdata); cmd 1132 daemons/controld/controld_remote_ra.c cmd->interval_ms = interval_ms; cmd 1133 daemons/controld/controld_remote_ra.c cmd->timeout = timeout; cmd 1134 daemons/controld/controld_remote_ra.c cmd->start_delay = start_delay; cmd 1135 daemons/controld/controld_remote_ra.c cmd->params = params; cmd 1136 daemons/controld/controld_remote_ra.c cmd->start_time = time(NULL); cmd 1138 daemons/controld/controld_remote_ra.c cmd->call_id = generate_callid(); cmd 1140 daemons/controld/controld_remote_ra.c if (cmd->start_delay) { cmd 1141 daemons/controld/controld_remote_ra.c cmd->delay_id = g_timeout_add(cmd->start_delay, start_delay_helper, cmd); cmd 1144 daemons/controld/controld_remote_ra.c ra_data->cmds = g_list_append(ra_data->cmds, cmd); cmd 1147 daemons/controld/controld_remote_ra.c return cmd->call_id; cmd 185 daemons/controld/controld_schedulerd.c pe_subsystem_send(xmlNode *cmd) cmd 188 daemons/controld/controld_schedulerd.c int sent = crm_ipc_send(mainloop_get_ipc_client(pe_subsystem), cmd, cmd 420 daemons/controld/controld_schedulerd.c xmlNode *cmd = NULL; cmd 467 daemons/controld/controld_schedulerd.c cmd = create_request(CRM_OP_PECALC, output, NULL, CRM_SYSTEM_PENGINE, CRM_SYSTEM_DC, NULL); cmd 469 daemons/controld/controld_schedulerd.c rc = pe_subsystem_send(cmd); cmd 475 daemons/controld/controld_schedulerd.c controld_expect_sched_reply(cmd); cmd 479 daemons/controld/controld_schedulerd.c free_xml(cmd); cmd 52 daemons/controld/controld_te_actions.c xmlNode *cmd = NULL; cmd 58 daemons/controld/controld_te_actions.c cmd = create_request(task, pseudo->xml, node->uname, cmd 60 daemons/controld/controld_te_actions.c send_cluster_message(node, crm_msg_crmd, cmd, FALSE); cmd 61 daemons/controld/controld_te_actions.c free_xml(cmd); cmd 90 daemons/controld/controld_te_actions.c xmlNode *cmd = NULL; cmd 149 daemons/controld/controld_te_actions.c cmd = create_request(task, action->xml, router_node, CRM_SYSTEM_CRMD, CRM_SYSTEM_TENGINE, NULL); cmd 153 daemons/controld/controld_te_actions.c crm_xml_add(cmd, XML_ATTR_TRANSITION_KEY, counter); cmd 155 daemons/controld/controld_te_actions.c rc = send_cluster_message(crm_get_peer(0, router_node), crm_msg_crmd, cmd, TRUE); cmd 157 daemons/controld/controld_te_actions.c free_xml(cmd); cmd 274 daemons/controld/controld_te_actions.c xmlNode *cmd = NULL; cmd 324 daemons/controld/controld_te_actions.c cmd = create_request(CRM_OP_INVOKE_LRM, rsc_op, router_node, cmd 330 daemons/controld/controld_te_actions.c .msg = cmd, cmd 347 daemons/controld/controld_te_actions.c rc = send_cluster_message(crm_get_peer(0, router_node), crm_msg_lrmd, cmd, TRUE); cmd 351 daemons/controld/controld_te_actions.c free_xml(cmd); cmd 30 daemons/controld/pacemaker-controld.c void usage(const char *cmd, int exit_status); cmd 102 daemons/execd/execd_commands.c static void cmd_finalize(lrmd_cmd_t * cmd, lrmd_rsc_t * rsc); cmd 190 daemons/execd/execd_commands.c cmd_original_times(lrmd_cmd_t * cmd) cmd 192 daemons/execd/execd_commands.c cmd->t_run = cmd->t_first_run; cmd 193 daemons/execd/execd_commands.c cmd->t_queue = cmd->t_first_queue; cmd 198 daemons/execd/execd_commands.c action_matches(lrmd_cmd_t *cmd, const char *action, guint interval_ms) cmd 200 daemons/execd/execd_commands.c return (cmd->interval_ms == interval_ms) cmd 201 daemons/execd/execd_commands.c && pcmk__str_eq(cmd->action, action, pcmk__str_casei); cmd 205 daemons/execd/execd_commands.c log_finished(lrmd_cmd_t * cmd, int exec_time, int queue_time) cmd 210 daemons/execd/execd_commands.c if (cmd->last_pid) { cmd 211 daemons/execd/execd_commands.c snprintf(pid_str, 32, "%d", cmd->last_pid); cmd 214 daemons/execd/execd_commands.c if (pcmk__str_eq(cmd->action, "monitor", pcmk__str_casei)) { cmd 220 daemons/execd/execd_commands.c cmd->rsc_id, cmd->action, cmd->call_id, cmd 221 daemons/execd/execd_commands.c (cmd->last_pid? ", PID " : ""), pid_str, cmd->exec_rc, cmd 225 daemons/execd/execd_commands.c cmd->rsc_id, cmd->action, cmd->call_id, cmd 226 daemons/execd/execd_commands.c (cmd->last_pid? ", PID " : ""), pid_str, cmd->exec_rc); cmd 231 daemons/execd/execd_commands.c log_execute(lrmd_cmd_t * cmd) cmd 235 daemons/execd/execd_commands.c if (pcmk__str_eq(cmd->action, "monitor", pcmk__str_casei)) { cmd 240 daemons/execd/execd_commands.c cmd->rsc_id, cmd->action, cmd->call_id); cmd 277 daemons/execd/execd_commands.c lrmd_cmd_t *cmd = NULL; cmd 279 daemons/execd/execd_commands.c cmd = calloc(1, sizeof(lrmd_cmd_t)); cmd 282 daemons/execd/execd_commands.c cmd->call_opts = call_options; cmd 283 daemons/execd/execd_commands.c cmd->client_id = strdup(client->id); cmd 285 daemons/execd/execd_commands.c crm_element_value_int(msg, F_LRMD_CALLID, &cmd->call_id); cmd 286 daemons/execd/execd_commands.c crm_element_value_ms(rsc_xml, F_LRMD_RSC_INTERVAL, &cmd->interval_ms); cmd 287 daemons/execd/execd_commands.c crm_element_value_int(rsc_xml, F_LRMD_TIMEOUT, &cmd->timeout); cmd 288 daemons/execd/execd_commands.c crm_element_value_int(rsc_xml, F_LRMD_RSC_START_DELAY, &cmd->start_delay); cmd 289 daemons/execd/execd_commands.c cmd->timeout_orig = cmd->timeout; cmd 291 daemons/execd/execd_commands.c cmd->origin = crm_element_value_copy(rsc_xml, F_LRMD_ORIGIN); cmd 292 daemons/execd/execd_commands.c cmd->action = crm_element_value_copy(rsc_xml, F_LRMD_RSC_ACTION); cmd 293 daemons/execd/execd_commands.c cmd->userdata_str = crm_element_value_copy(rsc_xml, F_LRMD_RSC_USERDATA_STR); cmd 294 daemons/execd/execd_commands.c cmd->rsc_id = crm_element_value_copy(rsc_xml, F_LRMD_RSC_ID); cmd 296 daemons/execd/execd_commands.c cmd->params = xml2list(rsc_xml); cmd 298 daemons/execd/execd_commands.c if (pcmk__str_eq(g_hash_table_lookup(cmd->params, "CRM_meta_on_fail"), "block", pcmk__str_casei)) { cmd 301 daemons/execd/execd_commands.c cmd->rsc_id, cmd->action, cmd->interval_ms); cmd 302 daemons/execd/execd_commands.c cmd->service_flags = pcmk__set_flags_as(__func__, __LINE__, cmd 304 daemons/execd/execd_commands.c cmd->action, 0, cmd 308 daemons/execd/execd_commands.c return cmd; cmd 312 daemons/execd/execd_commands.c stop_recurring_timer(lrmd_cmd_t *cmd) cmd 314 daemons/execd/execd_commands.c if (cmd) { cmd 315 daemons/execd/execd_commands.c if (cmd->stonith_recurring_id) { cmd 316 daemons/execd/execd_commands.c g_source_remove(cmd->stonith_recurring_id); cmd 318 daemons/execd/execd_commands.c cmd->stonith_recurring_id = 0; cmd 323 daemons/execd/execd_commands.c free_lrmd_cmd(lrmd_cmd_t * cmd) cmd 325 daemons/execd/execd_commands.c stop_recurring_timer(cmd); cmd 326 daemons/execd/execd_commands.c if (cmd->delay_id) { cmd 327 daemons/execd/execd_commands.c g_source_remove(cmd->delay_id); cmd 329 daemons/execd/execd_commands.c if (cmd->params) { cmd 330 daemons/execd/execd_commands.c g_hash_table_destroy(cmd->params); cmd 332 daemons/execd/execd_commands.c free(cmd->origin); cmd 333 daemons/execd/execd_commands.c free(cmd->action); cmd 334 daemons/execd/execd_commands.c free(cmd->real_action); cmd 335 daemons/execd/execd_commands.c free(cmd->userdata_str); cmd 336 daemons/execd/execd_commands.c free(cmd->rsc_id); cmd 337 daemons/execd/execd_commands.c free(cmd->output); cmd 338 daemons/execd/execd_commands.c free(cmd->exit_reason); cmd 339 daemons/execd/execd_commands.c free(cmd->client_id); cmd 340 daemons/execd/execd_commands.c free(cmd); cmd 346 daemons/execd/execd_commands.c lrmd_cmd_t *cmd = data; cmd 349 daemons/execd/execd_commands.c cmd->stonith_recurring_id = 0; cmd 351 daemons/execd/execd_commands.c if (!cmd->rsc_id) { cmd 355 daemons/execd/execd_commands.c rsc = g_hash_table_lookup(rsc_list, cmd->rsc_id); cmd 360 daemons/execd/execd_commands.c rsc->recurring_ops = g_list_remove(rsc->recurring_ops, cmd); cmd 361 daemons/execd/execd_commands.c rsc->pending_ops = g_list_append(rsc->pending_ops, cmd); cmd 363 daemons/execd/execd_commands.c get_current_time(&(cmd->t_queue), &(cmd->t_first_queue)); cmd 371 daemons/execd/execd_commands.c start_recurring_timer(lrmd_cmd_t *cmd) cmd 373 daemons/execd/execd_commands.c if (cmd && (cmd->interval_ms > 0)) { cmd 374 daemons/execd/execd_commands.c cmd->stonith_recurring_id = g_timeout_add(cmd->interval_ms, cmd 376 daemons/execd/execd_commands.c cmd); cmd 383 daemons/execd/execd_commands.c lrmd_cmd_t *cmd = data; cmd 386 daemons/execd/execd_commands.c cmd->delay_id = 0; cmd 387 daemons/execd/execd_commands.c rsc = cmd->rsc_id ? g_hash_table_lookup(rsc_list, cmd->rsc_id) : NULL; cmd 401 daemons/execd/execd_commands.c find_duplicate_action(GList *action_list, lrmd_cmd_t *cmd) cmd 406 daemons/execd/execd_commands.c if (action_matches(cmd, dup->action, dup->interval_ms)) { cmd 414 daemons/execd/execd_commands.c merge_recurring_duplicate(lrmd_rsc_t * rsc, lrmd_cmd_t * cmd) cmd 419 daemons/execd/execd_commands.c if (cmd->interval_ms == 0) { cmd 424 daemons/execd/execd_commands.c dup = find_duplicate_action(rsc->pending_ops, cmd); cmd 427 daemons/execd/execd_commands.c dup = find_duplicate_action(rsc->recurring_ops, cmd); cmd 453 daemons/execd/execd_commands.c dup->userdata_str = cmd->userdata_str; cmd 454 daemons/execd/execd_commands.c cmd->userdata_str = NULL; cmd 455 daemons/execd/execd_commands.c dup->call_id = cmd->call_id; cmd 456 daemons/execd/execd_commands.c free_lrmd_cmd(cmd); cmd 457 daemons/execd/execd_commands.c cmd = NULL; cmd 478 daemons/execd/execd_commands.c schedule_lrmd_cmd(lrmd_rsc_t * rsc, lrmd_cmd_t * cmd) cmd 480 daemons/execd/execd_commands.c CRM_CHECK(cmd != NULL, return); cmd 483 daemons/execd/execd_commands.c crm_trace("Scheduling %s on %s", cmd->action, rsc->rsc_id); cmd 485 daemons/execd/execd_commands.c if (merge_recurring_duplicate(rsc, cmd)) { cmd 493 daemons/execd/execd_commands.c if (pcmk__str_eq(cmd->action, "stop", pcmk__str_casei)) { cmd 497 daemons/execd/execd_commands.c rsc->pending_ops = g_list_append(rsc->pending_ops, cmd); cmd 499 daemons/execd/execd_commands.c get_current_time(&(cmd->t_queue), &(cmd->t_first_queue)); cmd 503 daemons/execd/execd_commands.c if (cmd->start_delay) { cmd 504 daemons/execd/execd_commands.c cmd->delay_id = g_timeout_add(cmd->start_delay, start_delay_helper, cmd); cmd 564 daemons/execd/execd_commands.c send_cmd_complete_notify(lrmd_cmd_t * cmd) cmd 569 daemons/execd/execd_commands.c int exec_time = time_diff_ms(NULL, &(cmd->t_run)); cmd 570 daemons/execd/execd_commands.c int queue_time = time_diff_ms(&cmd->t_run, &(cmd->t_queue)); cmd 572 daemons/execd/execd_commands.c log_finished(cmd, exec_time, queue_time); cmd 574 daemons/execd/execd_commands.c log_finished(cmd, 0, 0); cmd 580 daemons/execd/execd_commands.c if (cmd->first_notify_sent && (cmd->call_opts & lrmd_opt_notify_changes_only)) { cmd 581 daemons/execd/execd_commands.c if (cmd->last_notify_rc == cmd->exec_rc && cmd 582 daemons/execd/execd_commands.c cmd->last_notify_op_status == cmd->lrmd_op_status) { cmd 590 daemons/execd/execd_commands.c cmd->first_notify_sent = true; cmd 591 daemons/execd/execd_commands.c cmd->last_notify_rc = cmd->exec_rc; cmd 592 daemons/execd/execd_commands.c cmd->last_notify_op_status = cmd->lrmd_op_status; cmd 597 daemons/execd/execd_commands.c crm_xml_add_int(notify, F_LRMD_TIMEOUT, cmd->timeout); cmd 598 daemons/execd/execd_commands.c crm_xml_add_ms(notify, F_LRMD_RSC_INTERVAL, cmd->interval_ms); cmd 599 daemons/execd/execd_commands.c crm_xml_add_int(notify, F_LRMD_RSC_START_DELAY, cmd->start_delay); cmd 600 daemons/execd/execd_commands.c crm_xml_add_int(notify, F_LRMD_EXEC_RC, cmd->exec_rc); cmd 601 daemons/execd/execd_commands.c crm_xml_add_int(notify, F_LRMD_OP_STATUS, cmd->lrmd_op_status); cmd 602 daemons/execd/execd_commands.c crm_xml_add_int(notify, F_LRMD_CALLID, cmd->call_id); cmd 603 daemons/execd/execd_commands.c crm_xml_add_int(notify, F_LRMD_RSC_DELETED, cmd->rsc_deleted); cmd 606 daemons/execd/execd_commands.c (long long) cmd->epoch_last_run); cmd 608 daemons/execd/execd_commands.c (long long) cmd->epoch_rcchange); cmd 615 daemons/execd/execd_commands.c crm_xml_add(notify, F_LRMD_RSC_ID, cmd->rsc_id); cmd 616 daemons/execd/execd_commands.c if(cmd->real_action) { cmd 617 daemons/execd/execd_commands.c crm_xml_add(notify, F_LRMD_RSC_ACTION, cmd->real_action); cmd 619 daemons/execd/execd_commands.c crm_xml_add(notify, F_LRMD_RSC_ACTION, cmd->action); cmd 621 daemons/execd/execd_commands.c crm_xml_add(notify, F_LRMD_RSC_USERDATA_STR, cmd->userdata_str); cmd 622 daemons/execd/execd_commands.c crm_xml_add(notify, F_LRMD_RSC_OUTPUT, cmd->output); cmd 623 daemons/execd/execd_commands.c crm_xml_add(notify, F_LRMD_RSC_EXIT_REASON, cmd->exit_reason); cmd 625 daemons/execd/execd_commands.c if (cmd->params) { cmd 632 daemons/execd/execd_commands.c g_hash_table_iter_init(&iter, cmd->params); cmd 637 daemons/execd/execd_commands.c if (cmd->client_id && (cmd->call_opts & lrmd_opt_notify_orig_only)) { cmd 638 daemons/execd/execd_commands.c pcmk__client_t *client = pcmk__find_client_by_id(cmd->client_id); cmd 676 daemons/execd/execd_commands.c cmd_reset(lrmd_cmd_t * cmd) cmd 678 daemons/execd/execd_commands.c cmd->lrmd_op_status = 0; cmd 679 daemons/execd/execd_commands.c cmd->last_pid = 0; cmd 681 daemons/execd/execd_commands.c memset(&cmd->t_run, 0, sizeof(cmd->t_run)); cmd 682 daemons/execd/execd_commands.c memset(&cmd->t_queue, 0, sizeof(cmd->t_queue)); cmd 684 daemons/execd/execd_commands.c cmd->epoch_last_run = 0; cmd 685 daemons/execd/execd_commands.c free(cmd->exit_reason); cmd 686 daemons/execd/execd_commands.c cmd->exit_reason = NULL; cmd 687 daemons/execd/execd_commands.c free(cmd->output); cmd 688 daemons/execd/execd_commands.c cmd->output = NULL; cmd 692 daemons/execd/execd_commands.c cmd_finalize(lrmd_cmd_t * cmd, lrmd_rsc_t * rsc) cmd 694 daemons/execd/execd_commands.c crm_trace("Resource operation rsc:%s action:%s completed (%p %p)", cmd->rsc_id, cmd->action, cmd 695 daemons/execd/execd_commands.c rsc ? rsc->active : NULL, cmd); cmd 697 daemons/execd/execd_commands.c if (rsc && (rsc->active == cmd)) { cmd 703 daemons/execd/execd_commands.c cmd->rsc_deleted = 1; cmd 707 daemons/execd/execd_commands.c cmd->timeout = cmd->timeout_orig; cmd 709 daemons/execd/execd_commands.c send_cmd_complete_notify(cmd); cmd 711 daemons/execd/execd_commands.c if (cmd->interval_ms && (cmd->lrmd_op_status == PCMK_LRM_OP_CANCELLED)) { cmd 713 daemons/execd/execd_commands.c rsc->recurring_ops = g_list_remove(rsc->recurring_ops, cmd); cmd 714 daemons/execd/execd_commands.c rsc->pending_ops = g_list_remove(rsc->pending_ops, cmd); cmd 716 daemons/execd/execd_commands.c free_lrmd_cmd(cmd); cmd 717 daemons/execd/execd_commands.c } else if (cmd->interval_ms == 0) { cmd 719 daemons/execd/execd_commands.c rsc->pending_ops = g_list_remove(rsc->pending_ops, cmd); cmd 721 daemons/execd/execd_commands.c free_lrmd_cmd(cmd); cmd 724 daemons/execd/execd_commands.c cmd_reset(cmd); cmd 831 daemons/execd/execd_commands.c lrmd_cmd_t *cmd = action->cb_data; cmd 832 daemons/execd/execd_commands.c return get_uniform_rc(action->standard, cmd->action, action->rc); cmd 920 daemons/execd/execd_commands.c lrmd_cmd_t *cmd = action->cb_data; cmd 927 daemons/execd/execd_commands.c if (!cmd) { cmd 934 daemons/execd/execd_commands.c if (cmd->exec_rc != action->rc) { cmd 935 daemons/execd/execd_commands.c cmd->epoch_rcchange = time(NULL); cmd 939 daemons/execd/execd_commands.c cmd->last_pid = action->pid; cmd 940 daemons/execd/execd_commands.c cmd->exec_rc = action_get_uniform_rc(action); cmd 941 daemons/execd/execd_commands.c cmd->lrmd_op_status = action->status; cmd 942 daemons/execd/execd_commands.c rsc = cmd->rsc_id ? g_hash_table_lookup(rsc_list, cmd->rsc_id) : NULL; cmd 952 daemons/execd/execd_commands.c if ((cmd->exec_rc == PCMK_OCF_OK) cmd 953 daemons/execd/execd_commands.c && pcmk__strcase_any_of(cmd->action, "start", "stop", NULL)) { cmd 960 daemons/execd/execd_commands.c cmd->real_action = cmd->action; cmd 961 daemons/execd/execd_commands.c cmd->action = strdup("monitor"); cmd 963 daemons/execd/execd_commands.c } else if (cmd->real_action != NULL) { cmd 965 daemons/execd/execd_commands.c if ((cmd->lrmd_op_status == PCMK_LRM_OP_DONE) cmd 966 daemons/execd/execd_commands.c && (cmd->exec_rc == PCMK_OCF_PENDING)) { cmd 969 daemons/execd/execd_commands.c } else if ((cmd->exec_rc == PCMK_OCF_OK) cmd 970 daemons/execd/execd_commands.c && pcmk__str_eq(cmd->real_action, "stop", pcmk__str_casei)) { cmd 974 daemons/execd/execd_commands.c int time_sum = time_diff_ms(NULL, &(cmd->t_first_run)); cmd 975 daemons/execd/execd_commands.c int timeout_left = cmd->timeout_orig - time_sum; cmd 979 daemons/execd/execd_commands.c cmd->rsc_id, cmd->real_action, time_sum, timeout_left, cmd 980 daemons/execd/execd_commands.c services_ocf_exitcode_str(cmd->exec_rc), cmd 981 daemons/execd/execd_commands.c cmd->exec_rc); cmd 982 daemons/execd/execd_commands.c cmd_original_times(cmd); cmd 985 daemons/execd/execd_commands.c if ((cmd->lrmd_op_status == PCMK_LRM_OP_DONE) cmd 986 daemons/execd/execd_commands.c && (cmd->exec_rc == PCMK_OCF_NOT_RUNNING)) { cmd 988 daemons/execd/execd_commands.c if (pcmk__str_eq(cmd->real_action, "start", pcmk__str_casei)) { cmd 989 daemons/execd/execd_commands.c cmd->exec_rc = PCMK_OCF_UNKNOWN_ERROR; cmd 990 daemons/execd/execd_commands.c } else if (pcmk__str_eq(cmd->real_action, "stop", pcmk__str_casei)) { cmd 991 daemons/execd/execd_commands.c cmd->exec_rc = PCMK_OCF_OK; cmd 1001 daemons/execd/execd_commands.c if (action_matches(cmd, "monitor", 0) cmd 1002 daemons/execd/execd_commands.c && (cmd->exec_rc == PCMK_OCF_OK)) { cmd 1004 daemons/execd/execd_commands.c cmd->exec_rc = PCMK_OCF_NOT_RUNNING; cmd 1006 daemons/execd/execd_commands.c } else if (pcmk__str_eq(cmd->action, "start", pcmk__str_casei) && cmd->exec_rc != PCMK_OCF_OK) { cmd 1016 daemons/execd/execd_commands.c int time_sum = time_diff_ms(NULL, &(cmd->t_first_run)); cmd 1017 daemons/execd/execd_commands.c int timeout_left = cmd->timeout_orig - time_sum; cmd 1018 daemons/execd/execd_commands.c int delay = cmd->timeout_orig / 10; cmd 1026 daemons/execd/execd_commands.c cmd->start_delay = delay; cmd 1027 daemons/execd/execd_commands.c cmd->timeout = timeout_left; cmd 1029 daemons/execd/execd_commands.c if(cmd->exec_rc == PCMK_OCF_OK) { cmd 1031 daemons/execd/execd_commands.c cmd->rsc_id, cmd->real_action, time_sum, timeout_left, delay); cmd 1033 daemons/execd/execd_commands.c } else if(cmd->exec_rc == PCMK_OCF_PENDING) { cmd 1035 daemons/execd/execd_commands.c cmd->rsc_id, cmd->action, time_sum, timeout_left, delay); cmd 1039 daemons/execd/execd_commands.c cmd->rsc_id, cmd->action, services_ocf_exitcode_str(cmd->exec_rc), cmd->exec_rc, time_sum, timeout_left, delay); cmd 1042 daemons/execd/execd_commands.c cmd_reset(cmd); cmd 1046 daemons/execd/execd_commands.c schedule_lrmd_cmd(rsc, cmd); cmd 1053 daemons/execd/execd_commands.c cmd->rsc_id, cmd->real_action?cmd->real_action:cmd->action, cmd->exec_rc, time_sum, timeout_left); cmd 1054 daemons/execd/execd_commands.c cmd->lrmd_op_status = PCMK_LRM_OP_TIMEOUT; cmd 1055 daemons/execd/execd_commands.c cmd->exec_rc = PCMK_OCF_TIMEOUT; cmd 1056 daemons/execd/execd_commands.c cmd_original_times(cmd); cmd 1062 daemons/execd/execd_commands.c cmd->output = strdup(action->stderr_data); cmd 1063 daemons/execd/execd_commands.c cmd->exit_reason = parse_exit_reason(action->stderr_data); cmd 1066 daemons/execd/execd_commands.c cmd->output = strdup(action->stdout_data); cmd 1069 daemons/execd/execd_commands.c cmd_finalize(cmd, rsc); cmd 1123 daemons/execd/execd_commands.c stonith_action_complete(lrmd_cmd_t * cmd, int rc) cmd 1126 daemons/execd/execd_commands.c lrmd_rsc_t *rsc = g_hash_table_lookup(rsc_list, cmd->rsc_id); cmd 1128 daemons/execd/execd_commands.c cmd->exec_rc = stonith2uniform_rc(cmd->action, rc); cmd 1134 daemons/execd/execd_commands.c if (cmd->lrmd_op_status != PCMK_LRM_OP_CANCELLED) { cmd 1135 daemons/execd/execd_commands.c cmd->lrmd_op_status = stonith_rc2status(cmd->action, cmd->interval_ms, cmd 1139 daemons/execd/execd_commands.c if (rsc && (cmd->exec_rc == PCMK_OCF_OK)) { cmd 1140 daemons/execd/execd_commands.c if (pcmk__str_eq(cmd->action, "start", pcmk__str_casei)) { cmd 1142 daemons/execd/execd_commands.c } else if (pcmk__str_eq(cmd->action, "stop", pcmk__str_casei)) { cmd 1151 daemons/execd/execd_commands.c stop_recurring_timer(cmd); cmd 1157 daemons/execd/execd_commands.c if (rsc && (cmd->interval_ms > 0) cmd 1158 daemons/execd/execd_commands.c && (cmd->lrmd_op_status != PCMK_LRM_OP_CANCELLED)) { cmd 1159 daemons/execd/execd_commands.c start_recurring_timer(cmd); cmd 1162 daemons/execd/execd_commands.c cmd_finalize(cmd, rsc); cmd 1234 daemons/execd/execd_commands.c execd_stonith_start(stonith_t *stonith_api, lrmd_rsc_t *rsc, lrmd_cmd_t *cmd) cmd 1242 daemons/execd/execd_commands.c if (cmd->params) { cmd 1245 daemons/execd/execd_commands.c g_hash_table_iter_init(&iter, cmd->params); cmd 1258 daemons/execd/execd_commands.c cmd->rsc_id, rsc->provider, cmd 1298 daemons/execd/execd_commands.c execd_stonith_monitor(stonith_t *stonith_api, lrmd_rsc_t *rsc, lrmd_cmd_t *cmd) cmd 1300 daemons/execd/execd_commands.c int rc = stonith_api->cmds->monitor(stonith_api, 0, cmd->rsc_id, cmd 1301 daemons/execd/execd_commands.c cmd->timeout / 1000); cmd 1303 daemons/execd/execd_commands.c rc = stonith_api->cmds->register_callback(stonith_api, rc, 0, 0, cmd, cmd 1307 daemons/execd/execd_commands.c rsc->active = cmd; cmd 1316 daemons/execd/execd_commands.c lrmd_rsc_execute_stonith(lrmd_rsc_t * rsc, lrmd_cmd_t * cmd) cmd 1326 daemons/execd/execd_commands.c } else if (pcmk__str_eq(cmd->action, "start", pcmk__str_casei)) { cmd 1327 daemons/execd/execd_commands.c rc = execd_stonith_start(stonith_api, rsc, cmd); cmd 1332 daemons/execd/execd_commands.c } else if (pcmk__str_eq(cmd->action, "stop", pcmk__str_casei)) { cmd 1335 daemons/execd/execd_commands.c } else if (pcmk__str_eq(cmd->action, "monitor", pcmk__str_casei)) { cmd 1336 daemons/execd/execd_commands.c if (cmd->interval_ms > 0) { cmd 1344 daemons/execd/execd_commands.c rc = execd_stonith_monitor(stonith_api, rsc, cmd); cmd 1351 daemons/execd/execd_commands.c stonith_action_complete(cmd, rc); cmd 1355 daemons/execd/execd_commands.c lrmd_rsc_execute_service_lib(lrmd_rsc_t * rsc, lrmd_cmd_t * cmd) cmd 1361 daemons/execd/execd_commands.c CRM_ASSERT(cmd); cmd 1364 daemons/execd/execd_commands.c rsc->rsc_id, cmd->action, rsc->class, rsc->provider, rsc->type); cmd 1369 daemons/execd/execd_commands.c && pcmk__str_eq(cmd->action, "stop", pcmk__str_casei)) { cmd 1371 daemons/execd/execd_commands.c cmd->exec_rc = PCMK_OCF_OK; cmd 1376 daemons/execd/execd_commands.c params_copy = pcmk__str_table_dup(cmd->params); cmd 1380 daemons/execd/execd_commands.c normalize_action_name(rsc, cmd->action), cmd 1381 daemons/execd/execd_commands.c cmd->interval_ms, cmd->timeout, cmd 1382 daemons/execd/execd_commands.c params_copy, cmd->service_flags); cmd 1385 daemons/execd/execd_commands.c crm_err("Failed to create action, action:%s on resource %s", cmd->action, rsc->rsc_id); cmd 1386 daemons/execd/execd_commands.c cmd->exec_rc = PCMK_OCF_UNKNOWN_ERROR; cmd 1387 daemons/execd/execd_commands.c cmd->lrmd_op_status = PCMK_LRM_OP_ERROR; cmd 1392 daemons/execd/execd_commands.c cmd->exec_rc = action->rc; cmd 1393 daemons/execd/execd_commands.c cmd->lrmd_op_status = action->status; cmd 1398 daemons/execd/execd_commands.c action->cb_data = cmd; cmd 1410 daemons/execd/execd_commands.c cmd->exec_rc = action->rc; cmd 1412 daemons/execd/execd_commands.c cmd->lrmd_op_status = action->status; cmd 1414 daemons/execd/execd_commands.c cmd->lrmd_op_status = PCMK_LRM_OP_ERROR; cmd 1420 daemons/execd/execd_commands.c cmd_finalize(cmd, rsc); cmd 1427 daemons/execd/execd_commands.c lrmd_cmd_t *cmd = NULL; cmd 1439 daemons/execd/execd_commands.c cmd = first->data; cmd 1440 daemons/execd/execd_commands.c if (cmd->delay_id) { cmd 1443 daemons/execd/execd_commands.c cmd->rsc_id, cmd->action, cmd->start_delay); cmd 1450 daemons/execd/execd_commands.c get_current_time(&(cmd->t_run), &(cmd->t_first_run)); cmd 1452 daemons/execd/execd_commands.c cmd->epoch_last_run = time(NULL); cmd 1455 daemons/execd/execd_commands.c if (!cmd) { cmd 1460 daemons/execd/execd_commands.c rsc->active = cmd; /* only one op at a time for a rsc */ cmd 1461 daemons/execd/execd_commands.c if (cmd->interval_ms) { cmd 1462 daemons/execd/execd_commands.c rsc->recurring_ops = g_list_append(rsc->recurring_ops, cmd); cmd 1465 daemons/execd/execd_commands.c log_execute(cmd); cmd 1468 daemons/execd/execd_commands.c lrmd_rsc_execute_stonith(rsc, cmd); cmd 1470 daemons/execd/execd_commands.c lrmd_rsc_execute_service_lib(rsc, cmd); cmd 1493 daemons/execd/execd_commands.c lrmd_cmd_t *cmd = gIter->data; cmd 1496 daemons/execd/execd_commands.c cmd->lrmd_op_status = PCMK_LRM_OP_CANCELLED; cmd 1497 daemons/execd/execd_commands.c cmd_finalize(cmd, NULL); cmd 1507 daemons/execd/execd_commands.c lrmd_cmd_t *cmd = gIter->data; cmd 1510 daemons/execd/execd_commands.c cmd->lrmd_op_status = PCMK_LRM_OP_CANCELLED; cmd 1515 daemons/execd/execd_commands.c if (rsc->active != cmd) { cmd 1516 daemons/execd/execd_commands.c cmd_finalize(cmd, NULL); cmd 1524 daemons/execd/execd_commands.c normalize_action_name(rsc, cmd->action), cmd 1525 daemons/execd/execd_commands.c cmd->interval_ms); cmd 1663 daemons/execd/execd_commands.c lrmd_cmd_t *cmd = NULL; cmd 1677 daemons/execd/execd_commands.c cmd = create_lrmd_cmd(request, client); cmd 1678 daemons/execd/execd_commands.c call_id = cmd->call_id; cmd 1682 daemons/execd/execd_commands.c schedule_lrmd_cmd(rsc, cmd); cmd 1709 daemons/execd/execd_commands.c lrmd_cmd_t *cmd = gIter->data; cmd 1711 daemons/execd/execd_commands.c if (action_matches(cmd, action, interval_ms)) { cmd 1712 daemons/execd/execd_commands.c cmd->lrmd_op_status = PCMK_LRM_OP_CANCELLED; cmd 1713 daemons/execd/execd_commands.c cmd_finalize(cmd, rsc); cmd 1722 daemons/execd/execd_commands.c lrmd_cmd_t *cmd = gIter->data; cmd 1724 daemons/execd/execd_commands.c if (action_matches(cmd, action, interval_ms)) { cmd 1725 daemons/execd/execd_commands.c cmd->lrmd_op_status = PCMK_LRM_OP_CANCELLED; cmd 1726 daemons/execd/execd_commands.c if (rsc->active != cmd) { cmd 1727 daemons/execd/execd_commands.c cmd_finalize(cmd, rsc); cmd 1768 daemons/execd/execd_commands.c lrmd_cmd_t *cmd = cmd_iter->data; cmd 1770 daemons/execd/execd_commands.c if (cmd->interval_ms == 0) { cmd 1774 daemons/execd/execd_commands.c if (client_id && !pcmk__str_eq(cmd->client_id, client_id, pcmk__str_casei)) { cmd 1778 daemons/execd/execd_commands.c cancel_op(rsc->rsc_id, cmd->action, cmd->interval_ms); cmd 1808 daemons/execd/execd_commands.c lrmd_cmd_t *cmd = item->data; cmd 1812 daemons/execd/execd_commands.c (cmd->real_action? cmd->real_action : cmd->action)); cmd 1813 daemons/execd/execd_commands.c crm_xml_add_ms(op_xml, F_LRMD_RSC_INTERVAL, cmd->interval_ms); cmd 1814 daemons/execd/execd_commands.c crm_xml_add_int(op_xml, F_LRMD_TIMEOUT, cmd->timeout_orig); cmd 158 daemons/fenced/cts-fence-helper.c #define single_test(cmd, str, num_notifications, expected_rc) \ cmd 161 daemons/fenced/cts-fence-helper.c rc = cmd; \ cmd 113 daemons/fenced/fenced_commands.c static xmlNode *stonith_construct_async_reply(async_command_t * cmd, const char *output, cmd 207 daemons/fenced/fenced_commands.c free_async_command(async_command_t * cmd) cmd 209 daemons/fenced/fenced_commands.c if (!cmd) { cmd 213 daemons/fenced/fenced_commands.c if (cmd->delay_id) { cmd 214 daemons/fenced/fenced_commands.c g_source_remove(cmd->delay_id); cmd 217 daemons/fenced/fenced_commands.c cmd_list = g_list_remove(cmd_list, cmd); cmd 219 daemons/fenced/fenced_commands.c g_list_free_full(cmd->device_list, free); cmd 220 daemons/fenced/fenced_commands.c free(cmd->device); cmd 221 daemons/fenced/fenced_commands.c free(cmd->action); cmd 222 daemons/fenced/fenced_commands.c free(cmd->victim); cmd 223 daemons/fenced/fenced_commands.c free(cmd->remote_op_id); cmd 224 daemons/fenced/fenced_commands.c free(cmd->client); cmd 225 daemons/fenced/fenced_commands.c free(cmd->client_name); cmd 226 daemons/fenced/fenced_commands.c free(cmd->origin); cmd 227 daemons/fenced/fenced_commands.c free(cmd->op); cmd 228 daemons/fenced/fenced_commands.c free(cmd); cmd 234 daemons/fenced/fenced_commands.c async_command_t *cmd = NULL; cmd 241 daemons/fenced/fenced_commands.c cmd = calloc(1, sizeof(async_command_t)); cmd 242 daemons/fenced/fenced_commands.c crm_element_value_int(msg, F_STONITH_CALLID, &(cmd->id)); cmd 243 daemons/fenced/fenced_commands.c crm_element_value_int(msg, F_STONITH_CALLOPTS, &(cmd->options)); cmd 244 daemons/fenced/fenced_commands.c crm_element_value_int(msg, F_STONITH_TIMEOUT, &(cmd->default_timeout)); cmd 245 daemons/fenced/fenced_commands.c cmd->timeout = cmd->default_timeout; cmd 247 daemons/fenced/fenced_commands.c crm_element_value_int(msg, F_STONITH_DELAY, &(cmd->start_delay)); cmd 249 daemons/fenced/fenced_commands.c cmd->origin = crm_element_value_copy(msg, F_ORIG); cmd 250 daemons/fenced/fenced_commands.c cmd->remote_op_id = crm_element_value_copy(msg, F_STONITH_REMOTE_OP_ID); cmd 251 daemons/fenced/fenced_commands.c cmd->client = crm_element_value_copy(msg, F_STONITH_CLIENTID); cmd 252 daemons/fenced/fenced_commands.c cmd->client_name = crm_element_value_copy(msg, F_STONITH_CLIENTNAME); cmd 253 daemons/fenced/fenced_commands.c cmd->op = crm_element_value_copy(msg, F_STONITH_OPERATION); cmd 254 daemons/fenced/fenced_commands.c cmd->action = strdup(action); cmd 255 daemons/fenced/fenced_commands.c cmd->victim = crm_element_value_copy(op, F_STONITH_TARGET); cmd 256 daemons/fenced/fenced_commands.c cmd->device = crm_element_value_copy(op, F_STONITH_DEVICE); cmd 258 daemons/fenced/fenced_commands.c CRM_CHECK(cmd->op != NULL, crm_log_xml_warn(msg, "NoOp"); free_async_command(cmd); return NULL); cmd 259 daemons/fenced/fenced_commands.c CRM_CHECK(cmd->client != NULL, crm_log_xml_warn(msg, "NoClient")); cmd 261 daemons/fenced/fenced_commands.c cmd->done_cb = st_child_done; cmd 262 daemons/fenced/fenced_commands.c cmd_list = g_list_append(cmd_list, cmd); cmd 263 daemons/fenced/fenced_commands.c return cmd; cmd 291 daemons/fenced/fenced_commands.c async_command_t *cmd = gIter->data; cmd 295 daemons/fenced/fenced_commands.c if (cmd->active_on == device) { cmd 306 daemons/fenced/fenced_commands.c async_command_t *cmd = (async_command_t *) user_data; cmd 311 daemons/fenced/fenced_commands.c cmd->activating_on?cmd->activating_on:cmd->active_on; cmd 315 daemons/fenced/fenced_commands.c cmd->action, pid, cmd 316 daemons/fenced/fenced_commands.c ((cmd->victim == NULL)? "" : " targeting "), cmd 317 daemons/fenced/fenced_commands.c ((cmd->victim == NULL)? "" : cmd->victim), cmd 318 daemons/fenced/fenced_commands.c device->id, cmd->timeout); cmd 319 daemons/fenced/fenced_commands.c cmd->active_on = device; cmd 320 daemons/fenced/fenced_commands.c cmd->activating_on = NULL; cmd 355 daemons/fenced/fenced_commands.c async_command_t *cmd = NULL; cmd 391 daemons/fenced/fenced_commands.c cmd = pending_op; cmd 395 daemons/fenced/fenced_commands.c if (cmd == NULL) { cmd 401 daemons/fenced/fenced_commands.c if(pcmk__str_eq(cmd->action, "reboot", pcmk__str_casei)) { cmd 405 daemons/fenced/fenced_commands.c } else if(pcmk__str_eq(cmd->action, "off", pcmk__str_casei)) { cmd 410 daemons/fenced/fenced_commands.c crm_info("Faking success for %s watchdog operation", cmd->action); cmd 411 daemons/fenced/fenced_commands.c cmd->done_cb(0, 0, NULL, cmd); cmd 419 daemons/fenced/fenced_commands.c if (pcmk__str_eq(cmd->action, "stop", pcmk__str_casei)) { cmd 427 daemons/fenced/fenced_commands.c cmd->done_cb(0, exec_rc, NULL, cmd); cmd 433 daemons/fenced/fenced_commands.c action_str = cmd->action; cmd 434 daemons/fenced/fenced_commands.c if (pcmk__str_eq(cmd->action, "reboot", pcmk__str_casei) cmd 450 daemons/fenced/fenced_commands.c cmd->victim, cmd 451 daemons/fenced/fenced_commands.c cmd->victim_nodeid, cmd 452 daemons/fenced/fenced_commands.c cmd->timeout, device->params, cmd 457 daemons/fenced/fenced_commands.c cmd->activating_on = device; cmd 458 daemons/fenced/fenced_commands.c exec_rc = stonith_action_execute_async(action, (void *)cmd, cmd 459 daemons/fenced/fenced_commands.c cmd->done_cb, fork_cb); cmd 463 daemons/fenced/fenced_commands.c cmd->action, cmd->victim ? " targeting " : "", cmd->victim ? cmd->victim : "", cmd 465 daemons/fenced/fenced_commands.c cmd->activating_on = NULL; cmd 466 daemons/fenced/fenced_commands.c cmd->done_cb(0, exec_rc, NULL, cmd); cmd 488 daemons/fenced/fenced_commands.c async_command_t *cmd = data; cmd 491 daemons/fenced/fenced_commands.c cmd->delay_id = 0; cmd 492 daemons/fenced/fenced_commands.c device = cmd->device ? g_hash_table_lookup(device_list, cmd->device) : NULL; cmd 502 daemons/fenced/fenced_commands.c schedule_stonith_command(async_command_t * cmd, stonith_device_t * device) cmd 506 daemons/fenced/fenced_commands.c int requested_delay = cmd->start_delay; cmd 508 daemons/fenced/fenced_commands.c CRM_CHECK(cmd != NULL, return); cmd 511 daemons/fenced/fenced_commands.c if (cmd->device) { cmd 512 daemons/fenced/fenced_commands.c free(cmd->device); cmd 515 daemons/fenced/fenced_commands.c if (device->include_nodeid && cmd->victim) { cmd 516 daemons/fenced/fenced_commands.c crm_node_t *node = crm_get_peer(0, cmd->victim); cmd 518 daemons/fenced/fenced_commands.c cmd->victim_nodeid = node->id; cmd 521 daemons/fenced/fenced_commands.c cmd->device = strdup(device->id); cmd 522 daemons/fenced/fenced_commands.c cmd->timeout = get_action_timeout(device, cmd->action, cmd->default_timeout); cmd 524 daemons/fenced/fenced_commands.c if (cmd->remote_op_id) { cmd 527 daemons/fenced/fenced_commands.c cmd->action, cmd 528 daemons/fenced/fenced_commands.c cmd->victim ? " targeting " : "", cmd->victim ? cmd->victim : "", cmd 529 daemons/fenced/fenced_commands.c device->id, cmd->origin, cmd->remote_op_id, cmd->timeout); cmd 532 daemons/fenced/fenced_commands.c cmd->action, cmd 533 daemons/fenced/fenced_commands.c cmd->victim ? " targeting " : "", cmd->victim ? cmd->victim : "", cmd 534 daemons/fenced/fenced_commands.c device->id, cmd->client, cmd->timeout); cmd 537 daemons/fenced/fenced_commands.c device->pending_ops = g_list_append(device->pending_ops, cmd); cmd 545 daemons/fenced/fenced_commands.c delay_max = get_action_delay_max(device, cmd->action); cmd 546 daemons/fenced/fenced_commands.c delay_base = get_action_delay_base(device, cmd->action); cmd 554 daemons/fenced/fenced_commands.c delay_base, delay_max, cmd->action, device->id); cmd 559 daemons/fenced/fenced_commands.c cmd->start_delay += cmd 564 daemons/fenced/fenced_commands.c if (cmd->start_delay > 0) { cmd 567 daemons/fenced/fenced_commands.c cmd->action, cmd 568 daemons/fenced/fenced_commands.c cmd->victim ? " targeting " : "", cmd->victim ? cmd->victim : "", cmd 569 daemons/fenced/fenced_commands.c device->id, cmd->start_delay, cmd->timeout, cmd 571 daemons/fenced/fenced_commands.c cmd->delay_id = cmd 572 daemons/fenced/fenced_commands.c g_timeout_add_seconds(cmd->start_delay, start_delay_helper, cmd); cmd 586 daemons/fenced/fenced_commands.c async_command_t *cmd = gIter->data; cmd 588 daemons/fenced/fenced_commands.c crm_warn("Removal of device '%s' purged operation '%s'", device->id, cmd->action); cmd 589 daemons/fenced/fenced_commands.c cmd->done_cb(0, -ENODEV, NULL, cmd); cmd 1033 daemons/fenced/fenced_commands.c async_command_t *cmd = NULL; cmd 1035 daemons/fenced/fenced_commands.c cmd = calloc(1, sizeof(async_command_t)); cmd 1037 daemons/fenced/fenced_commands.c cmd->id = -1; cmd 1038 daemons/fenced/fenced_commands.c cmd->default_timeout = timeout ? timeout : 60; cmd 1039 daemons/fenced/fenced_commands.c cmd->timeout = cmd->default_timeout; cmd 1040 daemons/fenced/fenced_commands.c cmd->action = strdup(action); cmd 1041 daemons/fenced/fenced_commands.c cmd->victim = victim ? strdup(victim) : NULL; cmd 1042 daemons/fenced/fenced_commands.c cmd->device = strdup(device->id); cmd 1043 daemons/fenced/fenced_commands.c cmd->origin = strdup(origin); cmd 1044 daemons/fenced/fenced_commands.c cmd->client = strdup(crm_system_name); cmd 1045 daemons/fenced/fenced_commands.c cmd->client_name = strdup(crm_system_name); cmd 1047 daemons/fenced/fenced_commands.c cmd->internal_user_data = internal_user_data; cmd 1048 daemons/fenced/fenced_commands.c cmd->done_cb = done_cb; /* cmd, not internal_user_data, is passed to 'done_cb' as the userdata */ cmd 1050 daemons/fenced/fenced_commands.c schedule_stonith_command(cmd, device); cmd 1074 daemons/fenced/fenced_commands.c async_command_t *cmd = user_data; cmd 1075 daemons/fenced/fenced_commands.c struct device_search_s *search = cmd->internal_user_data; cmd 1076 daemons/fenced/fenced_commands.c stonith_device_t *dev = cmd->device ? g_hash_table_lookup(device_list, cmd->device) : NULL; cmd 1079 daemons/fenced/fenced_commands.c free_async_command(cmd); cmd 1105 daemons/fenced/fenced_commands.c async_command_t *cmd = user_data; cmd 1106 daemons/fenced/fenced_commands.c struct device_search_s *search = cmd->internal_user_data; cmd 1107 daemons/fenced/fenced_commands.c stonith_device_t *dev = cmd->device ? g_hash_table_lookup(device_list, cmd->device) : NULL; cmd 1110 daemons/fenced/fenced_commands.c free_async_command(cmd); cmd 1608 daemons/fenced/fenced_commands.c async_command_t *cmd = NULL; cmd 1628 daemons/fenced/fenced_commands.c cmd = create_async_command(msg); cmd 1629 daemons/fenced/fenced_commands.c if (cmd == NULL) { cmd 1633 daemons/fenced/fenced_commands.c schedule_stonith_command(cmd, device); cmd 2114 daemons/fenced/fenced_commands.c log_operation(async_command_t * cmd, int rc, int pid, const char *next, const char *output, gboolean op_merged) cmd 2120 daemons/fenced/fenced_commands.c if (cmd->victim != NULL) { cmd 2124 daemons/fenced/fenced_commands.c cmd->action, pid, (op_merged? "merged " : ""), cmd->id, cmd 2125 daemons/fenced/fenced_commands.c cmd->client_name, cmd->victim, cmd 2126 daemons/fenced/fenced_commands.c cmd->device, rc, pcmk_strerror(rc), cmd 2131 daemons/fenced/fenced_commands.c cmd->action, pid, (op_merged? " (merged)" : ""), cmd 2132 daemons/fenced/fenced_commands.c cmd->device, rc, pcmk_strerror(rc), cmd 2138 daemons/fenced/fenced_commands.c char *prefix = crm_strdup_printf("%s[%d]", cmd->device, pid); cmd 2146 daemons/fenced/fenced_commands.c stonith_send_async_reply(async_command_t * cmd, const char *output, int rc, GPid pid, int options) cmd 2151 daemons/fenced/fenced_commands.c reply = stonith_construct_async_reply(cmd, output, NULL, rc); cmd 2153 daemons/fenced/fenced_commands.c if (pcmk__str_eq(cmd->action, "metadata", pcmk__str_casei)) { cmd 2155 daemons/fenced/fenced_commands.c crm_trace("Metadata query for %s", cmd->device); cmd 2158 daemons/fenced/fenced_commands.c } else if (pcmk__str_any_of(cmd->action, "monitor", "list", "status", NULL)) { cmd 2159 daemons/fenced/fenced_commands.c crm_trace("Never broadcast '%s' replies", cmd->action); cmd 2161 daemons/fenced/fenced_commands.c } else if (!stand_alone && pcmk__str_eq(cmd->origin, cmd->victim, pcmk__str_casei) && !pcmk__str_eq(cmd->action, "on", pcmk__str_casei)) { cmd 2162 daemons/fenced/fenced_commands.c crm_trace("Broadcast '%s' reply for %s", cmd->action, cmd->victim); cmd 2167 daemons/fenced/fenced_commands.c log_operation(cmd, rc, pid, NULL, output, (options & st_reply_opt_merged ? TRUE : FALSE)); cmd 2178 daemons/fenced/fenced_commands.c } else if (cmd->origin) { cmd 2179 daemons/fenced/fenced_commands.c crm_trace("Directed reply to %s", cmd->origin); cmd 2180 daemons/fenced/fenced_commands.c send_cluster_message(crm_get_peer(0, cmd->origin), crm_msg_stonith_ng, reply, FALSE); cmd 2184 daemons/fenced/fenced_commands.c (cmd->options & st_opt_sync_call) ? "" : "a-", cmd->client_name); cmd 2185 daemons/fenced/fenced_commands.c do_local_reply(reply, cmd->client, cmd->options & st_opt_sync_call, FALSE); cmd 2193 daemons/fenced/fenced_commands.c crm_xml_add(notify_data, F_STONITH_TARGET, cmd->victim); cmd 2194 daemons/fenced/fenced_commands.c crm_xml_add(notify_data, F_STONITH_OPERATION, cmd->op); cmd 2196 daemons/fenced/fenced_commands.c crm_xml_add(notify_data, F_STONITH_DEVICE, cmd->device); cmd 2197 daemons/fenced/fenced_commands.c crm_xml_add(notify_data, F_STONITH_REMOTE_OP_ID, cmd->remote_op_id); cmd 2198 daemons/fenced/fenced_commands.c crm_xml_add(notify_data, F_STONITH_ORIGIN, cmd->client); cmd 2208 daemons/fenced/fenced_commands.c cancel_stonith_command(async_command_t * cmd) cmd 2212 daemons/fenced/fenced_commands.c CRM_CHECK(cmd != NULL, return); cmd 2214 daemons/fenced/fenced_commands.c if (!cmd->device) { cmd 2218 daemons/fenced/fenced_commands.c device = g_hash_table_lookup(device_list, cmd->device); cmd 2222 daemons/fenced/fenced_commands.c cmd->action, device->id); cmd 2223 daemons/fenced/fenced_commands.c device->pending_ops = g_list_remove(device->pending_ops, cmd); cmd 2232 daemons/fenced/fenced_commands.c async_command_t *cmd = user_data; cmd 2237 daemons/fenced/fenced_commands.c CRM_CHECK(cmd != NULL, return); cmd 2239 daemons/fenced/fenced_commands.c cmd->active_on = NULL; cmd 2242 daemons/fenced/fenced_commands.c device = g_hash_table_lookup(device_list, cmd->device); cmd 2245 daemons/fenced/fenced_commands.c (pcmk__strcase_any_of(cmd->action, "list", "monitor", "status", NULL))) { cmd 2254 daemons/fenced/fenced_commands.c cmd->action, cmd->device, rc, g_list_length(cmd->device_next)); cmd 2259 daemons/fenced/fenced_commands.c for (iter = cmd->device_next; iter != NULL; iter = iter->next) { cmd 2262 daemons/fenced/fenced_commands.c if (next_device != NULL && is_action_required(cmd->action, next_device)) { cmd 2263 daemons/fenced/fenced_commands.c cmd->device_next = iter->next; cmd 2269 daemons/fenced/fenced_commands.c } else if (rc != 0 && cmd->device_next && (is_action_required(cmd->action, device) == FALSE)) { cmd 2272 daemons/fenced/fenced_commands.c next_device = g_hash_table_lookup(device_list, cmd->device_next->data); cmd 2273 daemons/fenced/fenced_commands.c cmd->device_next = cmd->device_next->next; cmd 2278 daemons/fenced/fenced_commands.c log_operation(cmd, rc, pid, next_device->id, output, FALSE); cmd 2280 daemons/fenced/fenced_commands.c schedule_stonith_command(cmd, next_device); cmd 2282 daemons/fenced/fenced_commands.c cmd = NULL; cmd 2286 daemons/fenced/fenced_commands.c stonith_send_async_reply(cmd, output, rc, pid, st_reply_opt_none); cmd 2301 daemons/fenced/fenced_commands.c if (cmd == cmd_other) { cmd 2311 daemons/fenced/fenced_commands.c if (pcmk__str_eq(cmd->client, cmd_other->client, pcmk__str_casei) || cmd 2312 daemons/fenced/fenced_commands.c !pcmk__str_eq(cmd->victim, cmd_other->victim, pcmk__str_casei) || cmd 2313 daemons/fenced/fenced_commands.c !pcmk__str_eq(cmd->action, cmd_other->action, pcmk__str_casei) || cmd 2314 daemons/fenced/fenced_commands.c !pcmk__str_eq(cmd->device, cmd_other->device, pcmk__str_casei)) { cmd 2330 daemons/fenced/fenced_commands.c cmd->client_name); cmd 2342 daemons/fenced/fenced_commands.c free_async_command(cmd); cmd 2362 daemons/fenced/fenced_commands.c async_command_t *cmd = user_data; cmd 2367 daemons/fenced/fenced_commands.c ndevices, pcmk__plural_s(ndevices), cmd->victim); cmd 2375 daemons/fenced/fenced_commands.c cmd->device_list = devices; cmd 2376 daemons/fenced/fenced_commands.c cmd->device_next = devices->next; cmd 2383 daemons/fenced/fenced_commands.c schedule_stonith_command(cmd, device); cmd 2389 daemons/fenced/fenced_commands.c stonith_send_async_reply(cmd, NULL, -ENODEV, 0, st_reply_opt_none); cmd 2391 daemons/fenced/fenced_commands.c free_async_command(cmd); cmd 2400 daemons/fenced/fenced_commands.c async_command_t *cmd = create_async_command(msg); cmd 2403 daemons/fenced/fenced_commands.c if (cmd == NULL) { cmd 2414 daemons/fenced/fenced_commands.c schedule_stonith_command(cmd, device); cmd 2419 daemons/fenced/fenced_commands.c if (cmd->options & st_opt_cs_nodeid) { cmd 2431 daemons/fenced/fenced_commands.c get_capable_devices(host, cmd->action, cmd->default_timeout, cmd 2432 daemons/fenced/fenced_commands.c TRUE, cmd, stonith_fence_get_devices_cb); cmd 2488 daemons/fenced/fenced_commands.c stonith_construct_async_reply(async_command_t * cmd, const char *output, xmlNode * data, int rc) cmd 2498 daemons/fenced/fenced_commands.c crm_xml_add(reply, F_STONITH_OPERATION, cmd->op); cmd 2499 daemons/fenced/fenced_commands.c crm_xml_add(reply, F_STONITH_DEVICE, cmd->device); cmd 2500 daemons/fenced/fenced_commands.c crm_xml_add(reply, F_STONITH_REMOTE_OP_ID, cmd->remote_op_id); cmd 2501 daemons/fenced/fenced_commands.c crm_xml_add(reply, F_STONITH_CLIENTID, cmd->client); cmd 2502 daemons/fenced/fenced_commands.c crm_xml_add(reply, F_STONITH_CLIENTNAME, cmd->client_name); cmd 2503 daemons/fenced/fenced_commands.c crm_xml_add(reply, F_STONITH_TARGET, cmd->victim); cmd 2504 daemons/fenced/fenced_commands.c crm_xml_add(reply, F_STONITH_ACTION, cmd->op); cmd 2505 daemons/fenced/fenced_commands.c crm_xml_add(reply, F_STONITH_ORIGIN, cmd->origin); cmd 2506 daemons/fenced/fenced_commands.c crm_xml_add_int(reply, F_STONITH_CALLID, cmd->id); cmd 2507 daemons/fenced/fenced_commands.c crm_xml_add_int(reply, F_STONITH_CALLOPTS, cmd->options); cmd 65 include/crm/common/options_internal.h _Noreturn void pcmk__cli_help(char cmd, crm_exit_t exit_code); cmd 215 lib/common/ipc_pacemakerd.c xmlNode *cmd; cmd 222 lib/common/ipc_pacemakerd.c cmd = create_request(task, NULL, NULL, CRM_SYSTEM_MCP, cmd 226 lib/common/ipc_pacemakerd.c if (cmd) { cmd 227 lib/common/ipc_pacemakerd.c rc = pcmk__send_ipc_request(api, cmd); cmd 233 lib/common/ipc_pacemakerd.c free_xml(cmd); cmd 192 lib/common/options.c pcmk__cli_help(char cmd, crm_exit_t exit_code) cmd 197 lib/common/options.c if (cmd == 'v' || cmd == '$') { cmd 203 lib/common/options.c if (cmd == '!') { cmd 435 libltdl/loaders/dyld.c if (LC_ID_DYLIB == lc->cmd) cmd 483 libltdl/loaders/dyld.c if ((LC_LOAD_DYLIB == lc->cmd) || (LC_LOAD_WEAK_DYLIB == lc->cmd)) cmd 410 tools/crm_node.c xmlNode *cmd = NULL; cmd 426 tools/crm_node.c cmd = create_xml_node(NULL, __func__); cmd 428 tools/crm_node.c crm_xml_add(cmd, F_TYPE, T_ATTRD); cmd 429 tools/crm_node.c crm_xml_add(cmd, F_ORIG, crm_system_name); cmd 431 tools/crm_node.c crm_xml_add(cmd, PCMK__XA_TASK, PCMK__ATTRD_CMD_PEER_REMOVE); cmd 432 tools/crm_node.c crm_xml_add(cmd, PCMK__XA_ATTR_NODE_NAME, node_name); cmd 435 tools/crm_node.c crm_xml_add_int(cmd, PCMK__XA_ATTR_NODE_ID, (int) nodeid); cmd 439 tools/crm_node.c cmd = create_request(CRM_OP_RM_NODE_CACHE, NULL, NULL, target, cmd 442 tools/crm_node.c crm_xml_set_id(cmd, "%ld", nodeid); cmd 444 tools/crm_node.c crm_xml_add(cmd, XML_ATTR_UNAME, node_name); cmd 447 tools/crm_node.c rc = crm_ipc_send(conn, cmd, 0, 0, NULL); cmd 460 tools/crm_node.c free_xml(cmd); cmd 126 tools/crm_resource.c #define SET_COMMAND(cmd) do { \ cmd 132 tools/crm_resource.c options.rsc_cmd = (cmd); \ cmd 135 tools/crm_resource.c #define SET_COMMAND(cmd) do { options.rsc_cmd = (cmd); } while (0) cmd 191 tools/crm_resource_runtime.c cib_t * cib, const char * cmd, int depth) cmd 201 tools/crm_resource_runtime.c attr_id, attr_name, cib, cmd, depth+1); cmd 227 tools/crm_resource_runtime.c const char * attr_name, cib_t * cib, const char * cmd, cmd 250 tools/crm_resource_runtime.c cmd, attr_name, rsc->id, rsc_id); cmd 264 tools/crm_resource_runtime.c attr_name, lookup_id, cmd, rsc_id); cmd 275 tools/crm_resource_runtime.c cib, cmd, 0);