25 char *fail_s = getenv(
"PE_fail");
36 crm_err(
"Dummy event handler: pretending action %d failed",
action->id);
61 crm_info(
"Setting custom graph functions");
86 return "failed (action)";
116 for (sIter = graph->
synapses; sIter != NULL; sIter = sIter->next) {
120 for (aIter = synapse->
actions; aIter != NULL; aIter = aIter->next) {
143 }
else if (synapse->
ready) {
153 char *pending = NULL;
155 for (GList *lpc = synapse->
inputs; lpc != NULL; lpc = lpc->next) {
164 }
else if (find_action(graph, input->
id) != NULL) {
169 if (pending == NULL) {
170 pending = strdup(
"none");
177 log_unresolved_inputs(
unsigned int log_level,
crm_graph_t *graph,
180 for (GList *lpc = synapse->
inputs; lpc != NULL; lpc = lpc->next) {
185 if (find_action(graph, input->
id) == NULL) {
187 " * [Input %2d]: Unresolved dependency %s op %s%s%s",
195 log_synapse_action(
unsigned int log_level,
synapse_t *synapse,
201 synapse_state_str(synapse),
205 "[Action %4d]: %-50s%s%s (priority: %d, waiting: %s)",
214 char *pending = NULL;
217 pending = synapse_pending_inputs(graph, synapse);
219 for (GList *lpc = synapse->
actions; lpc != NULL; lpc = lpc->next) {
220 log_synapse_action(log_level, synapse, (
crm_action_t *) lpc->data,
225 log_unresolved_inputs(log_level, graph, synapse);
232 print_synapse(log_level, NULL,
action->synapse);
247 do_crm_log(log_level,
"Graph %d with %d actions:"
248 " batch-limit=%d jobs, network-delay=%ums",
252 for (lpc = graph->
synapses; lpc != NULL; lpc = lpc->next) {
255 print_synapse(log_level, graph, synapse);
262 switch (abort_action) {
296 crm_debug(
"Abort action %s superseded by %s: %s",
enum crm_ais_msg_types type
char * pcmk__add_word(char *list, const char *word)
char * crm_strdup_printf(char const *format,...) __attribute__((__format__(__printf__
long long crm_parse_ll(const char *text, const char *default_text)
Parse a long long integer value from a string.
#define crm_info(fmt, args...)
#define do_crm_log(level, fmt, args...)
Log a message.
#define crm_debug(fmt, args...)
#define crm_err(fmt, args...)
#define crm_trace(fmt, args...)
#define XML_LRM_ATTR_TASK_KEY
#define XML_LRM_ATTR_TARGET
const char * crm_element_value(const xmlNode *data, const char *name)
Retrieve the value of an XML attribute.
bool update_abort_priority(crm_graph_t *graph, int priority, enum transition_action action, const char *abort_reason)
void set_graph_functions(crm_graph_functions_t *fns)
const char * actiontype2text(action_type_e type)
void set_default_graph_functions(void)
void print_graph(unsigned int log_level, crm_graph_t *graph)
crm_graph_functions_t default_fns
crm_graph_functions_t * graph_fns
void print_action(int log_level, const char *prefix, crm_action_t *action)
const char * transition_status(enum transition_status state)
@ transition_action_failed
gboolean update_graph(crm_graph_t *graph, crm_action_t *action)
gboolean(* stonith)(crm_graph_t *graph, crm_action_t *action)
gboolean(* pseudo)(crm_graph_t *graph, crm_action_t *action)
gboolean(* crmd)(crm_graph_t *graph, crm_action_t *action)
gboolean(* rsc)(crm_graph_t *graph, crm_action_t *action)
enum transition_action completion_action
const char * abort_reason
Wrappers for and extensions to libxml2.