28 && (fail_ll > 0LL) && (fail_ll <= INT_MAX)) {
37 crm_err(
"Dummy event handler: pretending action %d failed",
action->id);
62 crm_info(
"Setting custom graph functions");
87 return "failed (action)";
117 for (sIter = graph->
synapses; sIter != NULL; sIter = sIter->next) {
121 for (aIter = synapse->actions; aIter != NULL; aIter = aIter->next) {
144 }
else if (synapse->
ready) {
154 char *pending = NULL;
155 size_t pending_len = 0;
157 for (GList *lpc = synapse->
inputs; lpc != NULL; lpc = lpc->next) {
161 pcmk__add_word(&pending, &pending_len,
ID(input->xml));
163 }
else if (input->confirmed) {
166 }
else if (find_action(graph, input->id) != NULL) {
168 pcmk__add_word(&pending, &pending_len,
ID(input->xml));
171 if (pending == NULL) {
172 pending = strdup(
"none");
179log_unresolved_inputs(
unsigned int log_level,
crm_graph_t *graph,
182 for (GList *lpc = synapse->
inputs; lpc != NULL; lpc = lpc->next) {
187 if (find_action(graph, input->id) == NULL) {
189 " * [Input %2d]: Unresolved dependency %s op %s%s%s",
197log_synapse_action(
unsigned int log_level,
synapse_t *synapse,
203 synapse_state_str(synapse),
207 "[Action %4d]: %-50s%s%s (priority: %d, waiting: %s)",
209 synapse->priority, pending_inputs);
216 char *pending = NULL;
219 pending = synapse_pending_inputs(graph, synapse);
221 for (GList *lpc = synapse->
actions; lpc != NULL; lpc = lpc->next) {
222 log_synapse_action(log_level, synapse, (
crm_action_t *) lpc->data,
227 log_unresolved_inputs(log_level, graph, synapse);
234 print_synapse(log_level, NULL,
action->synapse);
249 do_crm_log(log_level,
"Graph %d with %d actions:"
250 " batch-limit=%d jobs, network-delay=%ums",
254 for (lpc = graph->
synapses; lpc != NULL; lpc = lpc->next) {
257 print_synapse(log_level, graph, synapse);
264 switch (abort_action) {
298 crm_debug(
"Abort action %s superseded by %s: %s",
char * crm_strdup_printf(char const *format,...) G_GNUC_PRINTF(1
enum crm_ais_msg_types type
#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)
void set_default_graph_functions(void)
void print_graph(unsigned int log_level, crm_graph_t *graph)
crm_graph_functions_t default_fns
const char * actiontype2text(action_type_e type)
crm_graph_functions_t * graph_fns
void print_action(int log_level, const char *prefix, crm_action_t *action)
@ transition_action_failed
gboolean update_graph(crm_graph_t *graph, crm_action_t *action)
int pcmk__scan_ll(const char *text, long long *result, long long default_value)
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.