15 #define VARIANT_CLONE 1
22 sort_rsc_id(gconstpointer a, gconstpointer b)
35 num1 = strtol(strrchr(resource1->
id,
':') + 1, NULL, 10);
36 num2 = strtol(strrchr(resource2->
id,
':') + 1, NULL, 10);
39 }
else if (num1 > num2) {
50 if (node != NULL && rsc->
parent) {
52 }
else if(node != NULL) {
67 for (; gIter != NULL; gIter = gIter->next) {
70 if (did_fail(child_rsc)) {
102 pe_node_t *current_node1 = pe__current_node(rsc1);
103 pe_node_t *current_node2 = pe__current_node(rsc2);
114 g_hash_table_insert(hash1, (gpointer) n->
details->
id, n);
117 g_hash_table_insert(hash2, (gpointer) n->
details->
id, n);
121 gIter = gIter->next) {
134 gIter = gIter->next) {
138 if (!pcmk__colocation_has_influence(constraint, rsc1)) {
151 gIter = gIter->next) {
164 gIter = gIter->next) {
168 if (!pcmk__colocation_has_influence(constraint, rsc2)) {
180 node1 = g_hash_table_lookup(hash1, current_node1->
details->
id);
181 node2 = g_hash_table_lookup(hash2, current_node2->
details->
id);
185 crm_trace(
"%s > %s: current score: %d %d",
191 crm_trace(
"%s < %s: current score: %d %d",
198 crm_trace(
"%s > %s: current score: %d %d",
205 list1 = g_hash_table_get_values(hash1);
206 list2 = g_hash_table_get_values(hash2);
211 for (GList *gIter1 = list1, *gIter2 = list2;
212 (gIter1 != NULL) && (gIter2 != NULL);
213 gIter1 = gIter1->next, gIter2 = gIter2->next) {
219 crm_trace(
"%s < %s: colocated score NULL", rsc1->
id, rsc2->
id);
223 }
else if (node2 == NULL) {
224 crm_trace(
"%s > %s: colocated score NULL", rsc1->
id, rsc2->
id);
242 g_hash_table_destroy(hash1);
243 g_hash_table_destroy(hash2);
258 unsigned int nnodes1 = 0;
259 unsigned int nnodes2 = 0;
261 gboolean can1 = TRUE;
262 gboolean can2 = TRUE;
284 if ((nnodes1 > 0) && (nnodes2 > 0)) {
285 if (nnodes1 < nnodes2) {
286 crm_trace(
"%s < %s: running_on", resource1->
id, resource2->
id);
289 }
else if (nnodes1 > nnodes2) {
290 crm_trace(
"%s > %s: running_on", resource1->
id, resource2->
id);
296 node1 = current_node1;
297 node2 = current_node2;
301 if (match == NULL || match->
weight < 0) {
302 crm_trace(
"%s: current location is unavailable", resource1->
id);
311 if (match == NULL || match->
weight < 0) {
312 crm_trace(
"%s: current location is unavailable", resource2->
id);
319 crm_trace(
"%s < %s: availability of current location", resource1->
id,
323 }
else if (!can1 && can2) {
324 crm_trace(
"%s > %s: availability of current location", resource1->
id,
331 crm_trace(
"%s < %s: priority", resource1->
id, resource2->
id);
335 crm_trace(
"%s > %s: priority", resource1->
id, resource2->
id);
340 if (node1 == NULL && node2 == NULL) {
341 crm_trace(
"%s == %s: not active", resource1->
id, resource2->
id);
344 }
else if (node1 == NULL) {
348 }
else if (node2 == NULL) {
360 }
else if (!can1 && can2) {
368 node1 = parent_node_instance(resource1, node1);
369 node2 = parent_node_instance(resource2, node2);
370 if (node1 == NULL && node2 == NULL) {
371 crm_trace(
"%s == %s: not allowed", resource1->
id, resource2->
id);
374 }
else if (node1 == NULL) {
375 crm_trace(
"%s > %s: not allowed", resource1->
id, resource2->
id);
378 }
else if (node2 == NULL) {
379 crm_trace(
"%s < %s: not allowed", resource1->
id, resource2->
id);
396 can1 = did_fail(resource1);
397 can2 = did_fail(resource2);
401 }
else if (!can1 && can2) {
406 rc = order_instance_by_colocation(resource1, resource2, data_set);
412 rc = strcmp(resource1->
id, resource2->
id);
413 crm_trace(
"%s %c %s: default", resource1->
id, rc < 0 ?
'<' :
'>', resource2->
id);
425 while (g_hash_table_iter_next(&iter, NULL, (
void **)&local_node)) {
426 can_run_instance(rsc, local_node, limit);
442 local_node = parent_node_instance(rsc, node);
444 if (local_node == NULL) {
448 }
else if (local_node->
weight < 0) {
450 pe_rsc_trace(rsc,
"%s cannot run on %s: Parent node weight doesn't allow it.",
453 }
else if (local_node->
count < limit) {
454 pe_rsc_trace(rsc,
"%s can run on %s (already running %d)",
459 pe_rsc_trace(rsc,
"%s cannot run on %s: node full (%d >= %d)",
475 GHashTable *backup = NULL;
478 pe_rsc_trace(rsc,
"Checking allocation of %s (preferring %s, using %s parent colocations)",
480 (all_coloc?
"all" :
"some"));
486 pe_rsc_debug(rsc,
"Dependency loop detected involving %s", rsc->
id);
493 append_parent_colocation(rsc->
parent, rsc, all_coloc);
498 if (local_prefer == NULL || local_prefer->
weight < 0) {
499 pe_rsc_trace(rsc,
"Not pre-allocating %s to %s - unavailable", rsc->
id,
505 can_run_instance(rsc, NULL, limit);
511 crm_info(
"Not pre-allocating %s to %s because %s is better",
520 pe_node_t *local_node = parent_node_instance(rsc, chosen);
534 g_hash_table_destroy(backup);
546 for (; gIter != NULL; gIter = gIter->next) {
555 for (; gIter != NULL; gIter = gIter->next) {
558 if (!pcmk__colocation_has_influence(cons, child)) {
561 if (all || cons->
score < 0) {
578 int available_nodes = 0;
579 bool all_coloc =
false;
582 for(GList *nIter = nodes; nIter != NULL; nIter = nIter->next) {
591 all_coloc = (max < available_nodes) ?
true :
false;
593 if(available_nodes) {
594 loop_max = max / available_nodes;
600 pe_rsc_debug(rsc,
"Allocating up to %d %s instances to a possible %d nodes (at most %d per host, %d optimal)",
601 max, rsc->
id, available_nodes, per_host_max, loop_max);
604 for (GList *gIter = children; gIter != NULL && allocated < max; gIter = gIter->next) {
616 child_node = pe__current_node(child);
617 local_node = parent_node_instance(child, child_node);
620 "Checking pre-allocation of %s to %s (%d remaining of %d)",
621 child->
id, child_node->details->uname, max - allocated,
625 pe_rsc_trace(rsc,
"Not pre-allocating because %s can not run %s",
626 child_node->details->uname, child->
id);
630 if ((local_node != NULL) && (local_node->
count >= loop_max)) {
632 "Not pre-allocating because %s already allocated "
633 "optimal instances", child_node->details->uname);
637 if (allocate_instance(child, child_node, all_coloc, per_host_max,
640 child_node->details->uname);
645 pe_rsc_trace(rsc,
"Done pre-allocating (%d of %d)", allocated, max);
647 for (GList *gIter = children; gIter != NULL; gIter = gIter->next) {
651 pe_node_t *child_node = pe__current_node(child);
652 pe_node_t *local_node = parent_node_instance(child, child_node);
654 if (local_node == NULL) {
655 crm_err(
"%s is running on %s which isn't allowed",
661 }
else if (allocated >= max) {
662 pe_rsc_debug(rsc,
"Child %s not allocated - limit reached %d %d", child->
id, allocated, max);
665 if (allocate_instance(child, NULL, all_coloc, per_host_max,
672 pe_rsc_debug(rsc,
"Allocated %d %s instances of a possible %d",
673 allocated, rsc->
id, max);
682 clone_variant_data_t *clone_data = NULL;
684 get_clone_variant_data(clone_data, rsc);
690 pe_rsc_debug(rsc,
"Dependency loop detected involving %s", rsc->
id);
703 for (GList *gIter = rsc->
rsc_cons; gIter != NULL; gIter = gIter->next) {
711 for (GList *gIter = rsc->
rsc_cons_lhs; gIter != NULL; gIter = gIter->next) {
714 if (!pcmk__colocation_has_influence(constraint, NULL)) {
743 clone_update_pseudo_status(
pe_resource_t * rsc, gboolean * stopping, gboolean * starting,
751 for (; gIter != NULL; gIter = gIter->next) {
754 clone_update_pseudo_status(child, stopping, starting, active);
769 for (; gIter != NULL; gIter = gIter->next) {
772 if (*starting && *stopping) {
779 }
else if (!pcmk_any_flags_set(action->
flags,
790 pe_rsc_trace(rsc,
"Skipping pseudo-op: %s run=%d, pseudo=%d",
807 find_rsc_action(
pe_resource_t *rsc,
const char *task, gboolean active_only,
811 GList *possible = NULL;
812 GList *active = NULL;
817 GList *gIter = possible;
819 for (; gIter != NULL; gIter = gIter->next) {
823 active = g_list_prepend(active, op);
827 if (active && pcmk__list_of_1(active)) {
828 match = g_list_nth_data(active, 0);
836 }
else if (possible && pcmk__list_of_1(possible)) {
837 match = g_list_nth_data(possible, 0);
846 g_list_free(possible);
863 gboolean active_only = TRUE;
864 clone_variant_data_t *clone_data = NULL;
866 get_clone_variant_data(clone_data, rsc);
868 if (clone_data->ordered == FALSE) {
874 for (gIter = rsc->
children; gIter != NULL; gIter = gIter->next) {
877 stop = find_rsc_action(child,
RSC_STOP, active_only, NULL);
886 start = find_rsc_action(child,
RSC_START, active_only, NULL);
900 clone_variant_data_t *clone_data = NULL;
902 get_clone_variant_data(clone_data, rsc);
904 child_ordering_constraints(rsc, data_set);
914 gboolean child_active = FALSE;
915 gboolean child_starting = FALSE;
916 gboolean child_stopping = FALSE;
917 gboolean allow_dependent_migrations = TRUE;
927 for (GList *gIter = children; gIter != NULL; gIter = gIter->next) {
929 gboolean starting = FALSE;
930 gboolean stopping = FALSE;
933 clone_update_pseudo_status(child_rsc, &stopping, &starting, &child_active);
934 if (stopping && starting) {
935 allow_dependent_migrations = FALSE;
938 child_stopping |= stopping;
939 child_starting |= starting;
947 if (child_active || child_starting) {
951 if (start_notify != NULL && *start_notify == NULL) {
959 if (allow_dependent_migrations) {
964 if (stop_notify != NULL && *stop_notify == NULL) {
967 if (start_notify && *start_notify && *stop_notify) {
978 clone_variant_data_t *clone_data = NULL;
980 get_clone_variant_data(clone_data, rsc);
992 if (clone_data->ordered) {
996 for (gIter = rsc->
children; gIter != NULL; gIter = gIter->next) {
1004 if (clone_data->ordered && last_rsc) {
1011 if (clone_data->ordered && last_rsc) {
1015 last_rsc = child_rsc;
1025 bool changed = FALSE;
1029 for (GList *gIter = rsc->
children; gIter != NULL; gIter = gIter->next) {
1052 CRM_CHECK(child_rsc && local_node,
return FALSE);
1055 node = child_rsc->
fns->
location(child_rsc, NULL, current);
1071 crm_trace(
"%s - not allocated %d", child_rsc->
id, current);
1082 GList *gIter = NULL;
1083 GList *scratch = NULL;
1086 local_node = local_child->
fns->
location(local_child, NULL, current);
1091 scratch = g_hash_table_get_values(local_child->
allowed_nodes);
1095 for (; gIter != NULL; gIter = gIter->next) {
1106 g_list_free(scratch);
1127 GList *gIter = NULL;
1128 gboolean do_interleave = FALSE;
1129 const char *interleave_s = NULL;
1132 CRM_CHECK(rsc_lh != NULL,
pe_err(
"rsc_lh was NULL for %s", constraint->
id);
return);
1133 CRM_CHECK(rsc_rh != NULL,
pe_err(
"rsc_rh was NULL for %s", constraint->
id);
return);
1136 pe_rsc_trace(rsc_rh,
"Processing constraint %s: %s -> %s %d",
1137 constraint->
id, rsc_lh->
id, rsc_rh->
id, constraint->
score);
1144 pe_rsc_trace(rsc_rh,
"Handling %s as a clone colocation", constraint->
id);
1157 "support the same number of instances per node",
1161 do_interleave = TRUE;
1169 }
else if (do_interleave) {
1181 crm_notice(
"Cannot pair %s with instance of %s", rsc_lh->
id, rsc_rh->
id);
1185 pe_rsc_debug(rsc_rh,
"Cannot pair %s with instance of %s", rsc_lh->
id, rsc_rh->
id);
1194 for (; gIter != NULL; gIter = gIter->next) {
1200 rhs = g_list_prepend(rhs, chosen);
1210 for (; gIter != NULL; gIter = gIter->next) {
1229 char *key = action->
uuid;
1230 int lpc = strlen(key);
1232 for (; lpc > 0; lpc--) {
1233 if (key[lpc] ==
'_' && stop == 0) {
1236 }
else if (key[lpc] ==
'_') {
1237 char *task_mutable = NULL;
1240 task_mutable = strdup(key + lpc);
1241 task_mutable[stop - lpc] = 0;
1243 crm_trace(
"Extracted action '%s' from '%s'", task_mutable, key);
1256 #define pe__clear_action_summary_flags(flags, action, flag) do { \
1257 flags = pcmk__clear_flags_as(__func__, __LINE__, LOG_TRACE, \
1258 "Action summary", action->rsc->id, \
1259 flags, flag, #flag); \
1265 GList *gIter = NULL;
1266 gboolean any_runnable = FALSE;
1267 gboolean check_runnable = TRUE;
1272 for (gIter = children; gIter != NULL; gIter = gIter->next) {
1277 pe_rsc_trace(action->
rsc,
"Checking for %s in %s on %s (%s)", task_s, child->
id,
1278 node ? node->details->uname :
"none", child_action?child_action->
uuid:
"NA");
1285 child_action->
uuid);
1290 any_runnable = TRUE;
1295 if (check_runnable && any_runnable == FALSE) {
1317 pe_rsc_trace(rsc,
"Processing location constraint %s for %s", constraint->
id, rsc->
id);
1321 for (; gIter != NULL; gIter = gIter->next) {
1331 GList *gIter = NULL;
1332 clone_variant_data_t *clone_data = NULL;
1334 get_clone_variant_data(clone_data, rsc);
1337 for (; gIter != NULL; gIter = gIter->next) {
1343 if (clone_data->start_notify) {
1349 if (clone_data->stop_notify) {
1355 if (clone_data->promote_notify) {
1361 if (clone_data->demote_notify) {
1370 for (; gIter != NULL; gIter = gIter->next) {
1373 child_rsc->
cmds->
expand(child_rsc, data_set);
1380 clone_data->demote_notify = NULL;
1382 clone_data->stop_notify = NULL;
1384 clone_data->start_notify = NULL;
1386 clone_data->promote_notify = NULL;
1394 for (GList *child_iter = rsc->
children; child_iter != NULL;
1395 child_iter = child_iter->next) {
1399 if (rsc_known_on(child, node)) {
1405 GHashTableIter iter;
1408 g_hash_table_iter_init(&iter, rsc->
known_on);
1409 while (g_hash_table_iter_next(&iter, NULL, (gpointer *) &known_node)) {
1422 for (GList *gIter = clone->
children; gIter != NULL; gIter = gIter->next) {
1425 if (rsc_known_on(child, node)) {
1437 gboolean any_created = FALSE;
1439 for (GList *child_iter = rsc->
children; child_iter != NULL;
1440 child_iter = child_iter->next) {
1460 if (child == NULL) {
1461 for (GList *child_iter = rsc->
children; child_iter && !child;
1462 child_iter = child_iter->next) {
1468 local_node = child_rsc->
fns->
location(child_rsc, NULL, FALSE);
1477 if (child == NULL) {
1488 gboolean any_created = FALSE;
1494 pe_warn(
"Clone %s has no children", rsc->
id);
1516 any_created = probe_unique_clone(rsc, node, complete, force, data_set);
1518 any_created = probe_anonymous_clone(rsc, node, complete, force,
1528 clone_variant_data_t *clone_data = NULL;
1530 get_clone_variant_data(clone_data, rsc);
#define CRM_CHECK(expr, failure_action)
void pcmk__create_notification_keys(pe_resource_t *rsc, notify_data_t *n_data, pe_working_set_t *data_set)
enum pe_action_flags clone_action_flags(pe_action_t *action, pe_node_t *node)
const char * task2text(enum action_tasks task)
void clone_append_meta(pe_resource_t *rsc, xmlNode *xml)
bool is_set_recursive(pe_resource_t *rsc, long long flag, bool any)
#define crm_notice(fmt, args...)
gboolean(* create_probe)(pe_resource_t *, pe_node_t *, pe_action_t *, gboolean, pe_working_set_t *)
#define pe_rsc_debug(rsc, fmt, args...)
#define pe__show_node_weights(level, rsc, text, nodes, data_set)
#define pe__clear_action_summary_flags(flags, action, flag)
enum rsc_role_e(* state)(const pe_resource_t *, gboolean)
GList * sort_nodes_by_weight(GList *nodes, pe_node_t *active_node, pe_working_set_t *data_set)
pe_node_t * pe__find_active_on(const pe_resource_t *rsc, unsigned int *count_all, unsigned int *count_clean)
bool pcmk__strcase_any_of(const char *s,...) G_GNUC_NULL_TERMINATED
resource_alloc_functions_t * cmds
void collect_notification_data(pe_resource_t *rsc, gboolean state, gboolean activity, notify_data_t *n_data)
enum pe_action_flags(* action_flags)(pe_action_t *, pe_node_t *)
gint sort_clone_instance(gconstpointer a, gconstpointer b, gpointer data_set)
const char * crm_xml_add_int(xmlNode *node, const char *name, int value)
Create an XML attribute with specified name and integer value.
gboolean exclusive_discover
#define pcmk__config_err(fmt...)
gboolean native_assign_node(pe_resource_t *rsc, pe_node_t *chosen, gboolean force)
resource_object_functions_t * fns
void create_notifications(pe_resource_t *rsc, notify_data_t *n_data, pe_working_set_t *data_set)
const char * crm_xml_add(xmlNode *node, const char *name, const char *value)
Create an XML attribute with specified name and value.
pe_node_t * pe__copy_node(const pe_node_t *this_node)
enum pe_action_flags summary_action_flags(pe_action_t *action, GList *children, pe_node_t *node)
void node_list_exclude(GHashTable *list, GList *list2, gboolean merge_scores)
GHashTable *(* merge_weights)(pe_resource_t *, const char *, GHashTable *, const char *, float, enum pe_weights)
#define PCMK_XE_PROMOTED_NODE_MAX_LEGACY
void resource_location(pe_resource_t *rsc, pe_node_t *node, int score, const char *tag, pe_working_set_t *data_set)
void native_expand(pe_resource_t *rsc, pe_working_set_t *data_set)
void native_rsc_location(pe_resource_t *rsc, pe__location_t *constraint)
void pcmk__add_promotion_scores(pe_resource_t *rsc)
GHashTable * pcmk__native_merge_weights(pe_resource_t *rsc, const char *rhs, GHashTable *nodes, const char *attr, float factor, uint32_t flags)
#define XML_RSC_ATTR_INCARNATION_MAX
gboolean is_child_compatible(pe_resource_t *child_rsc, pe_node_t *local_node, enum rsc_role_e filter, gboolean current)
gboolean can_run_resources(const pe_node_t *node)
#define PCMK_XE_PROMOTED_MAX_LEGACY
char * crm_meta_name(const char *field)
notify_data_t * create_notification_boundaries(pe_resource_t *rsc, const char *action, pe_action_t *start, pe_action_t *end, pe_working_set_t *data_set)
void free_notification_data(notify_data_t *n_data)
void promotable_constraints(pe_resource_t *rsc, pe_working_set_t *data_set)
#define pe__set_resource_flags(resource, flags_to_set)
void distribute_children(pe_resource_t *rsc, GList *children, GList *nodes, int max, int per_host_max, pe_working_set_t *data_set)
#define pe_rsc_provisional
void clone_rsc_colocation_lh(pe_resource_t *lh_rsc, pe_resource_t *rh_rsc, pcmk__colocation_t *constraint, pe_working_set_t *data_set)
#define crm_warn(fmt, args...)
void(* create_actions)(pe_resource_t *, pe_working_set_t *)
void create_promotable_actions(pe_resource_t *rsc, pe_working_set_t *data_set)
void clone_expand(pe_resource_t *rsc, pe_working_set_t *data_set)
#define order_stop_stop(rsc1, rsc2, type)
pe_action_t * create_pseudo_resource_op(pe_resource_t *rsc, const char *task, bool optional, bool runnable, pe_working_set_t *data_set)
pe_node_t * pcmk__clone_allocate(pe_resource_t *rsc, pe_node_t *preferred, pe_working_set_t *data_set)
void clone_rsc_colocation_rh(pe_resource_t *lh_rsc, pe_resource_t *rh_rsc, pcmk__colocation_t *constraint, pe_working_set_t *data_set)
#define pe__clear_action_flags(action, flags_to_clear)
#define crm_trace(fmt, args...)
enum action_tasks get_complex_task(pe_resource_t *rsc, const char *name, gboolean allow_non_atomic)
#define pcmk_is_set(g, f)
Convenience alias for pcmk_all_flags_set(), to check single flag.
struct pe_node_shared_s * details
gboolean order_actions(pe_action_t *lh_action, pe_action_t *rh_action, enum pe_ordering order)
#define pe_rsc_promotable
enum action_tasks clone_child_action(pe_action_t *action)
void(* expand)(pe_resource_t *, pe_working_set_t *)
bool assign_node(pe_resource_t *rsc, pe_node_t *node, gboolean force)
#define XML_RSC_ATTR_INCARNATION_NODEMAX
gboolean update_action_flags(pe_action_t *action, enum pe_action_flags flags, const char *source, int line)
#define pe_rsc_allocating
enum pe_obj_types variant
int new_rsc_order(pe_resource_t *lh_rsc, const char *lh_task, pe_resource_t *rh_rsc, const char *rh_task, enum pe_ordering type, pe_working_set_t *data_set)
void common_update_score(pe_resource_t *rsc, const char *id, int score)
#define XML_RSC_ATTR_NOTIFY
void(* rsc_location)(pe_resource_t *, pe__location_t *)
void(* rsc_colocation_rh)(pe_resource_t *, pe_resource_t *, pcmk__colocation_t *, pe_working_set_t *)
GHashTable * pcmk__copy_node_table(GHashTable *nodes)
#define XML_RSC_ATTR_UNIQUE
void clone_create_pseudo_actions(pe_resource_t *rsc, GList *children, notify_data_t **start_notify, notify_data_t **stop_notify, pe_working_set_t *data_set)
pe_resource_t * find_compatible_child(pe_resource_t *local_child, pe_resource_t *rsc, enum rsc_role_e filter, gboolean current, pe_working_set_t *data_set)
#define XML_RSC_ATTR_PROMOTED_MAX
GHashTable * pcmk__strkey_table(GDestroyNotify key_destroy_func, GDestroyNotify value_destroy_func)
void clone_rsc_location(pe_resource_t *rsc, pe__location_t *constraint)
#define crm_err(fmt, args...)
void clone_create_actions(pe_resource_t *rsc, pe_working_set_t *data_set)
void(* internal_constraints)(pe_resource_t *, pe_working_set_t *)
#define pe__clear_resource_flags(resource, flags_to_clear)
gboolean clone_create_probe(pe_resource_t *rsc, pe_node_t *node, pe_action_t *complete, gboolean force, pe_working_set_t *data_set)
rsc_role_e
Possible roles that a resource can be in.
#define XML_RSC_ATTR_PROMOTED_NODEMAX
enum pe_action_flags flags
pe_node_t *(* location)(const pe_resource_t *, GList **, int)
#define order_start_start(rsc1, rsc2, type)
const char * node_attribute
void promotable_colocation_rh(pe_resource_t *lh_rsc, pe_resource_t *rh_rsc, pcmk__colocation_t *constraint, pe_working_set_t *data_set)
void native_deallocate(pe_resource_t *rsc)
gboolean crm_is_true(const char *s)
pe_resource_t * find_compatible_child_by_node(pe_resource_t *local_child, pe_node_t *local_node, pe_resource_t *rsc, enum rsc_role_e filter, gboolean current)
#define pe_rsc_trace(rsc, fmt, args...)
#define XML_RSC_ATTR_INTERLEAVE
GList * pe__resource_actions(const pe_resource_t *rsc, const pe_node_t *node, const char *task, bool require_node)
Find all actions of given type for a resource.
pe_node_t * pcmk__set_instance_roles(pe_resource_t *rsc, pe_working_set_t *data_set)
void clone_internal_constraints(pe_resource_t *rsc, pe_working_set_t *data_set)
#define pe_flag_show_scores
#define crm_info(fmt, args...)
pe_action_t * find_first_action(GList *input, const char *uuid, const char *task, pe_node_t *on_node)
void(* rsc_colocation_lh)(pe_resource_t *, pe_resource_t *, pcmk__colocation_t *, pe_working_set_t *)
int copies_per_node(pe_resource_t *rsc)
GHashTable * allowed_nodes
pe_node_t *(* allocate)(pe_resource_t *, pe_node_t *, pe_working_set_t *)