12 #include <sys/param.h>
121 static unsigned long calls = 0;
122 gboolean changed = FALSE;
132 if (last != action->
flags) {
138 crm_trace(
"%s on %s: %sset flags 0x%.6x (was 0x%.6x, now 0x%.6x, %lu, %s)",
140 clear ?
"un-" :
"",
flags, last, action->
flags, calls, source);
151 gboolean force_restart = FALSE;
152 gboolean delete_resource = FALSE;
153 gboolean changed = FALSE;
155 const char *value = NULL;
156 const char *old_value = NULL;
158 const char *attr_list[] = {
164 for (; attr_lpc <
DIMOF(attr_list); attr_lpc++) {
167 if (value == old_value
175 force_restart = TRUE;
176 crm_notice(
"Forcing restart of %s on %s, %s changed: %s -> %s",
185 delete_resource = TRUE;
187 }
else if (changed) {
188 delete_resource = TRUE;
190 return delete_resource;
197 guint interval_ms = 0;
200 const char *task = NULL;
201 const char *call_id = NULL;
202 const char *interval_ms_s = NULL;
214 rsc->
id, task, interval_ms,
215 active_node->
details->
uname, (reason? reason :
"unknown"));
217 cancel =
pe_cancel_op(rsc, task, interval_ms, active_node, data_set);
223 check_action_definition(
resource_t * rsc,
node_t * active_node, xmlNode * xml_op,
227 guint interval_ms = 0;
228 const char *interval_ms_s = NULL;
230 gboolean did_change = FALSE;
233 const char *digest_secure = NULL;
235 CRM_CHECK(active_node != NULL,
return FALSE);
240 if (interval_ms > 0) {
241 xmlNode *op_match = NULL;
250 CancelXmlOp(rsc, xml_op, active_node,
"orphan", data_set);
254 }
else if (op_match == NULL) {
288 printf(
"Only 'private' parameters to " CRM_OP_FMT " on %s changed: %s\n",
300 required =
custom_action(rsc, key, task, NULL, TRUE, TRUE, data_set);
304 trigger_unfencing(rsc, active_node,
"Device parameters changed", NULL, data_set);
311 trigger_unfencing(rsc, active_node,
"Device parameters changed (reload)", NULL, data_set);
315 if (interval_ms > 0) {
323 op =
custom_action(rsc, key, task, active_node, TRUE, TRUE, data_set);
327 }
else if (digest_restart) {
328 pe_rsc_trace(rsc,
"Reloading '%s' action for resource %s", task, rsc->
id);
336 pe_rsc_trace(rsc,
"Resource %s doesn't know how to reload", rsc->
id);
341 required =
custom_action(rsc, key, task, NULL, TRUE, TRUE, data_set);
360 const char *reason = NULL;
365 if (check_action_definition(rsc, node, rsc_op, data_set)
369 reason =
"action definition changed";
375 switch (digest_data->
rc) {
377 crm_trace(
"Resource %s history entry %s on %s has no digest to compare",
383 reason =
"resource parameters have changed";
399 guint interval_ms = 0;
403 const char *task = NULL;
404 const char *interval_ms_s = NULL;
406 xmlNode *rsc_op = NULL;
415 || pe_rsc_is_clone(parent) == FALSE
417 pe_rsc_trace(rsc,
"Skipping param check for %s and deleting: orphan", rsc->
id);
420 pe_rsc_trace(rsc,
"Skipping param check for %s (orphan clone)", rsc->
id);
425 if (check_rsc_parameters(rsc, node, rsc_entry, FALSE, data_set)) {
428 pe_rsc_trace(rsc,
"Skipping param check for %s: no longer active on %s",
435 if (check_rsc_parameters(rsc, node, rsc_entry, TRUE, data_set)) {
439 for (rsc_op = __xml_first_child_element(rsc_entry); rsc_op != NULL;
440 rsc_op = __xml_next_element(rsc_op)) {
443 op_list = g_list_prepend(op_list, rsc_op);
450 for (gIter = sorted_op_list; gIter != NULL; gIter = gIter->next) {
451 xmlNode *rsc_op = (xmlNode *) gIter->data;
455 if (start_index < stop_index) {
458 }
else if (offset < start_index) {
468 if ((interval_ms > 0) &&
471 CancelXmlOp(rsc, rsc_op, node,
"maintenance mode", data_set);
473 }
else if ((interval_ms > 0)
494 }
else if (check_action_definition(rsc, node, rsc_op, data_set)
502 g_list_free(sorted_op_list);
506 find_rsc_list(
GListPtr result,
resource_t * rsc,
const char *
id, gboolean renamed_clones,
510 gboolean match = FALSE;
517 if (data_set == NULL) {
520 for (gIter = data_set->
resources; gIter != NULL; gIter = gIter->next) {
523 result = find_rsc_list(result, child,
id, renamed_clones, partial,
530 if (strstr(rsc->
id,
id)) {
538 if (strcmp(rsc->
id,
id) == 0) {
547 result = g_list_prepend(result, rsc);
552 for (; gIter != NULL; gIter = gIter->next) {
555 result = find_rsc_list(result, child,
id, renamed_clones, partial, NULL);
565 const char *
id = NULL;
567 xmlNode *lrm_rscs = NULL;
570 xmlNode *node_state = NULL;
572 for (node_state = __xml_first_child_element(status); node_state != NULL;
573 node_state = __xml_next_element(node_state)) {
586 crm_trace(
"Skipping param check for %s: can't run resources",
593 xmlNode *rsc_entry = NULL;
595 for (rsc_entry = __xml_first_child_element(lrm_rscs);
597 rsc_entry = __xml_next_element(rsc_entry)) {
604 const char *rsc_id =
ID(rsc_entry);
608 result = find_rsc_list(NULL, NULL, rsc_id, TRUE, FALSE, data_set);
609 for (gIter = result; gIter != NULL; gIter = gIter->next) {
615 check_actions_for(rsc_entry, rsc, node, data_set);
668 int fail_count, countdown;
685 if (fail_count <= 0) {
698 if (countdown == 0) {
700 crm_warn(
"Forcing %s away from %s after %d failures (max=%d)",
704 crm_info(
"%s can fail %d more times on %s before being forced off",
715 for (; gIter != NULL; gIter = gIter->next) {
718 common_apply_stickiness(child_rsc, node, data_set);
728 if (current == NULL) {
734 pe_rsc_debug(sticky_rsc,
"Resource %s: preferring current location"
735 " (node=%s, weight=%d)", sticky_rsc->
id,
741 pe_rsc_debug(rsc,
"Ignoring stickiness for %s: the cluster is asymmetric"
742 " and node %s is not explicitly allowed", rsc->
id, node->
details->
uname);
744 while (g_hash_table_iter_next(&iter, NULL, (
void **)&nIter)) {
745 crm_err(
"%s[%s] = %d", rsc->
id, nIter->details->uname, nIter->weight);
761 if (failcount_clear_action_exists(node, rsc) == FALSE) {
762 check_migration_threshold(rsc, node, data_set);
773 for (; gIter != NULL; gIter = gIter->next) {
786 for (; gIter != NULL; gIter = gIter->next) {
794 calculate_system_health(gpointer gKey, gpointer gValue, gpointer user_data)
796 const char *key = (
const char *)gKey;
797 const char *value = (
const char *)gValue;
798 int *system_health = (
int *)user_data;
800 if (!gKey || !gValue || !user_data) {
822 if (health_strategy == NULL ||
safe_str_eq(health_strategy,
"none")) {
829 }
else if (
safe_str_eq(health_strategy,
"migrate-on-red")) {
838 }
else if (
safe_str_eq(health_strategy,
"only-green")) {
847 }
else if (
safe_str_eq(health_strategy,
"progressive")) {
854 }
else if (
safe_str_eq(health_strategy,
"custom")) {
863 crm_err(
"Unknown node health strategy: %s", health_strategy);
867 crm_info(
"Applying automated node health strategy: %s", health_strategy);
869 for (gIter = data_set->
nodes; gIter != NULL; gIter = gIter->next) {
870 int system_health = base_health;
874 g_hash_table_foreach(node->
details->
attrs, calculate_system_health, &system_health);
876 crm_info(
" Node %s has an combined system health of %d",
882 if (system_health != 0) {
886 for (; gIter2 != NULL; gIter2 = gIter2->next) {
889 rsc2node_new(health_strategy, rsc, system_health, NULL, node, data_set);
902 if (data_set->
input == NULL) {
912 apply_system_health(data_set);
924 action_t *probe_node_complete = NULL;
926 for (
GListPtr gIter = data_set->
nodes; gIter != NULL; gIter = gIter->next) {
935 pe_fence_node(data_set, node,
"the connection is unrecoverable");
947 if (probed != NULL &&
crm_is_true(probed) == FALSE) {
955 for (
GListPtr gIter2 = data_set->
resources; gIter2 != NULL; gIter2 = gIter2->next) {
975 for (; gIter != NULL; gIter = gIter->next) {
977 rsc_discover_filter(child_rsc, node);
997 crm_trace(
"Applying placement constraints");
999 gIter = data_set->
nodes;
1000 for (; gIter != NULL; gIter = gIter->next) {
1006 }
else if (node->
weight >= 0.0
1012 apply_placement_constraints(data_set);
1014 gIter = data_set->
nodes;
1015 for (; gIter != NULL; gIter = gIter->next) {
1020 for (; gIter2 != NULL; gIter2 = gIter2->next) {
1023 common_apply_stickiness(rsc, node, data_set);
1024 rsc_discover_filter(rsc, node);
1040 for (; gIter != NULL; gIter = gIter->next) {
1055 check_actions(data_set);
1060 convert_const_pointer(
const void *ptr)
1067 sort_rsc_process_order(gconstpointer a, gconstpointer b, gpointer
data)
1073 const char *reason =
"existence";
1082 GHashTable *r1_nodes = NULL;
1083 GHashTable *r2_nodes = NULL;
1085 if (a == NULL && b == NULL) {
1095 reason =
"priority";
1099 if (r1_weight > r2_weight) {
1104 if (r1_weight < r2_weight) {
1109 reason =
"no node list";
1110 if (nodes == NULL) {
1115 resource1->
id, NULL, NULL, 1,
1120 resource2->
id, NULL, NULL, 1,
1125 reason =
"current location";
1130 r1_node = pe__current_node(resource1);
1131 r1_node = g_hash_table_lookup(r1_nodes, r1_node->
details->
id);
1132 if (r1_node != NULL) {
1133 r1_weight = r1_node->
weight;
1137 r2_node = pe__current_node(resource2);
1138 r2_node = g_hash_table_lookup(r2_nodes, r2_node->
details->
id);
1139 if (r2_node != NULL) {
1140 r2_weight = r2_node->
weight;
1144 if (r1_weight > r2_weight) {
1149 if (r1_weight < r2_weight) {
1155 for (gIter = nodes; gIter != NULL; gIter = gIter->next) {
1163 r1_node = g_hash_table_lookup(r1_nodes, node->
details->
id);
1166 r1_weight = r1_node->
weight;
1171 r2_node = g_hash_table_lookup(r2_nodes, node->
details->
id);
1174 r2_weight = r2_node->
weight;
1177 if (r1_weight > r2_weight) {
1182 if (r1_weight < r2_weight) {
1189 crm_trace(
"%s (%d) on %s %c %s (%d) on %s: %s",
1190 resource1->
id, r1_weight, r1_node ? r1_node->
details->
id :
"n/a",
1191 rc < 0 ? '>
' : rc > 0 ? '<
' : '=
',
1192 resource2->id, r2_weight, r2_node ? r2_node->details->id : "n/a", reason);
1195 g_hash_table_destroy(r1_nodes);
1198 g_hash_table_destroy(r2_nodes);
1205 allocate_resources(pe_working_set_t * data_set)
1207 GListPtr gIter = NULL;
1209 if (is_set(data_set->flags, pe_flag_have_remote_nodes)) {
1210 /* Force remote connection resources to be allocated first. This
1211 * also forces any colocation dependencies to be allocated as well */
1212 for (gIter = data_set->resources; gIter != NULL; gIter = gIter->next) {
1213 resource_t *rsc = (resource_t *) gIter->data;
1214 if (rsc->is_remote_node == FALSE) {
1217 pe_rsc_trace(rsc, "Allocating: %s", rsc->id);
1218 /* For remote node connection resources, always prefer the partial
1219 * migration target during resource allocation, if the rsc is in the
1220 * middle of a migration.
1222 rsc->cmds->allocate(rsc, rsc->partial_migration_target, data_set);
1226 /* now do the rest of the resources */
1227 for (gIter = data_set->resources; gIter != NULL; gIter = gIter->next) {
1228 resource_t *rsc = (resource_t *) gIter->data;
1229 if (rsc->is_remote_node == TRUE) {
1232 pe_rsc_trace(rsc, "Allocating: %s", rsc->id);
1233 rsc->cmds->allocate(rsc, NULL, data_set);
1237 /* We always use pe_order_preserve with these convenience functions to exempt
1238 * internally generated constraints from the prohibition of user constraints
1239 * involving remote connection resources.
1241 * The start ordering additionally uses pe_order_runnable_left so that the
1242 * specified action is not runnable if the start is not runnable.
1246 order_start_then_action(resource_t *lh_rsc, action_t *rh_action,
1247 enum pe_ordering extra, pe_working_set_t *data_set)
1249 if (lh_rsc && rh_action && data_set) {
1250 custom_action_order(lh_rsc, start_key(lh_rsc), NULL,
1251 rh_action->rsc, NULL, rh_action,
1252 pe_order_preserve | pe_order_runnable_left | extra,
1258 order_action_then_stop(action_t *lh_action, resource_t *rh_rsc,
1259 enum pe_ordering extra, pe_working_set_t *data_set)
1261 if (lh_action && rh_rsc && data_set) {
1262 custom_action_order(lh_action->rsc, NULL, lh_action,
1263 rh_rsc, stop_key(rh_rsc), NULL,
1264 pe_order_preserve | extra, data_set);
1268 // Clear fail counts for orphaned rsc on all online nodes
1270 cleanup_orphans(resource_t * rsc, pe_working_set_t * data_set)
1272 GListPtr gIter = NULL;
1274 for (gIter = data_set->nodes; gIter != NULL; gIter = gIter->next) {
1275 node_t *node = (node_t *) gIter->data;
1277 if (node->details->online
1278 && pe_get_failcount(node, rsc, NULL, pe_fc_effective, NULL,
1281 pe_action_t *clear_op = NULL;
1283 clear_op = pe__clear_failcount(rsc, node, "it is orphaned",
1286 /* We can't use order_action_then_stop() here because its
1306 g_list_sort_with_data(data_set->
resources, sort_rsc_process_order, nodes);
1311 gIter = data_set->
nodes;
1312 for (; gIter != NULL; gIter = gIter->next) {
1321 allocate_resources(data_set);
1323 gIter = data_set->
nodes;
1324 for (; gIter != NULL; gIter = gIter->next) {
1375 for (gIter = data_set->
resources; gIter != NULL; gIter = gIter->next) {
1382 cleanup_orphans(rsc, data_set);
1389 for (gIter = data_set->
resources; gIter != NULL; gIter = gIter->next) {
1408 for (; gIter != NULL; gIter = gIter->next) {
1411 if (is_managed(child_rsc)) {
1425 for (; gIter != NULL; gIter = gIter->next) {
1428 if (is_managed(rsc)) {
1455 const char *fence_action =
"off";
1464 fence_action =
"reboot";
1471 stonith_op =
pe_fence_op(node, fence_action, FALSE,
"guest is unclean", data_set);
1473 __FUNCTION__, __LINE__);
1481 crm_info(
"Implying guest node %s is down (action %d) after %s fencing",
1489 crm_info(
"Implying guest node %s is down (action %d) "
1490 "after container %s is stopped (action %d)",
1492 container->
id, stop->
id);
1506 crm_info(
"Implying guest node %s is down (action %d) "
1507 "after connection is stopped (action %d)",
1513 crm_info(
"Implying guest node %s is down (action %d) ",
1530 gboolean integrity_lost = FALSE;
1531 gboolean need_stonith = TRUE;
1534 GList *shutdown_ops = NULL;
1542 crm_trace(
"Creating remote ordering constraints");
1543 apply_remote_node_ordering(data_set);
1545 crm_trace(
"Processing fencing and shutdown cases");
1546 if (any_managed_resources(data_set) == FALSE) {
1547 crm_notice(
"Delaying fencing operations until there are resources to manage");
1548 need_stonith = FALSE;
1552 for (gIter = data_set->
nodes; gIter != NULL; gIter = gIter->next) {
1561 fence_guest(node, data_set);
1571 stonith_op =
pe_fence_op(node, NULL, FALSE,
"node is unclean", data_set);
1578 dc_down = stonith_op;
1583 && (stonith_ops != NULL)) {
1594 stonith_ops = g_list_prepend(stonith_ops, stonith_op);
1610 shutdown_ops = g_list_prepend(shutdown_ops, down_op);
1615 integrity_lost = TRUE;
1620 if (integrity_lost) {
1622 pe_warn(
"YOUR RESOURCES ARE NOW LIKELY COMPROMISED");
1623 pe_err(
"ENABLE STONITH TO KEEP YOUR RESOURCES SAFE");
1626 crm_notice(
"Cannot fence unclean nodes until quorum is"
1627 " attained (or no-quorum-policy is set to ignore)");
1631 if (dc_down != NULL) {
1640 for (gIter = shutdown_ops; gIter != NULL; gIter = gIter->next) {
1643 crm_debug(
"Ordering shutdown on %s before %s on DC %s",
1657 for (gIter = stonith_ops; gIter != NULL; gIter = gIter->next) {
1661 }
else if (stonith_ops) {
1671 g_list_free(stonith_ops);
1672 g_list_free(shutdown_ops);
1693 guint interval_ms = 0;
1695 if (
parse_op_key(original_key, NULL, &task, &interval_ms)) {
1700 crm_err(
"search key: %s", original_key);
1724 crm_trace(
"Processing RH of ordering constraint %d", order->
id);
1726 if (rh_action != NULL) {
1727 rh_actions = g_list_prepend(NULL, rh_action);
1729 }
else if (rsc != NULL) {
1733 if (rh_actions == NULL) {
1734 pe_rsc_trace(rsc,
"No RH-Side (%s/%s) found for constraint..."
1749 for (; gIter != NULL; gIter = gIter->next) {
1763 g_list_free(rh_actions);
1775 crm_trace(
"Processing LH of ordering constraint %d", order->
id);
1778 if (lh_action != NULL) {
1779 lh_actions = g_list_prepend(NULL, lh_action);
1785 if (lh_actions == NULL && lh_rsc != rh_rsc) {
1787 char *op_type = NULL;
1788 guint interval_ms = 0;
1795 pe_rsc_trace(lh_rsc,
"No LH-Side (%s/%s) found for constraint %d with %s - ignoring",
1800 pe_rsc_trace(lh_rsc,
"No LH-Side (%s/%s) found for constraint %d with %s - ignoring",
1804 pe_rsc_trace(lh_rsc,
"No LH-Side (%s/%s) found for constraint %d with %s - creating",
1806 lh_action =
custom_action(lh_rsc, key, op_type, NULL, TRUE, TRUE, data_set);
1807 lh_actions = g_list_prepend(NULL, lh_action);
1814 for (; gIter != NULL; gIter = gIter->next) {
1817 if (rh_rsc == NULL && order->
rh_action) {
1821 rsc_order_then(lh_action_iter, rh_rsc, order);
1828 g_list_free(lh_actions);
1835 is_recurring_action(
action_t *action)
1837 const char *interval_ms_s = g_hash_table_lookup(action->
meta,
1841 return (interval_ms > 0);
1872 crm_trace(
"Order %s action %s relative to %s%s for %s%s",
1924 if (is_recurring_action(action)) {
1930 order_start_then_action(remote_rsc, action,
1945 node_t *cluster_node = NULL;
1952 cluster_node = pe__current_node(remote_rsc);
1992 }
else if (cluster_node == NULL) {
2001 }
else if (g_list_length(remote_rsc->
running_on) > 1
2027 if (action->
rsc == NULL) {
2037 crm_trace(
"Order %s action %s relative to %s%s (state: %s)",
2040 remote_rsc->
id, state2text(state));
2061 order_start_then_action(remote_rsc, action, order_opts, data_set);
2066 order_action_then_stop(action, remote_rsc,
2076 pe_fence_node(data_set, action->
node,
"resources are active and the connection is unrecoverable");
2083 order_action_then_stop(action, remote_rsc,
2090 order_start_then_action(remote_rsc, action,
pe_order_none, data_set);
2107 if (is_recurring_action(action)) {
2112 order_start_then_action(remote_rsc, action,
2116 node_t *cluster_node = pe__current_node(remote_rsc);
2124 pe_fence_node(data_set, action->
node,
"resources are in an unknown state and the connection is unrecoverable");
2135 order_action_then_stop(action, remote_rsc,
2154 for (
GListPtr gIter = data_set->
actions; gIter != NULL; gIter = gIter->next) {
2159 if (action->
rsc == NULL) {
2183 if (action->
node == NULL) {
2202 if (remote == NULL) {
2213 for (GList *item = action->
rsc->
actions; item != NULL;
2214 item = item->next) {
2220 action->
rsc, NULL, rsc_action,
2235 if (remote->container) {
2237 apply_container_ordering(action, data_set);
2241 apply_remote_ordering(action, data_set);
2257 const char *op = g_hash_table_lookup(rh_action->
meta,
"stonith_action");
2294 if (lh_rsc == NULL) {
2297 }
else if (rh_rsc && lh_rsc == rh_rsc) {
2301 if (lh_action == NULL && lh_action_task == NULL) {
2305 if (rh_action == NULL && rh_action_task == NULL) {
2316 }
else if (lh_action == NULL
2326 if (rh_rsc && lh_rsc->
container == rh_rsc) {
2330 }
else if (rh_action == NULL && rh_action_task
2352 order_type = order->
type;
2356 if (probes == NULL) {
2361 rh_actions = g_list_prepend(rh_actions, rh_action);
2363 }
else if (rh_rsc && rh_action_task) {
2367 if (rh_actions == NULL) {
2368 g_list_free(probes);
2372 crm_trace(
"Processing for LH probe based on ordering constraint %s -> %s"
2373 " (id=%d, type=%.6x)",
2374 lh_action ? lh_action->
uuid : lh_action_task,
2375 rh_action ? rh_action->
uuid : rh_action_task,
2378 for (pIter = probes; pIter != NULL; pIter = pIter->next) {
2382 for (rIter = rh_actions; rIter != NULL; rIter = rIter->next) {
2385 if (order_first_probe_unneeded(probe, rh_action_iter)) {
2392 g_list_free(rh_actions);
2393 g_list_free(probes);
2398 order_first_probe_then_restart_repromote(
pe_action_t * probe,
2403 bool interleave = FALSE;
2407 || probe->
rsc == NULL
2424 crm_trace(
"Processing based on %s %s -> %s %s",
2436 && probe->
rsc != after->
rsc) {
2448 for (gIter = then_actions; gIter != NULL; gIter = gIter->next) {
2458 g_list_free(then_actions);
2463 const char *interleave_s = g_hash_table_lookup(after->
rsc->
meta,
2479 for (gIter = after->
actions_after; gIter != NULL; gIter = gIter->next) {
2498 if (after->
rsc == NULL
2511 && interleave == TRUE
2512 && (compatible_rsc == NULL
2513 || compatible_rsc != after_wrapper->
action->
rsc)) {
2518 crm_trace(
"Proceeding through %s %s -> %s %s (type=0x%.6x)",
2523 after_wrapper->
type);
2525 order_first_probe_then_restart_repromote(probe, after_wrapper->
action, data_set);
2533 for (gIter = data_set->
actions; gIter != NULL; gIter = gIter->next) {
2548 for (gIter = rsc->
children; gIter != NULL; gIter = gIter->next) {
2551 order_first_rsc_probes(child, data_set);
2560 for (gIter = probes; gIter != NULL; gIter= gIter->next) {
2564 for (aIter = probe->
actions_after; aIter != NULL; aIter = aIter->next) {
2567 order_first_probe_then_restart_repromote(probe, after_wrapper->
action, data_set);
2568 clear_actions_tracking_flag(data_set);
2572 g_list_free(probes);
2580 for (gIter = data_set->
resources; gIter != NULL; gIter = gIter->next) {
2583 order_first_rsc_probes(rsc, data_set);
2586 order_first_probes_imply_stops(data_set);
2595 for (gIter = data_set->
resources; gIter != NULL; gIter = gIter->next) {
2647 start = actions->data;
2648 g_list_free(actions);
2652 crm_err(
"No start action for %s", rsc->
id);
2658 for (actions = start->actions_before; actions != NULL; actions = actions->next) {
2665 if(first->required_runnable_before) {
2667 for (clone_actions = first->actions_before; clone_actions != NULL; clone_actions = clone_actions->next) {
2678 crm_trace(
"Not a start op %s for %s", first->uuid, start->uuid);
2681 if(first_rsc == NULL) {
2685 crm_trace(
"Same parent %s for %s", first_rsc->id, start->uuid);
2688 }
else if(FALSE && pe_rsc_is_clone(
uber_parent(first_rsc)) == FALSE) {
2689 crm_trace(
"Not a clone %s for %s", first_rsc->id, start->uuid);
2693 crm_err(
"Applying %s before %s %d", first->uuid, start->uuid,
uber_parent(first_rsc)->variant);
2695 for (pIter = probes; pIter != NULL; pIter = pIter->next) {
2698 crm_err(
"Ordering %s before %s", first->uuid, probe->
uuid);
2709 order_first_probes(data_set);
2710 order_then_probes(data_set);
2716 GList *gIter = NULL;
2718 crm_trace(
"Applying ordering constraints");
2732 crm_trace(
"Applying ordering constraint: %d", order->
id);
2736 rsc_order_first(rsc, order, data_set);
2743 rsc_order_then(order->
lh_action, rsc, order);
2751 for (gIter = data_set->
actions; gIter != NULL; gIter = gIter->next) {
2758 order_probes(data_set);
2761 for (gIter = data_set->
actions; gIter != NULL; gIter = gIter->next) {
2768 for (gIter = data_set->
actions; gIter != NULL; gIter = gIter->next) {
2773 input_iter != NULL; input_iter = input_iter->next) {
2783 for (gIter = data_set->
resources; gIter != NULL; gIter = gIter->next) {
2791 static int transition_id = -1;
2803 crm_err(
"Calculated transition %d (with errors), saving inputs in %s",
2804 transition_id, filename);
2807 crm_warn(
"Calculated transition %d (with warnings), saving inputs in %s",
2808 transition_id, filename);
2811 crm_notice(
"Calculated transition %d, saving inputs in %s",
2812 transition_id, filename);
2815 crm_notice(
"Configuration errors found during scheduler processing,"
2816 " please run \"crm_verify -L\" to identify issues");
2827 const char *value = NULL;
2830 crm_trace(
"Creating transition graph %d.", transition_id);
2859 char *recheck_epoch = NULL;
2864 free(recheck_epoch);
2881 for (; gIter != NULL; gIter = gIter->next) {
2894 crm_trace(
"processing non-resource actions");
2897 for (; gIter != NULL; gIter = gIter->next) {
2914 crm_crit(
"Cannot %s node '%s' because of %s:%s%s (%s)",
2927 crm_trace(
"Created transition graph %d.", transition_id);
2937 for (gIter = data_set->
actions; gIter != NULL; gIter = gIter->next) {
2938 char *node_name = NULL;
2942 if (action->
rsc != NULL) {
2950 }
else if(action->
node) {
2956 task = strdup(
"Shutdown");
2958 const char *op = g_hash_table_lookup(action->
meta,
"stonith_action");
2964 }
else if(terminal && action->
reason) {
2965 printf(
" * %s %s '%s'\n", task, node_name, action->
reason);
2966 }
else if(terminal) {
2967 printf(
" * %s %s\n", task, node_name);
2968 }
else if(action->
reason) {