58 GList *matches = NULL;
66 if (matches == NULL) {
87 find_exact_action_config(
const pcmk_resource_t *rsc,
const char *action_name,
88 guint interval_ms,
bool include_disabled)
94 const char *config_name = NULL;
95 const char *interval_spec = NULL;
130 guint interval_ms,
bool include_disabled)
132 xmlNode *action_config = NULL;
135 action_config = find_exact_action_config(rsc, action_name, interval_ms,
140 if ((action_config == NULL)
143 action_config = find_exact_action_config(rsc,
"migrate", 0,
147 return action_config;
196 guint interval_ms = 0;
205 if ((
action->op_entry == NULL) && (strstr(key,
"_notify_") != NULL)) {
210 unpack_operation(
action,
action->op_entry, interval_ms);
213 pe_rsc_trace(rsc,
"Created %s action %d (%s): %s for %s on %s",
214 (optional?
"optional" :
"required"),
216 ((rsc == NULL)?
"no resource" : rsc->
id),
217 pe__node_name(node));
241 GHashTable *node_attrs,
256 &rule_data, params, NULL,
275 && (g_hash_table_lookup(
action->meta,
284 }
else if (!optional) {
303 "no-quorum-policy=demote");
332 if (
action->node == NULL) {
338 && !(
action->node->details->online)
340 ||
action->node->details->remote_requires_reset)) {
342 do_crm_log(LOG_WARNING,
"%s on %s is unrunnable (node is offline)",
346 && !(
action->node->details->unclean)) {
351 &&
action->node->details->pending) {
354 "Action %s on %s is unrunnable (node is pending)",
367 "(node's host cannot be fenced)",
372 "%s on %s does not require fencing or quorum",
390 "%s on %s is unrunnable (no quorum)",
432 valid_stop_on_fail(
const char *value)
448 const xmlNode *action_config, GHashTable *meta)
450 const char *
name = NULL;
451 const char *role = NULL;
452 const char *interval_spec = NULL;
455 char *new_value = NULL;
459 && !valid_stop_on_fail(value)) {
462 "action to default value because '%s' is not " 463 "allowed for stop", rsc->
id, value);
472 && (value == NULL)) {
480 bool enabled =
false;
481 const char *promote_on_fail = NULL;
487 if (promote_on_fail == NULL) {
517 new_value = strdup(promote_on_fail);
518 CRM_ASSERT((key != NULL) && (new_value != NULL));
519 g_hash_table_insert(meta, key, new_value);
527 new_value = strdup(
"ignore");
528 CRM_ASSERT((key != NULL) && (new_value != NULL));
529 g_hash_table_insert(meta, key, new_value);
546 "action to default value because 'demote' is not " 547 "allowed for it", rsc->
id,
name);
555 unpack_timeout(
const char *value)
559 if (timeout_ms < 0) {
567 unpack_interval_origin(
const char *value,
const xmlNode *xml_obj,
569 long long *start_delay)
572 guint interval_sec = interval_ms / 1000;
576 if ((value == NULL) || (interval_ms == 0) || (now == NULL)) {
582 if (origin == NULL) {
584 "'%s' because '%s' is not valid",
585 (
ID(xml_obj)?
ID(xml_obj) :
"(missing ID)"), value);
598 crm_info(
"Calculated a start delay of %llds for operation '%s'",
600 (
ID(xml_obj)?
ID(xml_obj) :
"(unspecified)"));
602 if (start_delay != NULL) {
603 *start_delay =
result * 1000;
609 unpack_start_delay(
const char *value, GHashTable *meta)
616 if (start_delay < 0) {
622 pcmk__itoa(start_delay));
641 guint min_interval_ms = G_MAXUINT;
646 bool enabled =
false;
647 guint interval_ms = 0;
657 if (interval_ms == 0) {
667 if (interval_ms < min_interval_ms) {
668 min_interval_ms = interval_ms;
693 const char *action_name, guint interval_ms,
694 const xmlNode *action_config)
696 GHashTable *meta = NULL;
699 const char *timeout_spec = NULL;
700 const char *str = NULL;
710 .interval = interval_ms,
718 .rsc_data = &rsc_rule_data,
719 .op_data = &op_rule_data,
726 &rule_data, meta, NULL, FALSE, rsc->
cluster);
730 xmlNode *min_interval_mon = most_frequent_monitor(rsc);
732 if (min_interval_mon != NULL) {
738 if (timeout_spec != NULL) {
740 "Setting default timeout for %s probe to " 741 "most frequent monitor's timeout '%s'",
742 rsc->
id, timeout_spec);
744 value = strdup(timeout_spec);
746 g_hash_table_insert(meta,
name, value);
751 if (action_config != NULL) {
754 meta, NULL, TRUE, rsc->
cluster);
760 for (xmlAttrPtr attr = action_config->properties;
761 attr != NULL; attr = attr->next) {
762 name = strdup((
const char *) attr->name);
763 value = strdup(pcmk__xml_attr_value(attr));
766 g_hash_table_insert(meta,
name, value);
773 if (interval_ms > 0) {
777 g_hash_table_insert(meta,
name, value);
800 timeout_spec = g_hash_table_lookup(params,
"pcmk_monitor_timeout");
801 if (timeout_spec != NULL) {
803 "Setting timeout for %s %s to " 804 "pcmk_monitor_timeout (%s)",
805 rsc->
id, action_name, timeout_spec);
807 value = strdup(timeout_spec);
809 g_hash_table_insert(meta,
name, value);
817 g_hash_table_insert(meta,
name, pcmk__itoa(unpack_timeout(timeout_spec)));
820 validate_on_fail(rsc, action_name, action_config, meta);
825 unpack_start_delay(str, meta);
827 long long start_delay = 0;
830 if (unpack_interval_origin(str, action_config, interval_ms,
834 g_hash_table_insert(meta,
name,
853 const char *value = NULL;
856 CRM_CHECK((rsc != NULL) && (action_name != NULL),
return requires);
860 value =
"nothing (not start or promote)";
873 pe_rsc_trace(rsc,
"%s of %s requires %s", action_name, rsc->
id, value);
890 guint interval_ms,
const char *value)
892 const char *desc = NULL;
893 bool needs_remote_reset =
false;
906 desc =
"node fencing";
909 "%s of %s to 'stop' because 'fence' is not " 910 "valid when fencing is disabled",
911 action_name, rsc->
id);
913 desc =
"stop resource";
918 desc =
"node standby";
926 desc =
"force migration";
930 desc =
"stop resource";
934 desc =
"restart (and possibly migrate)";
936 }
else if (pcmk__str_eq(value,
"restart-container",
pcmk__str_casei)) {
940 " for %s of %s because it does not have a container",
941 action_name, rsc->
id);
944 desc =
"restart container (and possibly migrate)";
949 desc =
"demote instance";
953 "%s of %s because '%s' is not valid",
954 action_name, rsc->
id, value);
965 needs_remote_reset =
true;
976 desc =
"restart container (and possibly migrate) (default)";
978 }
else if (needs_remote_reset) {
982 desc =
"fence remote node (default)";
984 desc =
"recover remote node connection (default)";
989 desc =
"stop unmanaged remote node (enforcing default)";
995 desc =
"resource fence (default)";
998 desc =
"resource block (default)";
1003 desc =
"restart (and possibly migrate) (default)";
1006 pe_rsc_trace(rsc,
"Failure handling for %s-interval %s of %s: %s",
1027 const char *value = NULL;
1047 value = g_hash_table_lookup(meta,
"role_after_failure");
1048 if (value != NULL) {
1050 "Support for role_after_failure is deprecated " 1051 "and will be removed in a future release");
1086 const char *value = NULL;
1089 action->task, interval_ms, xml_obj);
1094 interval_ms, value);
1132 update_action_optional(
action, optional);
1135 if ((
action->node != NULL) && (
action->op_entry != NULL)
1138 GHashTable *attrs =
action->node->details->attrs;
1140 if (
action->extra != NULL) {
1141 g_hash_table_destroy(
action->extra);
1149 update_resource_flags_for_action(rsc,
action);
1152 if (
action->extra == NULL) {
1172 find_unfencing_devices(GList *candidates, GList *matches)
1174 for (GList *gIter = candidates; gIter != NULL; gIter = gIter->next) {
1178 matches = find_unfencing_devices(candidate->
children, matches);
1184 matches = g_list_prepend(matches, candidate);
1186 }
else if (pcmk__str_eq(g_hash_table_lookup(candidate->
meta,
1190 matches = g_list_prepend(matches, candidate);
1197 node_priority_fencing_delay(
const pcmk_node_t *node,
1200 int member_count = 0;
1201 int online_count = 0;
1202 int top_priority = 0;
1203 int lowest_priority = 0;
1204 GList *gIter = NULL;
1222 for (gIter =
scheduler->
nodes; gIter != NULL; gIter = gIter->next) {
1235 if (member_count == 1
1240 if (member_count == 1
1247 if (online_count > member_count / 2) {
1253 if (lowest_priority == top_priority) {
1266 const char *reason,
bool priority_delay,
1269 char *op_key = NULL;
1279 stonith_op = lookup_singleton(
scheduler, op_key);
1280 if(stonith_op == NULL) {
1291 GString *digests_all = g_string_sized_new(1024);
1292 GString *digests_secure = g_string_sized_new(1024);
1299 for (GList *gIter = matches; gIter != NULL; gIter = gIter->next) {
1301 const char *agent = g_hash_table_lookup(match->
meta,
1309 crm_notice(
"Unfencing node %s because the definition of " 1310 "%s changed", pe__node_name(node), match->
id);
1315 "notice: Unfencing node %s because the " 1316 "definition of %s changed",
1317 pe__node_name(node), match->
id);
1322 match->
id,
":", agent,
":",
1323 data->digest_all_calc,
",", NULL);
1325 match->
id,
":", agent,
":",
1326 data->digest_secure_calc,
",", NULL);
1329 value = strdup((
const char *) digests_all->str);
1330 CRM_ASSERT((key != NULL) && (value != NULL));
1331 g_hash_table_insert(stonith_op->
meta, key, value);
1332 g_string_free(digests_all, TRUE);
1335 value = strdup((
const char *) digests_secure->str);
1336 CRM_ASSERT((key != NULL) && (value != NULL));
1337 g_hash_table_insert(stonith_op->
meta, key, value);
1338 g_string_free(digests_secure, TRUE);
1355 || g_hash_table_lookup(stonith_op->
meta,
1362 char *delay_s = pcmk__itoa(node_priority_fencing_delay(node,
1365 g_hash_table_insert(stonith_op->
meta,
1374 }
else if(reason && stonith_op->
reason == NULL) {
1375 stonith_op->
reason = strdup(reason);
1387 g_list_free_full(
action->actions_before, free);
1388 g_list_free_full(
action->actions_after, free);
1390 g_hash_table_destroy(
action->extra);
1393 g_hash_table_destroy(
action->meta);
1395 free(
action->cancel_task);
1407 xmlNode *child = NULL;
1408 GHashTable *action_meta = NULL;
1409 const char *timeout_spec = NULL;
1433 &rule_data, action_meta, NULL, FALSE,
1442 if (timeout_ms < 0) {
1446 if (action_meta != NULL) {
1447 g_hash_table_destroy(action_meta);
1463 crm_trace(
"Folding %s back into its atomic counterpart for %s",
1491 for (
const GList *gIter =
input; gIter != NULL; gIter = gIter->next) {
1500 }
else if (on_node == NULL) {
1503 }
else if (
action->node == NULL) {
1517 GList *gIter =
input;
1522 for (; gIter != NULL; gIter = gIter->next) {
1528 }
else if (on_node == NULL) {
1529 crm_trace(
"Action %s matches (ignoring node)", key);
1532 }
else if (
action->node == NULL) {
1533 crm_trace(
"Action %s matches (unallocated, assigning to %s)",
1534 key, pe__node_name(on_node));
1540 crm_trace(
"Action %s on %s matches", key, pe__node_name(on_node));
1555 if (on_node == NULL) {
1559 for (GList *gIter =
input; gIter != NULL; gIter = gIter->next) {
1562 if ((
action->node != NULL)
1567 crm_trace(
"Action %s on %s matches", key, pe__node_name(on_node));
1589 const char *task,
bool require_node)
1616 const char *change = NULL;
1620 change =
"unrunnable";
1623 change =
"unmigrateable";
1626 change =
"required";
1634 (
action->rsc == NULL)?
"" :
" ",
1642 if (
action->reason != NULL && overwrite) {
1644 action->uuid,
action->reason, pcmk__s(reason,
"(none)"));
1645 }
else if (
action->reason == NULL) {
1647 action->uuid, pcmk__s(reason,
"(none)"));
1672 #define sort_return(an_int, why) do { \ 1675 crm_trace("%s (%d) %c %s (%d) : %s", \ 1676 a_xml_id, a_call_id, an_int>0?'>':an_int<0?'<':'=', \ 1677 b_xml_id, b_call_id, why); \ 1683 bool same_node_default)
1688 char *a_uuid = NULL;
1689 char *b_uuid = NULL;
1696 bool same_node =
true;
1705 if (a_node == NULL || b_node == NULL) {
1706 same_node = same_node_default;
1712 if (same_node && pcmk__str_eq(a_xml_id, b_xml_id,
pcmk__str_none)) {
1718 pe_err(
"Duplicate lrm_rsc_op entries named %s", a_xml_id);
1725 if (a_call_id == -1 && b_call_id == -1) {
1731 }
else if (same_node && a_call_id >= 0 && a_call_id < b_call_id) {
1734 }
else if (same_node && b_call_id >= 0 && a_call_id > b_call_id) {
1737 }
else if (a_call_id >= 0 && b_call_id >= 0
1738 && (!same_node || a_call_id == b_call_id)) {
1750 (
long long) last_a, (
long long) last_b);
1751 if (last_a >= 0 && last_a < last_b) {
1754 }
else if (last_b >= 0 && last_a > last_b) {
1795 if (b_call_id == -1) {
1798 }
else if (a_call_id == -1) {
1802 }
else if ((a_id >= 0 && a_id < b_id) || b_id == -1) {
1805 }
else if ((b_id >= 0 && a_id > b_id) || a_id == -1) {
1817 const xmlNode *xml_a = a;
1818 const xmlNode *xml_b = b;
1870 g_hash_table_insert(
action->meta,
name, pcmk__itoa(expected_result));
#define XML_OP_ATTR_ORIGIN
#define CRM_CHECK(expr, failure_action)
bool pe_can_fence(const pcmk_scheduler_t *scheduler, const pcmk_node_t *node)
#define XML_RSC_OP_LAST_CHANGE
pcmk_action_t * custom_action(pcmk_resource_t *rsc, char *key, const char *task, const pcmk_node_t *on_node, gboolean optional, pcmk_scheduler_t *scheduler)
Create or update an action object.
enum pe_quorum_policy no_quorum_policy
Response to loss of quorum.
pcmk_node_t * pe__copy_node(const pcmk_node_t *this_node)
Resource can be recovered after fencing.
#define crm_notice(fmt, args...)
pcmk_scheduler_t * cluster
Cluster that resource is part of.
xmlNode * ops_xml
Configuration of resource operations (possibly expanded from template)
GHashTable * attrs
Node attributes.
Resource can be recovered immediately.
#define pe_rsc_debug(rsc, fmt, args...)
#define XML_OP_ATTR_DIGESTS_ALL
Whether action should not be executed.
void pe__add_action_expected_result(pcmk_action_t *action, int expected_result)
#define pe__set_action_flags(action, flags_to_set)
enum rsc_start_requirement pcmk__action_requires(const pcmk_resource_t *rsc, const char *action_name)
#define XML_EXPR_ATTR_TYPE
#define XML_ATTR_TRANSITION_MAGIC
GList * find_actions(GList *input, const char *key, const pcmk_node_t *on_node)
#define PCMK_STONITH_PROVIDES
bool pcmk__strcase_any_of(const char *s,...) G_GNUC_NULL_TERMINATED
#define XML_CONFIG_ATTR_PRIORITY_FENCING_DELAY
struct crm_time_s crm_time_t
enum rsc_role_e role
Resource's current role.
Whether partition has quorum (via have-quorum property)
Ban resource from current node.
GList * children
Resource's child resources, if any.
Whether resource can be started or promoted only on quorate nodes.
int priority_fencing_delay
Priority fencing delay.
xmlNode * op_defaults
Configured operation defaults.
xmlNode * first_named_child(const xmlNode *parent, const char *name)
xmlNode * xml
Resource configuration (possibly expanded from template)
enum rsc_role_e next_role
Resource's scheduled next role.
Fence resource's node.
bool pcmk_is_probe(const char *task, guint interval)
Implementation of pcmk_action_t.
#define pcmk__config_err(fmt...)
#define PCMK_ACTION_MONITOR
long long crm_get_msec(const char *input)
Parse a time+units string and return milliseconds equivalent.
GHashTable * meta
Resource's meta-attributes.
#define XML_LRM_ATTR_INTERVAL
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)
#define PCMK__VALUE_UNFENCING
#define PCMK_ACTION_MIGRATE_TO
bool pe__resource_is_remote_conn(const pcmk_resource_t *rsc)
#define XML_NVPAIR_ATTR_NAME
#define XML_OP_ATTR_DIGESTS_SECURE
enum action_fail_response pcmk__parse_on_fail(const pcmk_resource_t *rsc, const char *action_name, guint interval_ms, const char *value)
action_tasks
Possible actions (including some pseudo-actions)
gboolean decode_transition_magic(const char *magic, char **uuid, int *transition_id, int *action_id, int *op_status, int *op_rc, int *target_rc)
Parse a transition magic string into its constituent parts.
void pe_fence_node(pcmk_scheduler_t *scheduler, pcmk_node_t *node, const char *reason, bool priority_delay)
Schedule a fence action for a node.
enum action_tasks text2task(const char *task)
GList * actions
Scheduled actions.
action_fail_response
Possible responses to a resource action failure.
#define CRM_LOG_ASSERT(expr)
int(* info)(pcmk__output_t *out, const char *format,...) G_GNUC_PRINTF(2
char * pe__action2reason(const pcmk_action_t *action, enum pe_action_flags flag)
#define XML_OP_ATTR_ON_FAIL
pcmk_resource_t * container
Resource containing this one, if any.
Demote if promotable, else stop.
int crm_element_value_int(const xmlNode *data, const char *name, int *dest)
Retrieve the integer value of an XML attribute.
Implementation of pcmk_scheduler_t.
pcmk_action_t * get_pseudo_op(const char *name, pcmk_scheduler_t *scheduler)
char * reason
Readable description of why action is needed.
#define pe__set_resource_flags(resource, flags_to_set)
pe_quorum_policy
Possible responses to loss of quorum.
GList * resources
Resources in cluster.
#define PCMK__ROLE_PROMOTED
rsc_start_requirement
What resource needs before it can be recovered from a failed node.
GList * nodes
Nodes in cluster.
enum action_tasks get_complex_task(const pcmk_resource_t *rsc, const char *name)
Stop resource and leave stopped.
#define PCMK__ROLE_PROMOTED_LEGACY
#define XML_TAG_ATTR_SETS
const char * role2text(enum rsc_role_e role)
op_digest_cache_t * pe__compare_fencing_digest(pcmk_resource_t *rsc, const char *agent, pcmk_node_t *node, pcmk_scheduler_t *scheduler)
#define PCMK_DEFAULT_ACTION_TIMEOUT_MS
Default timeout (in milliseconds) for non-metadata actions.
int pe_get_configured_timeout(pcmk_resource_t *rsc, const char *action, pcmk_scheduler_t *scheduler)
#define PCMK_ACTION_DEMOTE
Whether any resource provides or requires unfencing (via CIB resources)
guint remote_reconnect_ms
Retry interval for remote connections.
void pe__set_next_role(pcmk_resource_t *rsc, enum rsc_role_e role, const char *why)
Put resource's node in standby.
Restart resource's container.
Implementation of pcmk_resource_t.
void pe__clear_resource_history(pcmk_resource_t *rsc, const pcmk_node_t *node)
const char * crm_element_value(const xmlNode *data, const char *name)
Retrieve the value of an XML attribute.
enum rsc_role_e pcmk__role_after_failure(const pcmk_resource_t *rsc, const char *action_name, enum action_fail_response on_fail, GHashTable *meta)
#define pe_warn_once(pe_wo_bit, fmt...)
#define pe__clear_action_flags(action, flags_to_clear)
#define crm_trace(fmt, args...)
#define do_crm_log(level, fmt, args...)
Log a message.
void pcmk__g_strcat(GString *buffer,...) G_GNUC_NULL_TERMINATED
void * priv
For Pacemaker use only.
char * crm_strdup_printf(char const *format,...) G_GNUC_PRINTF(1
GHashTable * meta
Meta-attributes relevant to action.
#define pcmk_is_set(g, f)
Convenience alias for pcmk_all_flags_set(), to check single flag.
int action_id
ID to use for next created action.
const char * stonith_action
Default fencing action.
struct pe_node_shared_s * details
Basic node information.
pcmk_action_t * find_first_action(const GList *input, const char *uuid, const char *task, const pcmk_node_t *on_node)
#define PCMK_ACTION_START
#define XML_AGENT_ATTR_PROVIDER
int pcmk__xe_get_bool_attr(const xmlNode *node, const char *name, bool *value)
unsigned long long flags
Group of enum pcmk_rsc_flags.
const char * uname
Node name in cluster.
#define XML_TAG_META_SETS
void pcmk__str_update(char **str, const char *value)
void pe__unpack_dataset_nvpairs(const xmlNode *xml_obj, const char *set_name, const pe_rule_eval_data_t *rule_data, GHashTable *hash, const char *always_first, gboolean overwrite, pcmk_scheduler_t *scheduler)
int crm_element_value_epoch(const xmlNode *xml, const char *name, time_t *dest)
Retrieve the seconds-since-epoch value of an XML attribute.
pcmk_action_t * pe__new_rsc_pseudo_action(pcmk_resource_t *rsc, const char *task, bool optional, bool runnable)
#define PCMK_ACTION_STONITH
pe_action_flags
Action scheduling flags.
char * pcmk__op_key(const char *rsc_id, const char *op_type, guint interval_ms)
Generate an operation key (RESOURCE_ACTION_INTERVAL)
Implementation of pcmk_node_t.
enum rsc_role_e text2role(const char *role)
enum pe_obj_types variant
Resource variant.
bool pcmk__str_any_of(const char *s,...) G_GNUC_NULL_TERMINATED
long long crm_time_get_seconds(const crm_time_t *dt)
void pe_action_set_reason(pcmk_action_t *action, const char *reason, bool overwrite)
Resource can be recovered if quorate.
const char * id
Node ID at the cluster layer.
xmlNode * pcmk__find_action_config(const pcmk_resource_t *rsc, const char *action_name, guint interval_ms, bool include_disabled)
#define XML_LRM_ATTR_TARGET_UUID
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.
#define PCMK_ACTION_LRM_DELETE
bool pe__is_guest_node(const pcmk_node_t *node)
Whether resource requires fencing before recovery if on unclean node.
Whether resource's class is "stonith".
GHashTable * pcmk__strkey_table(GDestroyNotify key_destroy_func, GDestroyNotify value_destroy_func)
pcmk__action_result_t result
Whether action is runnable.
void add_hash_param(GHashTable *hash, const char *name, const char *value)
GHashTable * pcmk__unpack_action_meta(pcmk_resource_t *rsc, const pcmk_node_t *node, const char *action_name, guint interval_ms, const xmlNode *action_config)
Whether fencing is enabled (via stonith-enabled property)
pcmk_scheduler_t * scheduler
Whether action does not require invoking an agent.
char guint crm_parse_interval_spec(const char *input)
Parse milliseconds from a Pacemaker interval specification.
crm_time_t * crm_time_new(const char *string)
#define PCMK_ACTION_MIGRATE_FROM
GList * find_actions_exact(GList *input, const char *key, const pcmk_node_t *on_node)
This structure contains everything that makes up a single output formatter.
gboolean parse_op_key(const char *key, char **rsc_id, char **op_type, guint *interval_ms)
#define XML_LRM_ATTR_INTERVAL_MS
#define XML_LRM_ATTR_CALLID
#define pe__clear_resource_flags(resource, flags_to_clear)
#define PCMK_ACTION_PROMOTE
Whether operation-specific instance attributes have been unpacked yet.
#define PCMK__VALUE_NOTHING
#define XML_OP_ATTR_START_DELAY
GHashTable * pcmk__unpack_action_rsc_params(const xmlNode *action_xml, GHashTable *node_attrs, pcmk_scheduler_t *scheduler)
Whether action is allowed to be part of a live migration.
#define sort_return(an_int, why)
const char * pcmk__readable_interval(guint interval_ms)
void pe_free_action(pcmk_action_t *action)
uint32_t pcmk_get_ra_caps(const char *standard)
Get capabilities of a resource agent standard.
Treat resource as unmanaged.
int pe__is_newer_op(const xmlNode *xml_a, const xmlNode *xml_b, bool same_node_default)
Resource role is unknown.
#define XML_LRM_ATTR_TARGET
#define pe_rsc_trace(rsc, fmt, args...)
GHashTable * pe_rsc_params(pcmk_resource_t *rsc, const pcmk_node_t *node, pcmk_scheduler_t *scheduler)
Get a table of resource parameters.
GHashTable * singletons
Actions for which there can be only one (such as "fence node X")
unsigned long long flags
Group of enum pcmk_scheduler_flags.
Whether action can be executed on DC rather than own node.
gint sort_op_by_callid(gconstpointer a, gconstpointer b)
Whether resource is managed.
Whether resource can be started or promoted only on unfenced nodes.
enum node_type type
Node variant.
crm_time_t * now
Current time for evaluation purposes.
#define crm_info(fmt, args...)
gboolean online
Whether online.
#define XML_ATTR_TE_TARGET_RC
Act as if failure didn't happen.
#define PCMK_ACTION_NOTIFY
#define XML_AGENT_ATTR_CLASS
char * id
Resource ID in configuration.
xmlNode * crm_next_same_xml(const xmlNode *sibling)
Get next instance of same XML tag.
void crm_time_free(crm_time_t *dt)