40 return "failed (action)";
77 for (GList *sIter = graph->
synapses; sIter != NULL; sIter = sIter->next) {
80 for (GList *aIter = synapse->
actions; aIter != NULL;
81 aIter = aIter->next) {
115 char *pending = NULL;
116 size_t pending_len = 0;
118 for (GList *lpc = synapse->
inputs; lpc != NULL; lpc = lpc->next) {
122 pcmk__add_word(&pending, &pending_len,
ID(
input->xml));
127 }
else if (find_graph_action_by_id(graph,
input->id) != NULL) {
129 pcmk__add_word(&pending, &pending_len,
ID(
input->xml));
132 if (pending == NULL) {
133 pending = strdup(
"none");
140 log_unresolved_inputs(
unsigned int log_level,
crm_graph_t *graph,
143 for (GList *lpc = synapse->
inputs; lpc != NULL; lpc = lpc->next) {
148 if (find_graph_action_by_id(graph,
input->id) == NULL) {
150 " * [Input %2d]: Unresolved dependency %s op %s%s%s",
158 log_synapse_action(
unsigned int log_level,
synapse_t *synapse,
165 actiontype2text(
action->type), key);
168 "[Action %4d]: %-50s%s%s (priority: %d, waiting: %s)",
177 char *pending = NULL;
180 pending = synapse_pending_inputs(graph, synapse);
182 for (GList *lpc = synapse->
actions; lpc != NULL; lpc = lpc->next) {
183 log_synapse_action(log_level, synapse, (
crm_action_t *) lpc->data,
188 log_unresolved_inputs(log_level, graph, synapse);
195 log_synapse(log_level, NULL,
action->synapse);
201 if ((graph == NULL) || (graph->
num_actions == 0)) {
208 do_crm_log(log_level,
"Graph %d with %d actions:" 209 " batch-limit=%d jobs, network-delay=%ums",
213 for (GList *lpc = graph->
synapses; lpc != NULL; lpc = lpc->next) {
214 log_synapse(log_level, graph, (
synapse_t *) lpc->data);
enum crm_ais_msg_types type
#define XML_LRM_ATTR_TASK_KEY
void pcmk__log_graph_action(int log_level, crm_action_t *action)
#define crm_debug(fmt, args...)
const char * crm_element_value(const xmlNode *data, const char *name)
Retrieve the value of an XML attribute.
#define do_crm_log(level, fmt, args...)
Log a message.
char * crm_strdup_printf(char const *format,...) G_GNUC_PRINTF(1
#define pcmk_is_set(g, f)
Convenience alias for pcmk_all_flags_set(), to check single flag.
Wrappers for and extensions to libxml2.
void pcmk__log_graph(unsigned int log_level, crm_graph_t *graph)
const char * pcmk__graph_status2text(enum transition_status state)
#define XML_LRM_ATTR_TARGET
const char * synapse_state_str(synapse_t *synapse)