26 #define INFINITY_HACK (PCMK_SCORE_INFINITY * -100) 58 if (colocation1 == NULL) {
61 if (colocation2 == NULL) {
95 if (pcmk__is_clone(
rsc1)) {
130 cmp_dependent_priority(gconstpointer a, gconstpointer b)
132 return cmp_colocation_priority(a, b,
true);
156 cmp_primary_priority(gconstpointer a, gconstpointer b)
158 return cmp_colocation_priority(a, b,
false);
176 pcmk__assert((list != NULL) && (colocation != NULL) && (rsc != NULL));
179 "Adding colocation %s (%s with %s using %s @%s) to " 180 "'this with' list for %s",
184 *list = g_list_insert_sorted(*list, (gpointer) colocation,
185 cmp_primary_priority);
210 *list = g_list_copy(addition);
216 for (
const GList *iter = addition; iter != NULL; iter = iter->next) {
236 pcmk__assert((list != NULL) && (colocation != NULL) && (rsc != NULL));
239 "Adding colocation %s (%s with %s using %s @%s) to " 240 "'with this' list for %s",
244 *list = g_list_insert_sorted(*list, (gpointer) colocation,
245 cmp_dependent_priority);
270 *list = g_list_copy(addition);
276 for (
const GList *iter = addition; iter != NULL; iter = iter->next) {
294 const char *first_tasks[] = { NULL, NULL };
295 const char *then_tasks[] = { NULL, NULL };
321 for (
int first_lpc = 0;
322 (first_lpc <= 1) && (first_tasks[first_lpc] != NULL); first_lpc++) {
324 for (
int then_lpc = 0;
325 (then_lpc <= 1) && (then_tasks[then_lpc] != NULL); then_lpc++) {
328 then_rsc, then_tasks[then_lpc],
350 const char *dependent_role,
const char *primary_role,
357 if ((dependent == NULL) || (primary == NULL)) {
359 "does not exist",
id);
365 "Ignoring colocation '%s' (%s with %s) because score is 0",
366 id, dependent->
id, primary->
id);
385 new_con->
score = score;
398 anti_colocation_order(dependent, new_con->
dependent_role, primary,
400 anti_colocation_order(primary, new_con->
primary_role, dependent,
419 const char *influence_s)
421 if (influence_s != NULL) {
439 unpack_colocation_set(xmlNode *
set,
int score,
const char *coloc_id,
442 xmlNode *xml_rsc = NULL;
445 const char *set_id = pcmk__xe_id(
set);
447 bool with_previous =
false;
448 int local_score = score;
449 bool sequential =
false;
451 const char *xml_rsc_id = NULL;
457 if (local_score == 0) {
458 crm_trace(
"Ignoring colocation '%s' for set '%s' because score is 0",
470 with_previous =
true;
475 " (such as %s) is deprecated and will be removed in a" 486 if (local_score > 0) {
491 xml_rsc_id = pcmk__xe_id(xml_rsc);
494 if (resource == NULL) {
497 "No such resource", xml_rsc_id, set_id);
502 | unpack_influence(coloc_id, resource, influence_s);
505 resource->
id, other->
id, set_id);
507 other, role, role,
flags);
510 other->
id, resource->
id, set_id);
512 resource, role, role,
flags);
528 xmlNode *xml_rsc_with = NULL;
530 xml_rsc_id = pcmk__xe_id(xml_rsc);
533 if (resource == NULL) {
536 "No such resource", xml_rsc_id, set_id);
540 | unpack_influence(coloc_id, resource, influence_s);
543 xml_rsc_with != NULL;
546 xml_rsc_id = pcmk__xe_id(xml_rsc_with);
554 resource, other, role, role,
flags);
573 colocate_rsc_sets(
const char *
id,
const xmlNode *set1,
const xmlNode *set2,
574 int score,
const char *influence_s,
577 xmlNode *xml_rsc = NULL;
581 const char *xml_rsc_id = NULL;
586 bool sequential =
false;
590 crm_trace(
"Ignoring colocation '%s' between sets %s and %s " 591 "because score is 0",
592 id, pcmk__xe_id(set1), pcmk__xe_id(set2));
600 if (xml_rsc != NULL) {
601 xml_rsc_id = pcmk__xe_id(xml_rsc);
607 "because first resource %s not found",
608 pcmk__xe_id(set1), pcmk__xe_id(set2),
622 xml_rsc_id = pcmk__xe_id(xml_rsc);
629 "because last resource %s not found",
630 pcmk__xe_id(set1), pcmk__xe_id(set2), xml_rsc_id);
635 if ((rsc_1 != NULL) && (rsc_2 != NULL)) {
640 }
else if (rsc_1 != NULL) {
646 xml_rsc_id = pcmk__xe_id(xml_rsc);
652 "in set %s: No such resource",
653 pcmk__xe_id(set1), xml_rsc_id,
661 }
else if (rsc_2 != NULL) {
666 xml_rsc_id = pcmk__xe_id(xml_rsc);
672 "with set %s: No such resource",
673 pcmk__xe_id(set1), xml_rsc_id,
678 | unpack_influence(
id, rsc_1, influence_s);
688 xmlNode *xml_rsc_2 = NULL;
690 xml_rsc_id = pcmk__xe_id(xml_rsc);
696 "with set %s: No such resource",
697 pcmk__xe_id(set1), xml_rsc_id,
703 | unpack_influence(
id, rsc_1, influence_s);
708 xml_rsc_id = pcmk__xe_id(xml_rsc_2);
714 "%s with set %s resource %s: No such " 716 pcmk__xe_id(set1), pcmk__xe_id(xml_rsc),
717 pcmk__xe_id(set2), xml_rsc_id);
721 role_1, role_2,
flags);
728 unpack_simple_colocation(xmlNode *xml_obj,
const char *
id,
742 const char *primary_instance = NULL;
743 const char *dependent_instance = NULL;
754 if (dependent_instance != NULL) {
757 "and will be removed in a future release");
759 if (primary_instance != NULL) {
762 "deprecated and will be removed in a future release");
765 if (dependent == NULL) {
767 "does not exist",
id, dependent_id);
770 }
else if (primary == NULL) {
772 "does not exist",
id, primary_id);
775 }
else if ((dependent_instance != NULL) && !pcmk__is_clone(dependent)) {
777 "is not a clone but instance '%s' was requested",
778 id, dependent_id, dependent_instance);
781 }
else if ((primary_instance != NULL) && !pcmk__is_clone(primary)) {
783 "is not a clone but instance '%s' was requested",
784 id, primary_id, primary_instance);
788 if (dependent_instance != NULL) {
790 if (dependent == NULL) {
792 "does not have an instance '%s'",
793 id, dependent_id, dependent_instance);
798 if (primary_instance != NULL) {
800 if (primary == NULL) {
802 "does not have an instance '%s'",
803 id, primary_id, primary_instance);
820 dependent_role, primary_role,
flags);
825 unpack_colocation_tags(xmlNode *xml_obj, xmlNode **expanded_xml,
828 const char *
id = NULL;
829 const char *dependent_id = NULL;
830 const char *primary_id = NULL;
831 const char *dependent_role = NULL;
832 const char *primary_role = NULL;
840 xmlNode *dependent_set = NULL;
841 xmlNode *primary_set = NULL;
842 bool any_sets =
false;
844 *expanded_xml = NULL;
846 CRM_CHECK(xml_obj != NULL,
return EINVAL);
848 id = pcmk__xe_id(xml_obj);
857 if (*expanded_xml != NULL) {
864 if ((dependent_id == NULL) || (primary_id == NULL)) {
871 "valid resource or tag",
id, dependent_id);
878 "valid resource or tag",
id, primary_id);
882 if ((dependent != NULL) && (primary != NULL)) {
887 if ((dependent_tag != NULL) && (primary_tag != NULL)) {
890 "tags cannot be colocated",
id);
905 *expanded_xml = NULL;
909 if (dependent_set != NULL) {
910 if (dependent_role != NULL) {
926 *expanded_xml = NULL;
930 if (primary_set != NULL) {
931 if (primary_role != NULL) {
945 *expanded_xml = NULL;
963 xmlNode *last = NULL;
965 xmlNode *orig_xml = NULL;
966 xmlNode *expanded_xml = NULL;
969 const char *score = NULL;
970 const char *influence_s = NULL;
972 if (pcmk__str_empty(
id)) {
978 if (unpack_colocation_tags(xml_obj, &expanded_xml,
982 if (expanded_xml != NULL) {
984 xml_obj = expanded_xml;
998 if (expanded_xml != NULL) {
1004 if (pcmk__str_empty(pcmk__xe_id(
set))) {
1009 unpack_colocation_set(
set, score_i,
id, influence_s,
scheduler);
1012 colocate_rsc_sets(
id, last,
set, score_i, influence_s,
scheduler);
1023 unpack_simple_colocation(xml_obj,
id, influence_s,
scheduler);
1088 for (iter = rsc->
actions; iter != NULL; iter = iter->next) {
1102 for (iter = rsc->
children; iter != NULL; iter = iter->next) {
1122 GList *colocations = NULL;
1124 bool is_start =
false;
1143 if (rsc->
parent != NULL) {
1148 for (iter = rsc->
children; iter != NULL; iter = iter->next) {
1153 if ((child_action == NULL)
1155 crm_trace(
"Not blocking %s colocation dependents because " 1156 "at least %s has runnable %s",
1162 crm_trace(
"Blocking %s colocation dependents due to unrunnable %s %s",
1167 for (iter = colocations; iter != NULL; iter = iter->next) {
1193 g_list_free(colocations);
1220 if (child != NULL) {
1254 && (colocation != NULL));
1261 dependent_role_rsc = get_resource_for_role(dependent);
1262 primary_role_rsc = get_resource_for_role(primary);
1265 && (dependent_role_rsc->
parent != NULL)
1285 crm_trace(
"Skipping colocation '%s': %s will not run anywhere",
1286 colocation->
id, dependent->
id);
1291 if (!pcmk__same_node(primary_node, dependent->
allocated_to)) {
1294 dependent->
id, primary->
id,
1296 pcmk__node_name(primary_node));
1302 if (pcmk__same_node(dependent->
allocated_to, primary_node)) {
1304 "assigned to the same node (%s)",
1305 dependent->
id, primary->
id,
1306 pcmk__node_name(primary_node));
1314 crm_trace(
"Skipping %scolocation '%s': dependent limited to %s role " 1316 "but %s next role is %s",
1317 ((colocation->
score < 0)?
"anti-" :
""),
1319 dependent_role_rsc->
id,
1326 crm_trace(
"Skipping %scolocation '%s': primary limited to %s role " 1327 "but %s next role is %s",
1328 ((colocation->
score < 0)?
"anti-" :
""),
1330 primary_role_rsc->
id,
1355 const char *value = NULL;
1356 GHashTable *work = NULL;
1357 GHashTableIter iter;
1361 value = pcmk__colocation_node_attr(primary->
allocated_to, attr,
1364 }
else if (colocation->
score < 0) {
1371 g_hash_table_iter_init(&iter, work);
1372 while (g_hash_table_iter_next(&iter, NULL, (
void **)&node)) {
1376 "Applied %s to %s score on %s (now %s after " 1377 "subtracting %s because primary %s inactive)",
1378 colocation->
id, dependent->
id,
1379 pcmk__node_name(node),
1385 if (pcmk__str_eq(pcmk__colocation_node_attr(node, attr, dependent),
1398 "Applied %s to %s score on %s (now %s after " 1400 colocation->
id, dependent->
id,
1401 pcmk__node_name(node),
1416 "Banned %s from %s because colocation %s attribute %s " 1418 dependent->
id, pcmk__node_name(node),
1419 colocation->
id, attr);
1433 "%s: Rolling back scores from %s (no available nodes)",
1434 dependent->
id, primary->
id);
1438 g_hash_table_destroy(work);
1460 const char *dependent_value = NULL;
1461 const char *primary_value = NULL;
1463 int score_multiplier = 1;
1464 int priority_delta = 0;
1467 && (colocation != NULL));
1490 dependent_value = pcmk__colocation_node_attr(dependent->
allocated_to, attr,
1492 primary_value = pcmk__colocation_node_attr(primary->
allocated_to, attr,
1503 score_multiplier = -1;
1514 score_multiplier = -1;
1517 priority_delta = score_multiplier * colocation->
score;
1520 "Applied %s to %s promotion priority (now %s after %s %d)",
1521 colocation->
id, dependent->
id,
1523 ((score_multiplier == 1)?
"adding" :
"subtracting"),
1526 return priority_delta;
1543 GHashTable *allowed_nodes_orig = NULL;
1544 GHashTableIter iter;
1547 const char *best_node = NULL;
1549 if ((colocation != NULL) && (rsc == colocation->
dependent)
1551 && pcmk__is_group(rsc->
parent)
1567 loc_iter != NULL; loc_iter = loc_iter->next) {
1579 while (g_hash_table_iter_next(&iter, NULL, (
void **) &node)) {
1581 if ((node->weight > best_score)
1583 && pcmk__str_eq(value, pcmk__colocation_node_attr(node, attr, rsc),
1586 best_score = node->weight;
1587 best_node = node->details->uname;
1592 if (best_node == NULL) {
1593 crm_info(
"No allowed node for %s matches node attribute %s=%s",
1594 rsc->
id, attr, value);
1596 crm_info(
"Allowed node %s for %s had best score (%d) " 1597 "of those matching node attribute %s=%s",
1598 best_node, rsc->
id, best_score, attr, value);
1602 if (allowed_nodes_orig != NULL) {
1620 GHashTableIter iter;
1622 int allowed_nodes = 0;
1625 while (g_hash_table_iter_next(&iter, NULL, (gpointer *) &allowed_node)) {
1626 if ((allowed_node->weight >= 0) && (++allowed_nodes > 1)) {
1632 ((allowed_nodes == 1)?
"on a single node" :
"nowhere"));
1633 return (allowed_nodes == 1);
1655 add_node_scores_matching_attr(GHashTable *nodes,
1659 float factor,
bool only_positive)
1661 GHashTableIter iter;
1666 g_hash_table_iter_init(&iter, nodes);
1667 while (g_hash_table_iter_next(&iter, NULL, (
void **)&node)) {
1672 const char *value = pcmk__colocation_node_attr(node, attr, target_rsc);
1674 score = best_node_score_matching_attr(colocation, source_rsc, attr, value);
1676 if ((factor < 0) && (score < 0)) {
1712 || !allowed_on_one(colocation->
dependent)) {
1714 "(double negative disallowed)",
1715 pcmk__node_name(node), node->weight, factor, score);
1721 crm_trace(
"%s: Filtering %d + %f * %d (node was marked unusable)",
1722 pcmk__node_name(node), node->weight, factor, score);
1726 delta_f = factor * score;
1729 delta = (int) ((delta_f < 0)? (delta_f - 0.5) : (delta_f + 0.5));
1735 if ((delta == 0) && (score != 0)) {
1738 }
else if (factor < 0.0) {
1745 if (only_positive && (new_score < 0) && (node->weight > 0)) {
1746 crm_trace(
"%s: Filtering %d + %f * %d = %d " 1747 "(negative disallowed, marking node unusable)",
1748 pcmk__node_name(node), node->weight, factor, score,
1754 if (only_positive && (new_score < 0) && (node->weight == 0)) {
1755 crm_trace(
"%s: Filtering %d + %f * %d = %d (negative disallowed)",
1756 pcmk__node_name(node), node->weight, factor, score,
1761 crm_trace(
"%s: %d + %f * %d = %d", pcmk__node_name(node),
1762 node->weight, factor, score, new_score);
1763 node->weight = new_score;
1803 float factor, uint32_t
flags)
1805 GHashTable *work = NULL;
1808 && ((colocation != NULL)
1809 || ((target_rsc == NULL) && (*nodes == NULL))));
1811 if (log_id == NULL) {
1812 log_id = source_rsc->
id;
1818 log_id, source_rsc->
id);
1823 if (*nodes == NULL) {
1825 target_rsc = source_rsc;
1829 pcmk__rsc_trace(source_rsc,
"%s: Merging %s scores from %s (at %.6f)",
1830 log_id, (pos?
"positive" :
"all"), source_rsc->
id, factor);
1832 add_node_scores_matching_attr(work, source_rsc, target_rsc, colocation,
1842 GList *colocations = NULL;
1847 "Checking additional %d optional '%s with' " 1849 g_list_length(colocations), source_rsc->
id);
1853 "Checking additional %d optional 'with %s' " 1855 g_list_length(colocations), source_rsc->
id);
1859 for (GList *iter = colocations; iter != NULL; iter = iter->next) {
1863 float other_factor = factor * constraint->
score 1875 "Optionally merging score of '%s' constraint " 1881 other_factor,
flags);
1884 g_list_free(colocations);
1887 pcmk__rsc_info(source_rsc,
"%s: Rolling back optional scores from %s",
1888 log_id, source_rsc->
id);
1889 g_hash_table_destroy(work);
1897 GHashTableIter iter;
1899 g_hash_table_iter_init(&iter, work);
1900 while (g_hash_table_iter_next(&iter, NULL, (
void **)&node)) {
1907 if (*nodes != NULL) {
1908 g_hash_table_destroy(*nodes);
1935 if (pcmk__is_clone(target_rsc)) {
1939 "%s: Incorporating attenuated %s assignment scores due " 1941 target_rsc->
id, source_rsc->
id, colocation->
id);
1945 colocation, factor,
flags);
1969 const GList *primary_nodes,
bool merge_scores)
1971 GHashTableIter iter;
1975 && (colocation != NULL));
1978 while (g_hash_table_iter_next(&iter, NULL, (gpointer *) &dependent_node)) {
1982 dependent_node->details->id);
1983 if (primary_node == NULL) {
1986 "Banning %s from %s (no primary instance) for %s",
1987 dependent->
id, pcmk__node_name(dependent_node),
1990 }
else if (merge_scores) {
1994 "Added %s's score %s to %s's score for %s (now %s) " 1995 "for colocation %s",
1997 dependent->
id, pcmk__node_name(dependent_node),
pcmk_assignment_methods_t * cmds
bool pcmk__colocation_has_influence(const pcmk__colocation_t *colocation, const pcmk_resource_t *rsc)
#define CRM_CHECK(expr, failure_action)
void pcmk__add_colocated_node_scores(pcmk_resource_t *source_rsc, const pcmk_resource_t *target_rsc, const char *log_id, GHashTable **nodes, const pcmk__colocation_t *colocation, float factor, uint32_t flags)
void pcmk__add_with_this(GList **list, const pcmk__colocation_t *colocation, const pcmk_resource_t *rsc)
xmlNode * pcmk__xml_copy(xmlNode *parent, xmlNode *src)
pcmk_scheduler_t * cluster
const char * pcmk_role_text(enum rsc_role_e role)
Get readable description of a resource role.
#define pcmk__if_tracing(if_action, else_action)
pcmk_resource_t * uber_parent(pcmk_resource_t *rsc)
const char * pcmk_readable_score(int score)
Return a displayable static string for a score value.
G_GNUC_INTERNAL bool pcmk__tag_to_set(xmlNode *xml_obj, xmlNode **rsc_set, const char *attr, bool convert_rsc, const pcmk_scheduler_t *scheduler)
G_GNUC_INTERNAL bool pcmk__any_node_available(GHashTable *nodes)
#define pcmk__config_warn(fmt...)
#define pcmk__rsc_trace(rsc, fmt, args...)
#define PCMK__XA_WITH_RSC_INSTANCE
#define PCMK_XE_RSC_COLOCATION
#define PCMK_XE_RESOURCE_REF
#define pcmk__rsc_info(rsc, fmt, args...)
enum rsc_role_e next_role
#define PCMK_XA_WITH_RSC_ROLE
#define pcmk__config_err(fmt...)
const char * crm_xml_add(xmlNode *node, const char *name, const char *value)
Create an XML attribute with specified name and value.
void pe_action_set_reason(pcmk_action_t *action, const char *reason, bool overwrite)
void(* add_colocated_node_scores)(pcmk_resource_t *source_rsc, const pcmk_resource_t *target_rsc, const char *log_id, GHashTable **nodes, const pcmk__colocation_t *colocation, float factor, uint32_t flags)
#define PCMK__XA_RSC_INSTANCE
enum pcmk__coloc_affects pcmk__colocation_affects(const pcmk_resource_t *dependent, const pcmk_resource_t *primary, const pcmk__colocation_t *colocation, bool preview)
bool pcmk__xe_attr_is_true(const xmlNode *node, const char *name)
G_GNUC_INTERNAL void pcmk__update_action_for_orderings(pcmk_action_t *action, pcmk_scheduler_t *scheduler)
#define PCMK__XA_ORDERING
void pcmk__add_this_with(GList **list, const pcmk__colocation_t *colocation, const pcmk_resource_t *rsc)
#define PCMK__VALUE_GROUP
void pcmk__unpack_colocation(xmlNode *xml_obj, pcmk_scheduler_t *scheduler)
G_GNUC_INTERNAL bool pcmk__node_available(const pcmk_node_t *node, bool consider_score, bool consider_guest)
void pcmk__apply_coloc_to_scores(pcmk_resource_t *dependent, const pcmk_resource_t *primary, const pcmk__colocation_t *colocation)
enum rsc_role_e pcmk_parse_role(const char *role)
Parse a resource role from a string role specification.
void pcmk__block_colocation_dependents(pcmk_action_t *action)
void(* with_this_colocations)(const pcmk_resource_t *rsc, const pcmk_resource_t *orig_rsc, GList **list)
#define PCMK_ACTION_DEMOTE
G_GNUC_INTERNAL pcmk_resource_t * pcmk__find_constraint_resource(GList *rsc_list, const char *id)
const pcmk_resource_t * pe__get_rsc_in_container(const pcmk_resource_t *instance)
#define pcmk__clear_action_flags(action, flags_to_clear)
const char * crm_element_value(const xmlNode *data, const char *name)
Retrieve the value of an XML attribute.
pcmk_node_t * pe_find_node_id(const GList *node_list, const char *id)
Find a node by ID in a list of nodes.
xmlNode * pcmk__xe_first_child(const xmlNode *parent, const char *node_name, const char *attr_n, const char *attr_v)
#define pcmk__sched_err(fmt...)
int char2score(const char *score)
Get the integer value of a score string.
void(* this_with_colocations)(const pcmk_resource_t *rsc, const pcmk_resource_t *orig_rsc, GList **list)
#define crm_trace(fmt, args...)
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.
xmlNode * expand_idref(xmlNode *input, xmlNode *top)
#define PCMK_ACTION_START
int pcmk__xe_get_bool_attr(const xmlNode *node, const char *name, bool *value)
int pcmk__apply_coloc_to_priority(pcmk_resource_t *dependent, const pcmk_resource_t *primary, const pcmk__colocation_t *colocation)
Wrappers for and extensions to libxml2.
void pcmk__xe_remove_attr(xmlNode *element, const char *name)
void(* apply_location)(pcmk_resource_t *rsc, pcmk__location_t *location)
void pcmk__add_this_with_list(GList **list, GList *addition, const pcmk_resource_t *rsc)
Ordering applies only if 'first' is required and on same node as 'then'.
#define PCMK_XA_INFLUENCE
void pcmk__colocation_intersect_nodes(pcmk_resource_t *dependent, const pcmk_resource_t *primary, const pcmk__colocation_t *colocation, const GList *primary_nodes, bool merge_scores)
#define pcmk__set_rsc_flags(resource, flags_to_set)
G_GNUC_INTERNAL bool pcmk__valid_resource_or_tag(const pcmk_scheduler_t *scheduler, const char *id, pcmk_resource_t **rsc, pcmk_tag_t **tag)
void free_xml(xmlNode *child)
int pcmk__add_scores(int score1, int score2)
enum pe_obj_types variant
#define pcmk__warn_once(wo_flag, fmt...)
#define pcmk__order_resource_actions(first_rsc, first_task, then_rsc, then_task, flags)
pcmk_resource_t * primary
#define pcmk__assert(expr)
int crm_str_to_boolean(const char *s, int *ret)
#define PCMK_XA_NODE_ATTRIBUTE
Cluster status and scheduling.
#define PCMK__ROLE_UNKNOWN
#define PCMK_ROLE_STARTED
G_GNUC_INTERNAL GHashTable * pcmk__copy_node_table(GHashTable *nodes)
pcmk_action_t * find_first_action(const GList *input, const char *uuid, const char *task, const pcmk_node_t *on_node)
pcmk_scheduler_t * scheduler
GList * pcmk__this_with_colocations(const pcmk_resource_t *rsc)
#define PCMK_XE_RESOURCE_SET
GList * colocation_constraints
void pcmk__new_colocation(const char *id, const char *node_attr, int score, pcmk_resource_t *dependent, pcmk_resource_t *primary, const char *dependent_role, const char *primary_role, uint32_t flags)
pcmk_node_t * allocated_to
#define PCMK_ACTION_PROMOTE
pcmk_resource_t * dependent
#define pe__show_node_scores(level, rsc, text, nodes, scheduler)
enum pe_action_flags flags
GList * placement_constraints
const char * node_attribute
#define PCMK_XA_SYMMETRICAL
#define crm_log_xml_trace(xml, text)
void pcmk__add_with_this_list(GList **list, GList *addition, const pcmk_resource_t *rsc)
Resource role is unknown.
void pcmk__add_dependent_scores(gpointer data, gpointer user_data)
Location constraint object.
pcmk_resource_t * find_clone_instance(const pcmk_resource_t *rsc, const char *sub_id)
#define pcmk__assert_alloc(nmemb, size)
xmlNode * pcmk__xe_next_same(const xmlNode *node)
#define PCMK_XA_SEQUENTIAL
G_GNUC_INTERNAL xmlNode * pcmk__expand_tags_in_sets(xmlNode *xml_obj, const pcmk_scheduler_t *scheduler)
#define crm_info(fmt, args...)
#define pcmk__clear_rsc_flags(resource, flags_to_clear)
GList * pcmk__with_this_colocations(const pcmk_resource_t *rsc)
#define PCMK_SCORE_INFINITY
Integer score to use to represent "infinity".
GHashTable * allowed_nodes