36 char *fail_s = getenv(
"PE_fail");
45 crm_trace(
"Dummy event handler: action %d executed", action->
id);
46 if (action->
id == fail) {
47 crm_err(
"Dummy event handler: pretending action %d failed", action->
id);
72 crm_info(
"Setting custom graph functions");
97 return "failed (action)";
128 for (sIter = graph->
synapses; sIter != NULL; sIter = sIter->next) {
132 for (aIter = synapse->
actions; aIter != NULL; aIter = aIter->next) {
135 if (action->
id ==
id) {
147 char *pending = NULL;
148 const char *state =
"Pending";
159 }
else if (synapse->
ready) {
164 for (lpc = synapse->
inputs; lpc != NULL; lpc = lpc->next) {
174 }
else if (find_action(graph, input->
id)) {
181 for (lpc = synapse->
actions; lpc != NULL; lpc = lpc->next) {
188 "[Action %4d]: %-50s on %s (priority: %d, waiting: %s)",
189 action->
id, desc, host ? host :
"N/A",
190 synapse->
priority, pending ? pending :
"none");
196 for (lpc = synapse->
inputs; lpc != NULL; lpc = lpc->next) {
201 if (find_action(graph, input->
id) == NULL) {
203 do_crm_log(log_level,
" * [Input %2d]: Unresolved dependency %s op %s",
206 do_crm_log(log_level,
" * [Input %2d]: Unresolved dependency %s op %s on %s",
219 print_synapse(log_level, NULL, action->
synapse);
228 if (log_level > LOG_DEBUG) {
234 do_crm_log(log_level,
"Graph %d with %d actions:"
235 " batch-limit=%d jobs, network-delay=%dms",
239 for (lpc = graph->
synapses; lpc != NULL; lpc = lpc->next) {
242 print_synapse(log_level, graph, synapse);
249 switch (abort_action) {
283 crm_debug(
"Abort action %s superseded by %s: %s",
gboolean(* pseudo)(crm_graph_t *graph, crm_action_t *action)
bool update_abort_priority(crm_graph_t *graph, int priority, enum transition_action action, const char *abort_reason)
enum transition_action completion_action
void print_action(int log_level, const char *prefix, crm_action_t *action)
long long crm_int_helper(const char *text, char **end_text)
gboolean(* rsc)(crm_graph_t *graph, crm_action_t *action)
const char * actiontype2text(action_type_e type)
void set_graph_functions(crm_graph_functions_t *fns)
#define XML_LRM_ATTR_TASK_KEY
crm_graph_functions_t default_fns
#define crm_debug(fmt, args...)
char * add_list_element(char *list, const char *value)
void set_default_graph_functions(void)
void print_graph(unsigned int log_level, crm_graph_t *graph)
#define crm_trace(fmt, args...)
#define do_crm_log(level, fmt, args...)
Log a message.
Wrappers for and extensions to libxml2.
const char * crm_element_value(xmlNode *data, const char *name)
gboolean(* crmd)(crm_graph_t *graph, crm_action_t *action)
gboolean update_graph(crm_graph_t *graph, crm_action_t *action)
crm_graph_functions_t * graph_fns
#define crm_err(fmt, args...)
gboolean(* stonith)(crm_graph_t *graph, crm_action_t *action)
#define XML_LRM_ATTR_TARGET
char * crm_strdup_printf(char const *format,...) __attribute__((__format__(__printf__
#define crm_info(fmt, args...)
const char * abort_reason
enum crm_ais_msg_types type