31 #define RSC_ROLE_MAX (pcmk_role_promoted + 1) 174 if (prefer == NULL) {
175 prefer = most_free_node;
184 nodes = sorted_allowed_nodes(rsc);
189 if ((prefer != NULL) && (nodes != NULL)) {
193 if (chosen == NULL) {
194 pe_rsc_trace(rsc,
"Preferred node %s for %s was unknown",
195 pe__node_name(prefer), rsc->
id);
204 pe_rsc_trace(rsc,
"Preferred node %s for %s was unsuitable",
205 pe__node_name(chosen), rsc->
id);
209 pe_rsc_trace(rsc,
"Preferred node %s for %s was unavailable",
210 pe__node_name(chosen), rsc->
id);
215 "Chose preferred node %s for %s " 216 "(ignoring %d candidates)",
217 pe__node_name(chosen), rsc->
id, g_list_length(nodes));
221 if ((chosen == NULL) && (best != NULL)) {
228 if (!pe_rsc_is_unique_clone(rsc->
parent)
242 if (running == NULL) {
247 "Current node for %s (%s) can't run resources",
248 rsc->
id, pe__node_name(running));
251 int nodes_with_best_score = 1;
253 for (GList *iter = nodes->next; iter; iter = iter->next) {
260 if (pe__same_node(allowed, running)) {
264 nodes_with_best_score++;
267 if (nodes_with_best_score > 1) {
268 uint8_t log_level = LOG_INFO;
271 log_level = LOG_WARNING;
274 "Chose %s for %s from %d nodes with score %s",
275 pe__node_name(chosen), rsc->
id,
276 nodes_with_best_score,
283 pe__node_name(chosen), rsc->
id, g_list_length(nodes));
301 GHashTable *archive = NULL;
312 "%s: Assigning colocation %s primary %s first" 313 "(score=%d role=%s)",
314 rsc->
id, colocation->
id, other->
id,
321 if ((archive != NULL)
324 "%s: Reverting scores from colocation with %s " 325 "because no nodes allowed",
331 if (archive != NULL) {
332 g_hash_table_destroy(archive);
353 crm_trace(
"Pacemaker Remote node %s will be online",
362 crm_trace(
"Pacemaker Remote node %s will be shut down " 363 "(%sassigned connection's next role is %s)",
393 GList *this_with_colocations = NULL;
394 GList *with_this_colocations = NULL;
410 const char *node_name =
"no node";
421 pe_rsc_debug(rsc,
"Breaking assignment loop involving %s", rsc->
id);
433 for (iter = this_with_colocations; iter != NULL; iter = iter->next) {
434 colocation = iter->data;
438 apply_this_with(colocation, rsc);
441 for (iter = with_this_colocations; iter != NULL; iter = iter->next) {
442 colocation = iter->data;
454 for (iter = this_with_colocations; iter != NULL; iter = iter->next) {
455 colocation = iter->data;
459 apply_this_with(colocation, rsc);
462 for (iter = with_this_colocations; iter != NULL; iter = iter->next) {
463 colocation = iter->data;
471 g_list_free(this_with_colocations);
472 g_list_free(with_this_colocations);
476 "Banning %s from all nodes because it will be stopped",
484 crm_notice(
"Resource %s cannot be elevated from %s to %s due to " 485 "no-quorum-policy=freeze",
502 const char *reason = NULL;
506 assign_to = pe__current_node(rsc);
507 if (assign_to == NULL) {
516 pe_rsc_info(rsc,
"Unmanaged resource %s assigned to %s: %s", rsc->
id,
517 (assign_to? assign_to->
details->
uname :
"no node"), reason);
523 pe_rsc_debug(rsc,
"Forcing %s to stop: stop-all-resources",
528 }
else if (!assign_best_node(rsc, prefer, stop_if_fail)) {
531 pe_rsc_info(rsc,
"Resource %s cannot run anywhere", rsc->
id);
532 }
else if ((rsc->
running_on != NULL) && stop_if_fail) {
540 remote_connection_assigned(rsc);
559 bool need_stop,
bool need_promote)
570 pe_rsc_trace(rsc,
"Creating %s action to take %s down from %s to %s",
571 (need_stop?
"required" :
"optional"), rsc->
id,
573 fn = rsc_action_matrix[role][next_role];
577 fn(rsc, current, !need_stop);
584 bool required = need_stop;
586 next_role = rsc_state_matrix[role][rsc->
role];
590 pe_rsc_trace(rsc,
"Creating %s action to take %s up from %s to %s",
591 (required?
"required" :
"optional"), rsc->
id,
593 fn = rsc_action_matrix[role][next_role];
639 "Creating action for %s to represent already pending start",
661 "Creating action to take %s from %s to %s (ending at %s)",
664 fn = rsc_action_matrix[role][next_role];
682 bool need_stop =
false;
683 bool need_promote =
false;
684 bool is_moving =
false;
685 bool allow_migrate =
false;
686 bool multiply_active =
false;
689 unsigned int num_all_active = 0;
690 unsigned int num_clean_active = 0;
691 const char *next_role_source = NULL;
695 next_role_source = set_default_next_role(rsc);
697 "Creating all actions for %s transition from %s to %s " 702 current = rsc->
fns->
active_node(rsc, &num_all_active, &num_clean_active);
712 rsc->
id, pe__node_name(current),
724 && allow_migrate && (num_all_active == 2)
730 pe_rsc_trace(rsc,
"Partial migration of %s from %s to %s will continue",
738 if (num_all_active > 2) {
740 crm_notice(
"Forcing recovery of %s because it is migrating " 741 "from %s to %s and possibly active elsewhere",
746 crm_notice(
"Forcing recovery of %s because it can no longer " 747 "migrate from %s to %s",
753 allow_migrate =
false;
756 multiply_active = (num_all_active > 1);
765 multiply_active = (num_clean_active > 1);
768 if (multiply_active) {
772 pe_proc_err(
"%s resource %s might be active on %u nodes (%s)",
773 pcmk__s(
class,
"Untyped"), rsc->id, num_all_active,
774 recovery2text(rsc->recovery_type));
775 crm_notice(
"See https://wiki.clusterlabs.org/wiki/FAQ" 776 "#Resource_is_Too_Active for more information");
778 switch (rsc->recovery_type) {
795 create_pending_start(rsc);
820 pe_rsc_trace(rsc,
"Creating start action for promoted resource %s",
825 pe_rsc_trace(rsc,
"%s restart is required for recovery", rsc->
id);
831 schedule_restart_actions(rsc, current, need_stop, need_promote);
834 schedule_role_transition_actions(rsc);
856 while (g_hash_table_iter_next(&iter, NULL, (
void **) &node)) {
857 if (node->details->remote_rsc != NULL) {
879 GList *allowed_nodes = NULL;
889 return allowed_nodes;
901 GList *allowed_nodes = NULL;
902 bool check_unfencing =
false;
903 bool check_utilization =
false;
909 "Skipping implicit constraints for unmanaged resource %s",
921 check_utilization = (g_hash_table_size(rsc->
utilization) > 0)
960 if (check_unfencing || check_utilization || (rsc->
container != NULL)) {
961 allowed_nodes = allowed_nodes_as_list(rsc);
964 if (check_unfencing) {
968 if (check_utilization) {
1009 if (remote_rsc != NULL) {
1013 for (GList *item = allowed_nodes; item; item = item->next) {
1028 crm_trace(
"Order and colocate %s relative to its container %s",
1065 rsc_avoids_remote_nodes(rsc);
1067 g_list_free(allowed_nodes);
1091 CRM_ASSERT((dependent != NULL) && (primary != NULL)
1092 && (colocation != NULL));
1094 if (for_dependent) {
1102 pe_rsc_trace(dependent,
"%s %s with %s (%s, score=%d, filter=%d)",
1103 ((colocation->
score > 0)?
"Colocating" :
"Anti-colocating"),
1104 dependent->
id, primary->
id, colocation->
id, colocation->
score,
1107 switch (filter_results) {
1129 if (rsc == orig_rsc) {
1134 if (rsc->
parent != NULL) {
1139 for (GList *iter = rsc->
rsc_cons_lhs; iter != NULL; iter = iter->next) {
1159 if (rsc == orig_rsc) {
1164 if (rsc->
parent != NULL) {
1169 for (GList *iter = rsc->
rsc_cons; iter != NULL; iter = iter->next) {
1192 return (uint32_t)
action->flags;
1211 return pcmk_all_flags_set(rsc->
flags,
1228 for (GList *iter = rsc->
running_on; iter != NULL; iter = iter->next) {
1232 if (is_expected_node(rsc, current)) {
1238 "Skipping stop of multiply active resource %s " 1239 "on expected node %s",
1240 rsc->
id, pe__node_name(current));
1249 "Skipping stop of %s on %s " 1250 "because partial migration there will continue",
1251 rsc->
id, pe__node_name(current));
1255 "Forcing stop of %s on %s " 1256 "because migration target changed",
1257 rsc->
id, pe__node_name(current));
1263 rsc->
id, pe__node_name(current));
1291 pe_proc_err(
"Stopping %s until %s can be unfenced",
1292 rsc->
id, pe__node_name(current));
1313 pe_rsc_trace(rsc,
"Scheduling %s start of %s on %s (score %d)",
1314 (optional?
"optional" :
"required"), rsc->
id,
1315 pe__node_name(node), node->
weight);
1324 if (is_expected_node(rsc, node)) {
1329 "Start of multiply active resouce %s " 1330 "on expected node %s will be a pseudo-action",
1331 rsc->
id, pe__node_name(node));
1348 GList *action_list = NULL;
1349 bool runnable =
true;
1355 for (iter = action_list; iter != NULL; iter = iter->next) {
1362 g_list_free(action_list);
1367 pe_rsc_trace(rsc,
"Scheduling %s promotion of %s on %s",
1368 (optional?
"optional" :
"required"), rsc->
id,
1369 pe__node_name(node));
1371 if (is_expected_node(rsc, node)) {
1376 "Promotion of multiply active resouce %s " 1377 "on expected node %s will be a pseudo-action",
1378 rsc->
id, pe__node_name(node));
1382 pe_rsc_trace(rsc,
"Not promoting %s on %s: start unrunnable",
1383 rsc->
id, pe__node_name(node));
1386 for (iter = action_list; iter != NULL; iter = iter->next) {
1391 g_list_free(action_list);
1411 for (GList *iter = rsc->
running_on; iter != NULL; iter = iter->next) {
1414 if (is_expected_node(rsc, current)) {
1416 "Skipping demote of multiply active resource %s " 1417 "on expected node %s",
1418 rsc->
id, pe__node_name(current));
1420 pe_rsc_trace(rsc,
"Scheduling %s demotion of %s on %s",
1421 (optional?
"optional" :
"required"), rsc->
id,
1422 pe__node_name(current));
1453 CRM_CHECK((rsc != NULL) && (node != NULL),
return);
1456 pe_rsc_trace(rsc,
"Skipping clean-up of %s on %s: resource failed",
1457 rsc->
id, pe__node_name(node));
1462 pe_rsc_trace(rsc,
"Skipping clean-up of %s on %s: node unavailable",
1463 rsc->
id, pe__node_name(node));
1467 crm_notice(
"Scheduling clean-up of %s on %s", rsc->
id, pe__node_name(node));
1499 if (value != NULL) {
1507 if (value != NULL) {
1518 if (
parent->container != NULL) {
1528 value = g_hash_table_lookup(rsc->
meta,
"external-ip");
1529 if (value != NULL) {
1538 GList *all_rscs, GHashTable *utilization)
1541 && (orig_rsc != NULL) && (utilization != NULL));
1547 pe_rsc_trace(orig_rsc,
"%s: Adding primitive %s as colocated utilization",
1548 orig_rsc->
id, rsc->
id);
1566 if (shutdown != NULL) {
1567 long long result_ll;
1570 result = (time_t) result_ll;
1584 ban_if_not_locked(gpointer
data, gpointer user_data)
1599 const char *
class = NULL;
1611 if (rsc->lock_node != NULL) {
1614 if (rsc->running_on != NULL) {
1620 "Cancelling shutdown lock because %s is already active",
1623 rsc->lock_node = NULL;
1628 }
else if (pcmk__list_of_1(rsc->running_on)) {
1633 pe_rsc_debug(rsc,
"Not locking %s to unclean %s for shutdown",
1634 rsc->id, pe__node_name(node));
1636 rsc->lock_node = node;
1637 rsc->lock_time = shutdown_time(node);
1642 if (rsc->lock_node == NULL) {
1647 if (rsc->cluster->shutdown_lock > 0) {
1648 time_t lock_expiration = rsc->lock_time + rsc->cluster->shutdown_lock;
1650 pe_rsc_info(rsc,
"Locking %s to %s due to shutdown (expires @%lld)",
1651 rsc->id, pe__node_name(rsc->lock_node),
1652 (
long long) lock_expiration);
1654 "shutdown lock expiration");
1656 pe_rsc_info(rsc,
"Locking %s to %s due to shutdown",
1657 rsc->id, pe__node_name(rsc->lock_node));
1661 g_list_foreach(rsc->cluster->nodes, ban_if_not_locked, rsc);
pcmk_assignment_methods_t * cmds
Resource assignment methods.
const pcmk_resource_t * pe__const_top_resource(const pcmk_resource_t *rsc, bool include_bundle)
#define CRM_CHECK(expr, failure_action)
pcmk_resource_t * pe__resource_contains_guest_node(const pcmk_scheduler_t *scheduler, const pcmk_resource_t *rsc)
Relation applies only if actions are on same node.
enum pe_quorum_policy no_quorum_policy
Response to loss of quorum.
#define crm_notice(fmt, args...)
'then' is runnable (and migratable) only if 'first' is runnable
pcmk_scheduler_t * cluster
Cluster that resource is part of.
#define pe_rsc_debug(rsc, fmt, args...)
gboolean unseen
Whether node has never joined cluster.
void pcmk__primitive_apply_coloc_score(pcmk_resource_t *dependent, const pcmk_resource_t *primary, const pcmk__colocation_t *colocation, bool for_dependent)
#define XML_CONFIG_ATTR_SHUTDOWN_LOCK
Whether action should not be executed.
#define pe__set_action_flags(action, flags_to_set)
pcmk_node_t * partial_migration_target
The destination node, if migrate_to completed but migrate_from has not.
#define promote_action(rsc, node, optional)
const char * pe_node_attribute_raw(const pcmk_node_t *node, const char *name)
G_GNUC_INTERNAL void pcmk__new_ordering(pcmk_resource_t *first_rsc, char *first_task, pcmk_action_t *first_action, pcmk_resource_t *then_rsc, char *then_task, pcmk_action_t *then_action, uint32_t flags, pcmk_scheduler_t *sched)
const char * pcmk_readable_score(int score)
Return a displayable static string for a score value.
G_GNUC_INTERNAL void pcmk__order_vs_unfence(const pcmk_resource_t *rsc, pcmk_node_t *node, pcmk_action_t *action, enum pcmk__action_relation_flags order)
#define stop_action(rsc, node, optional)
G_GNUC_INTERNAL void pcmk__create_utilization_constraints(pcmk_resource_t *rsc, const GList *allowed_nodes)
G_GNUC_INTERNAL void pcmk__release_node_capacity(GHashTable *current_utilization, const pcmk_resource_t *rsc)
enum rsc_role_e role
Resource's current role.
G_GNUC_INTERNAL bool pcmk__any_node_available(GHashTable *nodes)
gint pe__cmp_node_name(gconstpointer a, gconstpointer b)
Whether partition has quorum (via have-quorum property)
bool pcmk__rsc_can_migrate(const pcmk_resource_t *rsc, const pcmk_node_t *current)
gboolean order_actions(pcmk_action_t *lh_action, pcmk_action_t *rh_action, uint32_t flags)
#define delete_action(rsc, node, optional)
#define XML_RSC_ATTR_INCARNATION
enum rsc_role_e next_role
Resource's scheduled next role.
Implementation of pcmk_action_t.
Whether node scores should be output instead of logged.
#define PCMK_ACTION_MONITOR
GHashTable * meta
Resource's meta-attributes.
void pcmk__schedule_cleanup(pcmk_resource_t *rsc, const pcmk_node_t *node, bool optional)
void pcmk__primitive_add_utilization(const pcmk_resource_t *rsc, const pcmk_resource_t *orig_rsc, GList *all_rscs, GHashTable *utilization)
pcmk_action_t * pe_fence_op(pcmk_node_t *node, const char *op, bool optional, const char *reason, bool priority_delay, pcmk_scheduler_t *scheduler)
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)
bool pe__resource_is_remote_conn(const pcmk_resource_t *rsc)
G_GNUC_INTERNAL const pcmk_node_t * pcmk__ban_insufficient_capacity(pcmk_resource_t *rsc)
void pcmk__primitive_internal_constraints(pcmk_resource_t *rsc)
pcmk_node_t *(* assign)(pcmk_resource_t *rsc, const pcmk_node_t *prefer, bool stop_if_fail)
GList * pe__resource_actions(const pcmk_resource_t *rsc, const pcmk_node_t *node, const char *task, bool require_node)
Find all actions of given type for a resource.
pcmk_scheduler_t * data_set
Cluster that node is part of.
pcmk_resource_t * container
Resource containing this one, if any.
#define CRM_SCORE_INFINITY
#define pe_proc_err(fmt...)
G_GNUC_INTERNAL bool pcmk__node_available(const pcmk_node_t *node, bool consider_score, bool consider_guest)
char * crm_meta_name(const char *field)
G_GNUC_INTERNAL bool pcmk__assign_resource(pcmk_resource_t *rsc, pcmk_node_t *node, bool force, bool stop_if_fail)
G_GNUC_INTERNAL void pcmk__apply_coloc_to_scores(pcmk_resource_t *dependent, const pcmk_resource_t *primary, const pcmk__colocation_t *colocation)
#define pe__set_resource_flags(resource, flags_to_set)
GList * nodes
Nodes in cluster.
void(* with_this_colocations)(const pcmk_resource_t *rsc, const pcmk_resource_t *orig_rsc, GList **list)
#define demote_action(rsc, node, optional)
const char * role2text(enum rsc_role_e role)
G_GNUC_INTERNAL void pcmk__apply_coloc_to_priority(pcmk_resource_t *dependent, const pcmk_resource_t *primary, const pcmk__colocation_t *colocation)
#define PCMK_ACTION_DEMOTE
int weight
Node score for a given resource.
int pcmk__scan_ll(const char *text, long long *result, long long default_value)
pcmk_resource_t * parent
Resource's parent resource, if any.
GList * dangling_migrations
Whether any resource provides or requires unfencing (via CIB resources)
void pe__set_next_role(pcmk_resource_t *rsc, enum rsc_role_e role, const char *why)
Whether resource is in the process of being assigned to a node.
G_GNUC_INTERNAL void pcmk__add_with_this_list(GList **list, GList *addition, const pcmk_resource_t *rsc)
pcmk_node_t * pcmk__primitive_assign(pcmk_resource_t *rsc, const pcmk_node_t *prefer, bool stop_if_fail)
Implementation of pcmk_resource_t.
Actions are ordered (optionally, if no other flags are set)
#define XML_CIB_ATTR_SHUTDOWN
#define XML_RSC_ATTR_CONTAINER
G_GNUC_INTERNAL void pcmk__create_recurring_actions(pcmk_resource_t *rsc)
const char * crm_element_value(const xmlNode *data, const char *name)
Retrieve the value of an XML attribute.
void resource_location(pcmk_resource_t *rsc, const pcmk_node_t *node, int score, const char *tag, pcmk_scheduler_t *scheduler)
G_GNUC_INTERNAL void pcmk__add_this_with(GList **list, const pcmk__colocation_t *colocation, const pcmk_resource_t *rsc)
Whether resource is considered failed.
void(* this_with_colocations)(const pcmk_resource_t *rsc, const pcmk_resource_t *orig_rsc, GList **list)
#define pe__clear_action_flags(action, flags_to_clear)
Whether resource must be stopped (instead of demoted) if it is failed.
#define crm_trace(fmt, args...)
#define do_crm_log(level, fmt, args...)
Log a message.
#define PCMK_RESOURCE_CLASS_STONITH
pcmk_node_t * pe_find_node(const GList *node_list, const char *node_name)
Find a node by name in a list of nodes.
Whether resource is multiply active with recovery set to stop_unexpected.
#define pcmk_is_set(g, f)
Convenience alias for pcmk_all_flags_set(), to check single flag.
struct pe_node_shared_s * details
Basic node information.
#define PCMK_ACTION_START
unsigned long long flags
Group of enum pcmk_rsc_flags.
const char * uname
Node name in cluster.
G_GNUC_INTERNAL void pcmk__add_with_this(GList **list, const pcmk__colocation_t *colocation, const pcmk_resource_t *rsc)
void pcmk__create_migration_actions(pcmk_resource_t *rsc, const pcmk_node_t *current)
void pcmk__primitive_create_actions(pcmk_resource_t *rsc)
GHashTable * utilization
Resource's utilization attributes.
#define XML_RSC_ATTR_TARGET_ROLE
#define XML_RSC_ATTR_REMOTE_NODE
#define PCMK_ACTION_DELETE
char * pcmk__op_key(const char *rsc_id, const char *op_type, guint interval_ms)
Generate an operation key (RESOURCE_ACTION_INTERVAL)
Whether resource is blocked from further action.
Implementation of pcmk_node_t.
enum pe_obj_types variant
Resource variant.
void pcmk__primitive_shutdown_lock(pcmk_resource_t *rsc)
const char * placement_strategy
Value of placement-strategy property.
Stop unexpected instances.
G_GNUC_INTERNAL void pcmk__order_restart_vs_unfence(gpointer data, gpointer user_data)
void pe__update_recheck_time(time_t recheck, pcmk_scheduler_t *scheduler, const char *reason)
Whether resource has pending start action in history.
const char * id
Node ID at the cluster layer.
#define pcmk__order_resource_actions(first_rsc, first_task, then_rsc, then_task, flags)
void(* apply_coloc_score)(pcmk_resource_t *dependent, const pcmk_resource_t *primary, const pcmk__colocation_t *colocation, bool for_dependent)
pcmk_resource_t * primary
Whether resource is in the process of scheduling actions to restart.
void pcmk__with_primitive_colocations(const pcmk_resource_t *rsc, const pcmk_resource_t *orig_rsc, GList **list)
Whether resource has not yet been assigned to a node.
#define PCMK_ACTION_LRM_DELETE
Whether resource is a remote connection allowed to run on a remote node.
G_GNUC_INTERNAL enum pcmk__coloc_affects pcmk__colocation_affects(const pcmk_resource_t *dependent, const pcmk_resource_t *primary, const pcmk__colocation_t *colocation, bool preview)
gboolean is_remote_node
Whether this is a remote connection.
Whether resource requires fencing before recovery if on unclean node.
G_GNUC_INTERNAL GList * pcmk__with_this_colocations(const pcmk_resource_t *rsc)
Whether resource's class is "stonith".
pcmk__action_result_t result
Whether action is runnable.
G_GNUC_INTERNAL void pcmk__add_dependent_scores(gpointer data, gpointer user_data)
pcmk_rsc_methods_t * fns
Resource object methods.
Whether to stop all resources (via stop-all-resources property)
#define start_action(rsc, node, optional)
Whether fencing is enabled (via stonith-enabled property)
G_GNUC_INTERNAL GHashTable * pcmk__copy_node_table(GHashTable *nodes)
Whether action does not require invoking an agent.
G_GNUC_INTERNAL void pcmk__add_this_with_list(GList **list, GList *addition, const pcmk_resource_t *rsc)
pcmk_node_t * lock_node
Resource shutdown-locked to this node.
G_GNUC_INTERNAL bool pcmk__node_unfenced(const pcmk_node_t *node)
Whether action should be added to transition graph even if optional.
void(* rsc_transition_fn)(pcmk_resource_t *rsc, pcmk_node_t *node, bool optional)
Stop on all, start on desired.
G_GNUC_INTERNAL GList * pcmk__this_with_colocations(const pcmk_resource_t *rsc)
pcmk_node_t *(* active_node)(const pcmk_resource_t *rsc, unsigned int *count_all, unsigned int *count_clean)
Find a node (and optionally count all) where resource is active.
pcmk_node_t * allocated_to
Node resource is assigned to.
gboolean shutdown
Whether shutting down.
#define pe__clear_resource_flags(resource, flags_to_clear)
If 'then' action becomes required, 'first' becomes optional.
#define PCMK_ACTION_PROMOTE
#define pe__show_node_scores(level, rsc, text, nodes, scheduler)
GList * running_on
Nodes where resource may be active.
enum pe_action_flags flags
Group of enum pe_action_flags.
void pe__clear_resource_history(pcmk_resource_t *rsc, const pcmk_node_t *node)
uint32_t pcmk__primitive_action_flags(pcmk_action_t *action, const pcmk_node_t *node)
void pcmk__primitive_add_graph_meta(const pcmk_resource_t *rsc, xmlNode *xml)
G_GNUC_INTERNAL GList * pcmk__sort_nodes(GList *nodes, pcmk_node_t *active_node)
Whether resource can be promoted and demoted.
G_GNUC_INTERNAL 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)
void pcmk__primitive_with_colocations(const pcmk_resource_t *rsc, const pcmk_resource_t *orig_rsc, GList **list)
Whether cluster has a fencing resource (via CIB resources)
Resource role is unknown.
#define pe_rsc_trace(rsc, fmt, args...)
unsigned long long flags
Group of enum pcmk_scheduler_flags.
Whether resource is managed.
Whether resource can be started or promoted only on unfenced nodes.
time_t get_effective_time(pcmk_scheduler_t *scheduler)
gboolean unclean
Whether node requires fencing.
Whether resource has been removed from the configuration.
void pcmk__abort_dangling_migration(void *data, void *user_data)
gboolean online
Whether online.
pcmk_resource_t * remote_rsc
Remote connection resource for node, if it is a Pacemaker Remote node.
pcmk_node_t * partial_migration_source
The source node, if migrate_to completed but migrate_from has not.
#define pe_rsc_info(rsc, fmt, args...)
#define XML_AGENT_ATTR_CLASS
char * id
Resource ID in configuration.
GHashTable * allowed_nodes
Nodes where resource may run (key is node ID, not name)