17 #define VARIANT_CLONE 1 24 sort_rsc_id(gconstpointer a, gconstpointer b)
37 num1 = strtol(strrchr(resource1->
id,
':') + 1, NULL, 10);
38 num2 = strtol(strrchr(resource2->
id,
':') + 1, NULL, 10);
41 }
else if (num1 > num2) {
52 if (node != NULL && rsc->
parent) {
54 }
else if(node != NULL) {
69 for (; gIter != NULL; gIter = gIter->next) {
72 if (did_fail(child_rsc)) {
104 pe_node_t *current_node1 = pe__current_node(rsc1);
105 pe_node_t *current_node2 = pe__current_node(rsc2);
116 g_hash_table_insert(hash1, (gpointer) n->
details->
id, n);
119 g_hash_table_insert(hash2, (gpointer) n->
details->
id, n);
123 gIter = gIter->next) {
136 gIter = gIter->next) {
140 if (!pcmk__colocation_has_influence(constraint, rsc1)) {
153 gIter = gIter->next) {
166 gIter = gIter->next) {
170 if (!pcmk__colocation_has_influence(constraint, rsc2)) {
182 node1 = g_hash_table_lookup(hash1, current_node1->
details->
id);
183 node2 = g_hash_table_lookup(hash2, current_node2->
details->
id);
187 crm_trace(
"%s > %s: current score: %d %d",
193 crm_trace(
"%s < %s: current score: %d %d",
200 crm_trace(
"%s > %s: current score: %d %d",
207 list1 = g_hash_table_get_values(hash1);
208 list2 = g_hash_table_get_values(hash2);
213 for (GList *gIter1 = list1, *gIter2 = list2;
214 (gIter1 != NULL) && (gIter2 != NULL);
215 gIter1 = gIter1->next, gIter2 = gIter2->next) {
221 crm_trace(
"%s < %s: colocated score NULL", rsc1->
id, rsc2->
id);
225 }
else if (node2 == NULL) {
226 crm_trace(
"%s > %s: colocated score NULL", rsc1->
id, rsc2->
id);
244 g_hash_table_destroy(hash1);
245 g_hash_table_destroy(hash2);
260 unsigned int nnodes1 = 0;
261 unsigned int nnodes2 = 0;
263 gboolean can1 = TRUE;
264 gboolean can2 = TRUE;
286 if ((nnodes1 > 0) && (nnodes2 > 0)) {
287 if (nnodes1 < nnodes2) {
288 crm_trace(
"%s < %s: running_on", resource1->
id, resource2->
id);
291 }
else if (nnodes1 > nnodes2) {
292 crm_trace(
"%s > %s: running_on", resource1->
id, resource2->
id);
298 node1 = current_node1;
299 node2 = current_node2;
303 if (match == NULL || match->
weight < 0) {
304 crm_trace(
"%s: current location is unavailable", resource1->
id);
313 if (match == NULL || match->
weight < 0) {
314 crm_trace(
"%s: current location is unavailable", resource2->
id);
321 crm_trace(
"%s < %s: availability of current location", resource1->
id,
325 }
else if (!can1 && can2) {
326 crm_trace(
"%s > %s: availability of current location", resource1->
id,
333 crm_trace(
"%s < %s: priority", resource1->
id, resource2->
id);
337 crm_trace(
"%s > %s: priority", resource1->
id, resource2->
id);
342 if (node1 == NULL && node2 == NULL) {
343 crm_trace(
"%s == %s: not active", resource1->
id, resource2->
id);
346 }
else if (node1 == NULL) {
350 }
else if (node2 == NULL) {
362 }
else if (!can1 && can2) {
370 node1 = parent_node_instance(resource1, node1);
371 node2 = parent_node_instance(resource2, node2);
372 if (node1 == NULL && node2 == NULL) {
373 crm_trace(
"%s == %s: not allowed", resource1->
id, resource2->
id);
376 }
else if (node1 == NULL) {
377 crm_trace(
"%s > %s: not allowed", resource1->
id, resource2->
id);
380 }
else if (node2 == NULL) {
381 crm_trace(
"%s < %s: not allowed", resource1->
id, resource2->
id);
398 can1 = did_fail(resource1);
399 can2 = did_fail(resource2);
403 }
else if (!can1 && can2) {
408 rc = order_instance_by_colocation(resource1, resource2,
data_set);
414 rc = strcmp(resource1->
id, resource2->
id);
415 crm_trace(
"%s %c %s: default", resource1->
id, rc < 0 ?
'<' :
'>', resource2->
id);
427 while (g_hash_table_iter_next(&iter, NULL, (
void **)&local_node)) {
428 can_run_instance(rsc, local_node, limit);
444 local_node = parent_node_instance(rsc, node);
446 if (local_node == NULL) {
450 }
else if (local_node->
weight < 0) {
452 pe_rsc_trace(rsc,
"%s cannot run on %s: Parent node weight doesn't allow it.",
455 }
else if (local_node->
count < limit) {
456 pe_rsc_trace(rsc,
"%s can run on %s (already running %d)",
461 pe_rsc_trace(rsc,
"%s cannot run on %s: node full (%d >= %d)",
477 GHashTable *backup = NULL;
480 pe_rsc_trace(rsc,
"Checking allocation of %s (preferring %s, using %s parent colocations)",
482 (all_coloc?
"all" :
"some"));
488 pe_rsc_debug(rsc,
"Dependency loop detected involving %s", rsc->
id);
495 append_parent_colocation(rsc->
parent, rsc, all_coloc);
500 if (local_prefer == NULL || local_prefer->
weight < 0) {
501 pe_rsc_trace(rsc,
"Not pre-allocating %s to %s - unavailable", rsc->
id,
507 can_run_instance(rsc, NULL, limit);
513 crm_info(
"Not pre-allocating %s to %s because %s is better",
522 pe_node_t *local_node = parent_node_instance(rsc, chosen);
536 g_hash_table_destroy(backup);
548 for (; gIter != NULL; gIter = gIter->next) {
557 for (; gIter != NULL; gIter = gIter->next) {
560 if (!pcmk__colocation_has_influence(cons, child)) {
563 if (all || cons->
score < 0) {
580 int available_nodes = 0;
581 bool all_coloc =
false;
584 for(GList *nIter = nodes; nIter != NULL; nIter = nIter->next) {
593 all_coloc = (max < available_nodes) ?
true :
false;
595 if(available_nodes) {
596 loop_max = max / available_nodes;
602 pe_rsc_debug(rsc,
"Allocating up to %d %s instances to a possible %d nodes (at most %d per host, %d optimal)",
603 max, rsc->
id, available_nodes, per_host_max, loop_max);
606 for (GList *gIter = children; gIter != NULL && allocated < max; gIter = gIter->next) {
618 child_node = pe__current_node(child);
619 local_node = parent_node_instance(child, child_node);
622 "Checking pre-allocation of %s to %s (%d remaining of %d)",
623 child->
id, child_node->details->uname, max - allocated,
627 pe_rsc_trace(rsc,
"Not pre-allocating because %s can not run %s",
628 child_node->details->uname, child->
id);
632 if ((local_node != NULL) && (local_node->
count >= loop_max)) {
634 "Not pre-allocating because %s already allocated " 635 "optimal instances", child_node->details->uname);
639 if (allocate_instance(child, child_node, all_coloc, per_host_max,
642 child_node->details->uname);
647 pe_rsc_trace(rsc,
"Done pre-allocating (%d of %d)", allocated, max);
649 for (GList *gIter = children; gIter != NULL; gIter = gIter->next) {
653 pe_node_t *child_node = pe__current_node(child);
654 pe_node_t *local_node = parent_node_instance(child, child_node);
656 if (local_node == NULL) {
657 crm_err(
"%s is running on %s which isn't allowed",
663 }
else if (allocated >= max) {
664 pe_rsc_debug(rsc,
"Child %s not allocated - limit reached %d %d", child->
id, allocated, max);
667 if (allocate_instance(child, NULL, all_coloc, per_host_max,
674 pe_rsc_debug(rsc,
"Allocated %d %s instances of a possible %d",
675 allocated, rsc->
id, max);
684 clone_variant_data_t *clone_data = NULL;
686 get_clone_variant_data(clone_data, rsc);
692 pe_rsc_debug(rsc,
"Dependency loop detected involving %s", rsc->
id);
705 for (GList *gIter = rsc->
rsc_cons; gIter != NULL; gIter = gIter->next) {
714 for (GList *gIter = rsc->
rsc_cons_lhs; gIter != NULL; gIter = gIter->next) {
717 if (!pcmk__colocation_has_influence(constraint, NULL)) {
745 clone_update_pseudo_status(
pe_resource_t * rsc, gboolean * stopping, gboolean * starting,
753 for (; gIter != NULL; gIter = gIter->next) {
756 clone_update_pseudo_status(child, stopping, starting, active);
771 for (; gIter != NULL; gIter = gIter->next) {
774 if (*starting && *stopping) {
781 }
else if (!pcmk_any_flags_set(
action->flags,
792 pe_rsc_trace(rsc,
"Skipping pseudo-op: %s run=%d, pseudo=%d",
814 for (GList *item = actions; item != NULL; item = item->next) {
826 g_list_free(actions);
838 clone_variant_data_t *clone_data = NULL;
840 get_clone_variant_data(clone_data, rsc);
842 if (clone_data->ordered == FALSE) {
848 for (gIter = rsc->
children; gIter != NULL; gIter = gIter->next) {
851 stop = find_rsc_action(child,
RSC_STOP);
860 start = find_rsc_action(child,
RSC_START);
874 clone_variant_data_t *clone_data = NULL;
876 get_clone_variant_data(clone_data, rsc);
878 child_ordering_constraints(rsc,
data_set);
888 gboolean child_active = FALSE;
889 gboolean child_starting = FALSE;
890 gboolean child_stopping = FALSE;
891 gboolean allow_dependent_migrations = TRUE;
901 for (GList *gIter = children; gIter != NULL; gIter = gIter->next) {
903 gboolean starting = FALSE;
904 gboolean stopping = FALSE;
907 clone_update_pseudo_status(child_rsc, &stopping, &starting, &child_active);
908 if (stopping && starting) {
909 allow_dependent_migrations = FALSE;
912 child_stopping |= stopping;
913 child_starting |= starting;
922 if (child_active || child_starting) {
926 if (start_notify != NULL && *start_notify == NULL) {
936 if (allow_dependent_migrations) {
940 if (stop_notify != NULL && *stop_notify == NULL) {
944 if (start_notify && *start_notify && *stop_notify) {
955 clone_variant_data_t *clone_data = NULL;
957 get_clone_variant_data(clone_data, rsc);
974 if (clone_data->ordered) {
978 for (gIter = rsc->
children; gIter != NULL; gIter = gIter->next) {
988 if (clone_data->ordered && last_rsc) {
997 if (clone_data->ordered && last_rsc) {
1001 last_rsc = child_rsc;
1014 CRM_CHECK(child_rsc && local_node,
return FALSE);
1017 node = child_rsc->
fns->
location(child_rsc, NULL, current);
1033 crm_trace(
"%s - not allocated %d", child_rsc->
id, current);
1044 GList *gIter = NULL;
1045 GList *scratch = NULL;
1048 local_node = local_child->
fns->
location(local_child, NULL, current);
1053 scratch = g_hash_table_get_values(local_child->
allowed_nodes);
1057 for (; gIter != NULL; gIter = gIter->next) {
1068 g_list_free(scratch);
1089 GList *gIter = NULL;
1090 gboolean do_interleave = FALSE;
1091 const char *interleave_s = NULL;
1095 pe_err(
"dependent was NULL for %s", constraint->
id);
return);
1097 pe_err(
"primary was NULL for %s", constraint->
id);
return);
1100 pe_rsc_trace(primary,
"Processing constraint %s: %s -> %s %d",
1101 constraint->
id, dependent->
id, primary->
id, constraint->
score);
1108 pe_rsc_trace(primary,
"Handling %s as a clone colocation",
1117 interleave_s = g_hash_table_lookup(constraint->
dependent->
meta,
1126 "support the same number of instances per node",
1131 do_interleave = TRUE;
1139 }
else if (do_interleave) {
1145 if (primary_instance != NULL) {
1147 dependent->
id, primary_instance->
id);
1152 crm_notice(
"Cannot pair %s with instance of %s",
1153 dependent->
id, primary->
id);
1157 pe_rsc_debug(primary,
"Cannot pair %s with instance of %s",
1158 dependent->
id, primary->
id);
1164 GList *affected_nodes = NULL;
1167 for (; gIter != NULL; gIter = gIter->next) {
1175 affected_nodes = g_list_prepend(affected_nodes, chosen);
1180 g_list_free(affected_nodes);
1185 for (; gIter != NULL; gIter = gIter->next) {
1204 char *key =
action->uuid;
1205 int lpc = strlen(key);
1207 for (; lpc > 0; lpc--) {
1208 if (key[lpc] ==
'_' && stop == 0) {
1211 }
else if (key[lpc] ==
'_') {
1212 char *task_mutable = NULL;
1215 task_mutable = strdup(key + lpc);
1216 task_mutable[stop - lpc] = 0;
1218 crm_trace(
"Extracted action '%s' from '%s'", task_mutable, key);
1231 #define pe__clear_action_summary_flags(flags, action, flag) do { \ 1232 flags = pcmk__clear_flags_as(__func__, __LINE__, LOG_TRACE, \ 1233 "Action summary", action->rsc->id, \ 1234 flags, flag, #flag); \ 1240 GList *gIter = NULL;
1241 gboolean any_runnable = FALSE;
1242 gboolean check_runnable = TRUE;
1247 for (gIter = children; gIter != NULL; gIter = gIter->next) {
1253 node ? node->details->uname :
"none", child_action?child_action->
uuid:
"NA");
1260 child_action->
uuid);
1265 any_runnable = TRUE;
1270 if (check_runnable && any_runnable == FALSE) {
1292 pe_rsc_trace(rsc,
"Processing location constraint %s for %s", constraint->
id, rsc->
id);
1296 for (; gIter != NULL; gIter = gIter->next) {
1306 GList *gIter = NULL;
1307 clone_variant_data_t *clone_data = NULL;
1309 get_clone_variant_data(clone_data, rsc);
1321 for (; gIter != NULL; gIter = gIter->next) {
1331 clone_data->demote_notify = NULL;
1333 clone_data->stop_notify = NULL;
1335 clone_data->start_notify = NULL;
1337 clone_data->promote_notify = NULL;
1345 for (GList *child_iter = rsc->
children; child_iter != NULL;
1346 child_iter = child_iter->next) {
1350 if (rsc_known_on(child, node)) {
1356 GHashTableIter iter;
1359 g_hash_table_iter_init(&iter, rsc->
known_on);
1360 while (g_hash_table_iter_next(&iter, NULL, (gpointer *) &known_node)) {
1361 if (node->
details == known_node->details) {
1373 for (GList *gIter = clone->
children; gIter != NULL; gIter = gIter->next) {
1376 if (rsc_known_on(child, node)) {
1388 gboolean any_created = FALSE;
1390 for (GList *child_iter = rsc->
children; child_iter != NULL;
1391 child_iter = child_iter->next) {
1411 if (child == NULL) {
1412 for (GList *child_iter = rsc->
children; child_iter && !child;
1413 child_iter = child_iter->next) {
1419 local_node = child_rsc->
fns->
location(child_rsc, NULL, FALSE);
1428 if (child == NULL) {
1439 gboolean any_created = FALSE;
1445 pe_warn(
"Clone %s has no children", rsc->
id);
1467 any_created = probe_unique_clone(rsc, node, complete, force,
data_set);
1469 any_created = probe_anonymous_clone(rsc, node, complete, force,
1479 clone_variant_data_t *clone_data = NULL;
1481 get_clone_variant_data(clone_data, rsc);
1524 GList *all_rscs, GHashTable *utilization)
1526 bool existing =
false;
1534 for (GList *iter = rsc->
children; iter != NULL; iter = iter->next) {
1536 if (g_list_find(all_rscs, child)) {
1540 for (GList *member_iter = child->
children; member_iter != NULL;
1541 member_iter = member_iter->next) {
1545 if (g_list_find(all_rscs, member) != NULL) {
1556 if (!existing && (rsc->
children != NULL)) {
#define CRM_CHECK(expr, failure_action)
const char * task2text(enum action_tasks task)
bool is_set_recursive(pe_resource_t *rsc, long long flag, bool any)
#define crm_notice(fmt, args...)
void(* add_utilization)(pe_resource_t *rsc, pe_resource_t *orig_rsc, GList *all_rscs, GHashTable *utilization)
#define pe_rsc_debug(rsc, fmt, args...)
#define pe__set_action_flags(action, flags_to_set)
#define pe__show_node_weights(level, rsc, text, nodes, data_set)
#define pe__clear_action_summary_flags(flags, action, flag)
#define pcmk__order_starts(rsc1, rsc2, type, 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
G_GNUC_INTERNAL bool pcmk__node_available(const pe_node_t *node)
resource_alloc_functions_t * cmds
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)
void pcmk__clone_shutdown_lock(pe_resource_t *rsc)
void clone_rsc_colocation_rh(pe_resource_t *dependent, pe_resource_t *primary, pcmk__colocation_t *constraint, pe_working_set_t *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...)
resource_object_functions_t * fns
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)
pe_resource_t * dependent
gint sort_clone_instance(gconstpointer a, gconstpointer b, gpointer data_set)
void node_list_exclude(GHashTable *list, GList *list2, gboolean merge_scores)
#define pcmk__order_stops(rsc1, rsc2, type, data_set)
#define PCMK_XE_PROMOTED_NODE_MAX_LEGACY
void(* internal_constraints)(pe_resource_t *, pe_working_set_t *)
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)
pe_node_t *(* allocate)(pe_resource_t *, pe_node_t *, pe_working_set_t *)
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
#define PCMK_XE_PROMOTED_MAX_LEGACY
char * crm_meta_name(const char *field)
void promotable_constraints(pe_resource_t *rsc, pe_working_set_t *data_set)
#define pe__set_resource_flags(resource, flags_to_set)
#define pe_rsc_provisional
pe_node_t *(* location)(const pe_resource_t *, GList **, int)
pe_node_t * pcmk__clone_allocate(pe_resource_t *rsc, pe_node_t *prefer, pe_working_set_t *data_set)
#define crm_warn(fmt, args...)
void promotable_colocation_rh(pe_resource_t *dependent, pe_resource_t *primary, pcmk__colocation_t *constraint, pe_working_set_t *data_set)
enum pe_action_flags clone_action_flags(pe_action_t *action, pe_node_t *node)
gboolean(* create_probe)(pe_resource_t *, pe_node_t *, pe_action_t *, gboolean, pe_working_set_t *)
void create_promotable_actions(pe_resource_t *rsc, pe_working_set_t *data_set)
void clone_append_meta(pe_resource_t *rsc, xmlNode *xml)
enum pe_action_flags summary_action_flags(pe_action_t *action, GList *children, pe_node_t *node)
G_GNUC_INTERNAL GList * pcmk__sort_nodes(GList *nodes, pe_node_t *active_node, pe_working_set_t *data_set)
void(* rsc_colocation_lh)(pe_resource_t *, pe_resource_t *, pcmk__colocation_t *, pe_working_set_t *)
G_GNUC_INTERNAL notify_data_t * pcmk__clone_notif_pseudo_ops(pe_resource_t *rsc, const char *task, pe_action_t *action, pe_action_t *complete)
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 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.
void pcmk__clone_add_utilization(pe_resource_t *rsc, pe_resource_t *orig_rsc, GList *all_rscs, GHashTable *utilization)
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
void(* expand)(pe_resource_t *, pe_working_set_t *)
pe_working_set_t * data_set
#define pcmk__order_resource_actions(lh_rsc, lh_task, rh_rsc, rh_task, flags, data_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 XML_RSC_ATTR_INCARNATION_NODEMAX
void clone_create_actions(pe_resource_t *rsc, pe_working_set_t *data_set)
void(* rsc_colocation_rh)(pe_resource_t *, pe_resource_t *, pcmk__colocation_t *, pe_working_set_t *)
enum pe_action_flags(* action_flags)(pe_action_t *, pe_node_t *)
#define pe_rsc_allocating
enum pe_obj_types variant
gboolean is_child_compatible(pe_resource_t *child_rsc, pe_node_t *local_node, enum rsc_role_e filter, gboolean current)
void common_update_score(pe_resource_t *rsc, const char *id, int score)
G_GNUC_INTERNAL void pcmk__unassign_resource(pe_resource_t *rsc)
#define XML_RSC_ATTR_NOTIFY
enum action_tasks clone_child_action(pe_action_t *action)
#define XML_RSC_ATTR_UNIQUE
G_GNUC_INTERNAL pe_action_t * pcmk__new_rsc_pseudo_action(pe_resource_t *rsc, const char *task, bool optional, bool runnable)
enum rsc_role_e(* state)(const pe_resource_t *, gboolean)
#define XML_RSC_ATTR_PROMOTED_MAX
gboolean clone_create_probe(pe_resource_t *rsc, pe_node_t *node, pe_action_t *complete, gboolean force, pe_working_set_t *data_set)
G_GNUC_INTERNAL void pcmk__create_notifications(pe_resource_t *rsc, notify_data_t *n_data)
GHashTable * pcmk__strkey_table(GDestroyNotify key_destroy_func, GDestroyNotify value_destroy_func)
pcmk__action_result_t result
void clone_expand(pe_resource_t *rsc, pe_working_set_t *data_set)
G_GNUC_INTERNAL GHashTable * pcmk__copy_node_table(GHashTable *nodes)
#define crm_err(fmt, args...)
void clone_rsc_location(pe_resource_t *rsc, pe__location_t *constraint)
void clone_rsc_colocation_lh(pe_resource_t *dependent, pe_resource_t *primary, pcmk__colocation_t *constraint, pe_working_set_t *data_set)
G_GNUC_INTERNAL bool pcmk__assign_resource(pe_resource_t *rsc, pe_node_t *node, bool force)
void(* rsc_location)(pe_resource_t *, pe__location_t *)
#define pe__clear_resource_flags(resource, flags_to_clear)
rsc_role_e
Possible roles that a resource can be in.
#define XML_RSC_ATTR_PROMOTED_NODEMAX
void(* create_actions)(pe_resource_t *, pe_working_set_t *)
enum pe_action_flags flags
const char * node_attribute
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)
void clone_internal_constraints(pe_resource_t *rsc, pe_working_set_t *data_set)
#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)
#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)
G_GNUC_INTERNAL void pcmk__apply_location(pe__location_t *constraint, pe_resource_t *rsc)
G_GNUC_INTERNAL void pcmk__free_notification_data(notify_data_t *n_data)
GHashTable *(* merge_weights)(pe_resource_t *, const char *, GHashTable *, const char *, float, enum pe_weights)
int copies_per_node(pe_resource_t *rsc)
GHashTable * allowed_nodes