13 #include <sys/param.h> 34 bool runnable =
false;
47 if ((node == NULL) || !pcmk__is_clone(
action->rsc)) {
93 action_uuid_for_ordering(
const char *first_uuid,
96 guint interval_ms = 0;
99 char *first_task_str = NULL;
111 if (interval_ms > 0) {
116 switch (first_task) {
122 remapped_task = first_task + 1;
129 remapped_task = first_task;
136 crm_err(
"Unknown action '%s' in ordering", first_task_str);
145 && (pcmk__is_clone(first_rsc) || pcmk__is_bundled(first_rsc))) {
152 "Remapped action UUID %s to %s for ordering purposes",
157 free(first_task_str);
185 && (
action->uuid != NULL)) {
186 char *uuid = action_uuid_for_ordering(
action->uuid, rsc);
190 crm_warn(
"Not remapping %s to %s because %s does not have " 191 "remapped action",
action->uuid, uuid, rsc->
id);
218 static inline uint32_t
242 uint32_t first_flags, uint32_t then_flags,
266 "%s then %s: mapped " 267 "pcmk__ar_first_implies_same_node_then to " 268 "pcmk__ar_first_implies_then on %s",
269 first->
uuid, then->
uuid, pcmk__node_name(node));
273 if (then->
rsc != NULL) {
274 changed |= update(then->
rsc, first, then, node,
284 "%s then %s: %s after pcmk__ar_first_implies_then",
286 (changed?
"changed" :
"unchanged"));
290 && (then->
rsc != NULL)) {
294 changed |= update(then->
rsc, first, then, node, first_flags, restart,
297 "%s then %s: %s after pcmk__ar_intermediate_stop",
299 (changed?
"changed" :
"unchanged"));
303 if (first->
rsc != NULL) {
304 changed |= update(first->
rsc, first, then, node, first_flags,
313 "%s then %s: %s after pcmk__ar_then_implies_first",
315 (changed?
"changed" :
"unchanged"));
319 if (then->
rsc != NULL) {
320 changed |= update(then->
rsc, first, then, node,
326 "%s then %s: %s after " 327 "pcmk__ar_promoted_then_implies_first",
329 (changed?
"changed" :
"unchanged"));
333 if (then->
rsc != NULL) {
334 changed |= update(then->
rsc, first, then, node, first_flags,
354 (changed?
"changed" :
"unchanged"));
358 && (then->
rsc != NULL)) {
364 "%s then %s: ignoring because first is stopping",
368 changed |= update(then->
rsc, first, then, node, first_flags,
373 "%s then %s: %s after pcmk__ar_nested_remote_probe",
375 (changed?
"changed" :
"unchanged"));
379 if (then->
rsc != NULL) {
380 changed |= update(then->
rsc, first, then, node, first_flags,
391 "%s then %s: %s after pcmk__ar_unrunnable_first_blocks",
393 (changed?
"changed" :
"unchanged"));
397 if (then->
rsc != NULL) {
398 changed |= update(then->
rsc, first, then, node, first_flags,
403 "%s then %s: %s after " 404 "pcmk__ar_unmigratable_then_blocks",
406 (changed?
"changed" :
"unchanged"));
410 if (then->
rsc != NULL) {
411 changed |= update(then->
rsc, first, then, node, first_flags,
416 "%s then %s: %s after pcmk__ar_first_else_then",
418 (changed?
"changed" :
"unchanged"));
422 if (then->
rsc != NULL) {
423 changed |= update(then->
rsc, first, then, node, first_flags,
429 (changed?
"changed" :
"unchanged"));
433 if (then->
rsc != NULL) {
434 changed |= update(then->
rsc, first, then, node, first_flags,
440 (changed?
"changed" :
"unchanged"));
465 && (first->
rsc != NULL)
476 "%s then %s: %s after checking whether first " 477 "is blocked, unmanaged, unrunnable stop",
479 (changed?
"changed" :
"unchanged"));
487 #define action_type_str(flags) \ 488 (pcmk_is_set((flags), pcmk_action_pseudo)? "pseudo-action" : "action") 490 #define action_optional_str(flags) \ 491 (pcmk_is_set((flags), pcmk_action_optional)? "optional" : "required") 493 #define action_runnable_str(flags) \ 494 (pcmk_is_set((flags), pcmk_action_runnable)? "runnable" : "unrunnable") 496 #define action_node_str(a) \ 497 (((a)->node == NULL)? "no node" : (a)->node->details->uname) 512 int last_flags = then->
flags;
549 if ((first->
rsc != NULL)
550 && pcmk__is_group(first->
rsc)
554 if (first_node != NULL) {
556 pcmk__node_name(first_node), first->
uuid);
560 if (pcmk__is_group(then->
rsc)
564 if (then_node != NULL) {
566 pcmk__node_name(then_node), then->
uuid);
572 && (first_node != NULL) && (then_node != NULL)
573 && !pcmk__same_node(first_node, then_node)) {
576 "Disabled ordering %s on %s then %s on %s: " 578 other->
action->
uuid, pcmk__node_name(first_node),
579 then->
uuid, pcmk__node_name(then_node));
586 if ((first->
rsc != NULL)
599 if ((first->
rsc != NULL) && (then->
rsc != NULL)
601 first = action_for_ordering(first);
603 if (first != other->
action) {
609 "%s (%#.6x) then %s (%#.6x): type=%#.6x node=%s",
613 if (first == other->
action) {
618 uint32_t first_flags, then_flags;
620 first_flags = action_flags_for_ordering(first, then_node);
621 then_flags = action_flags_for_ordering(then, first_node);
623 changed |= update_action_for_ordering_flags(first, then,
624 first_flags, then_flags,
636 "Disabled ordering %s then %s in favor of %s " 645 crm_trace(
"Re-processing %s and its 'after' actions " 646 "because it changed", first->
uuid);
658 if (last_flags == then->
flags) {
666 crm_trace(
"Re-processing %s and its 'after' actions because it changed",
673 for (lpc = then->
actions_after; lpc != NULL; lpc = lpc->next) {
684 return (
action != NULL) && pcmk__is_primitive(
action->rsc);
695 #define clear_action_flag_because(action, flag, reason) do { \ 696 if (pcmk_is_set((action)->flags, (flag))) { \ 697 pcmk__clear_action_flags(action, flag); \ 698 if ((action)->rsc != (reason)->rsc) { \ 699 char *reason_text = pe__action2reason((reason), (flag)); \ 700 pe_action_set_reason((action), reason_text, false); \ 722 if ((then->
rsc == NULL)
767 const char *reason = NULL;
786 && (first->
rsc == then->
rsc)) {
790 if (reason == NULL) {
844 uint32_t filter, uint32_t
type,
848 uint32_t then_flags = 0U;
849 uint32_t first_flags = 0U;
853 then_flags = then->
flags;
854 first_flags = first->
flags;
856 handle_asymmetric_ordering(first, then);
928 handle_restart_ordering(first, then, filter);
931 if (then_flags != then->
flags) {
934 "%s on %s: flags are now %#.6x (was %#.6x) " 935 "because of 'first' %s (%#.6x)",
936 then->
uuid, pcmk__node_name(then->
node),
939 if ((then->
rsc != NULL) && (then->
rsc->
parent != NULL)) {
945 if (first_flags != first->
flags) {
948 "%s on %s: flags are now %#.6x (was %#.6x) " 949 "because of 'then' %s (%#.6x)",
950 first->
uuid, pcmk__node_name(first->
node),
969 const char *node_uname = NULL;
970 const char *node_uuid = NULL;
971 const char *desc = NULL;
976 if (
action->node != NULL) {
977 node_uname =
action->node->details->uname;
978 node_uuid =
action->node->details->id;
980 node_uname =
"<none>";
992 desc =
"!!Non-Startable!! ";
994 desc =
"(Provisional) ";
996 crm_trace(
"%s%s%sAction %d: %s%s%s%s%s%s",
997 ((pre_text == NULL)?
"" : pre_text),
998 ((pre_text == NULL)?
"" :
": "),
1000 (node_uname?
"\ton " :
""), (node_uname? node_uname :
""),
1001 (node_uuid?
"\t\t(" :
""), (node_uuid? node_uuid :
""),
1002 (node_uuid?
")" :
""));
1010 desc =
"!!Non-Startable!! ";
1012 desc =
"(Provisional) ";
1014 crm_trace(
"%s%s%sAction %d: %s %s%s%s%s%s%s",
1015 ((pre_text == NULL)?
"" : pre_text),
1016 ((pre_text == NULL)?
"" :
": "),
1019 (node_uname?
"\ton " :
""), (node_uname? node_uname :
""),
1020 (node_uuid?
"\t\t(" :
""), (node_uuid? node_uuid :
""),
1021 (node_uuid?
")" :
""));
1026 const GList *iter = NULL;
1029 crm_trace(
"\t\t====== Preceding Actions");
1030 for (iter =
action->actions_before; iter != NULL; iter = iter->next) {
1034 crm_trace(
"\t\t====== Subsequent Actions");
1035 for (iter =
action->actions_after; iter != NULL; iter = iter->next) {
1043 g_list_length(
action->actions_before),
1044 g_list_length(
action->actions_after));
1059 char *shutdown_id = NULL;
1089 char *digest = NULL;
1090 xmlNode *args_xml = NULL;
1092 if (op->
params == NULL) {
1104 #define FAKE_TE_ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" 1121 const char *caller_version,
int target_rc,
1122 const char *node,
const char *origin)
1127 char *op_id_additional = NULL;
1128 char *local_user_data = NULL;
1129 const char *exit_reason = NULL;
1131 xmlNode *xml_op = NULL;
1132 const char *task = NULL;
1135 crm_trace(
"Creating history XML for %s-interval %s action for %s on %s " 1136 "(DC version: %s, origin: %s)",
1138 ((node == NULL)?
"no node" : node), caller_version, origin);
1183 op_id = strdup(key);
1196 op_id = strdup(key);
1205 if (xml_op == NULL) {
1218 if (magic == NULL) {
1241 "): last=%u change=%u exec=%u queue=%u",
1251 (
long long) op->
t_run);
1272 add_op_digest_to_xml(op, xml_op);
1274 if (op_id_additional) {
1276 op_id = op_id_additional;
1277 op_id_additional = NULL;
1281 if (local_user_data) {
1282 free(local_user_data);
1310 || !pcmk__same_node(
action->node,
action->rsc->lock_node)) {
1317 if (
action->node->details->shutdown && (
action->task != NULL)
1327 sort_action_id(gconstpointer a, gconstpointer b)
1360 action->actions_before = g_list_sort(
action->actions_before,
1362 for (item =
action->actions_before; item != NULL; item = next) {
1366 if ((last_input != NULL)
1368 crm_trace(
"Input %s (%d) duplicate skipped for action %s (%d)",
1382 action->actions_before = g_list_delete_link(
action->actions_before,
1404 char *node_name = NULL;
1408 if (
action->rsc != NULL) {
1417 task = strdup(
"Shutdown");
1421 const char *op = g_hash_table_lookup(
action->meta,
1430 if (pcmk__is_guest_or_bundle_node(
action->node)) {
1434 pcmk__node_name(
action->node),
1436 }
else if (
action->node != NULL) {
1440 out->
message(out,
"node-action", task, node_name,
action->reason);
1464 task_for_digest(
const char *task, guint interval_ms)
1469 if ((interval_ms == 0)
1495 only_sanitized_changed(
const xmlNode *xml_op,
1499 const char *digest_secure = NULL;
1523 force_restart(
pcmk_resource_t *rsc,
const char *task, guint interval_ms,
1543 schedule_reload(gpointer
data, gpointer user_data)
1551 g_list_foreach(rsc->
children, schedule_reload, user_data);
1572 "%s: preventing agent reload because start pending",
1610 const xmlNode *xml_op)
1612 guint interval_ms = 0;
1613 const char *task = NULL;
1616 CRM_CHECK((rsc != NULL) && (node != NULL) && (xml_op != NULL),
1625 if (interval_ms > 0) {
1628 "%s-interval %s for %s on %s is in configuration",
1630 pcmk__node_name(node));
1635 task, interval_ms, node,
"orphan");
1640 pcmk__node_name(node));
1645 crm_trace(
"Checking %s-interval %s for %s on %s for configuration changes",
1647 pcmk__node_name(node));
1648 task = task_for_digest(task, interval_ms);
1651 if (only_sanitized_changed(xml_op, digest_data, rsc->
cluster)) {
1656 "Only 'private' parameters to %s-interval %s for %s " 1657 "on %s changed: %s",
1659 pcmk__node_name(node),
1665 switch (digest_data->
rc) {
1668 force_restart(rsc, task, interval_ms, node);
1675 if (interval_ms > 0) {
1687 "Device parameters changed (reload)", NULL,
1690 schedule_reload((gpointer) rsc, (gpointer) node);
1695 "because agent doesn't support reload",
1699 force_restart(rsc, task, interval_ms, node);
1718 rsc_history_as_list(
const xmlNode *rsc_entry,
int *start_index,
int *stop_index)
1726 ops = g_list_prepend(ops, rsc_op);
1753 int start_index = 0;
1754 GList *sorted_op_list = NULL;
1759 "Skipping configuration check " 1760 "for orphaned clone instance %s",
1764 "Skipping configuration check and scheduling " 1765 "clean-up for orphaned resource %s", rsc->
id);
1776 "Skipping configuration check for %s " 1777 "because no longer active on %s",
1778 rsc->
id, pcmk__node_name(node));
1782 pcmk__rsc_trace(rsc,
"Checking for configuration changes for %s on %s",
1783 rsc->
id, pcmk__node_name(node));
1789 sorted_op_list = rsc_history_as_list(rsc_entry, &start_index, &stop_index);
1790 if (start_index < stop_index) {
1794 for (GList *iter = sorted_op_list; iter != NULL; iter = iter->next) {
1795 xmlNode *rsc_op = (xmlNode *) iter->data;
1796 const char *task = NULL;
1797 guint interval_ms = 0;
1799 if (++offset < start_index) {
1807 if ((interval_ms > 0)
1813 task, interval_ms, node,
"maintenance mode");
1815 }
else if ((interval_ms > 0)
1843 g_list_free(sorted_op_list);
1860 process_node_history(
pcmk_node_t *node,
const xmlNode *lrm_rscs)
1862 crm_trace(
"Processing node history for %s", pcmk__node_name(node));
1868 if (rsc_entry->children != NULL) {
1872 for (GList *iter =
result; iter != NULL; iter = iter->next) {
1875 if (pcmk__is_primitive(rsc)) {
1876 process_rsc_history(rsc_entry, rsc, node);
1885 #define XPATH_NODE_HISTORY "/" PCMK_XE_CIB "/" PCMK_XE_STATUS \ 1886 "/" PCMK__XE_NODE_STATE \ 1887 "[@" PCMK_XA_UNAME "='%s']" \ 1888 "/" PCMK__XE_LRM "/" PCMK__XE_LRM_RESOURCES 1905 crm_trace(
"Check resource and action configuration for changes");
1911 for (GList *iter =
scheduler->
nodes; iter != NULL; iter = iter->next) {
1922 xmlNode *history = NULL;
1928 process_node_history(node, history);
pcmk_assignment_methods_t * cmds
const pcmk_resource_t * pe__const_top_resource(const pcmk_resource_t *rsc, bool include_bundle)
#define PCMK__XA_OPERATION_KEY
#define CRM_CHECK(expr, failure_action)
Relation applies only if actions are on same node.
void trigger_unfencing(pcmk_resource_t *rsc, pcmk_node_t *node, const char *reason, pcmk_action_t *dependency, pcmk_scheduler_t *scheduler)
'then' is runnable (and migratable) only if 'first' is runnable
pcmk_scheduler_t * cluster
void(* output_actions)(pcmk_resource_t *rsc)
G_GNUC_INTERNAL void pcmk__schedule_cleanup(pcmk_resource_t *rsc, const pcmk_node_t *node, bool optional)
void pcmk__filter_op_for_digest(xmlNode *param_set)
User-configured asymmetric ordering.
pcmk_node_t *(* location)(const pcmk_resource_t *rsc, GList **list, int current)
void hash2field(gpointer key, gpointer value, gpointer user_data)
Set XML attribute based on hash table entry.
enum action_tasks pcmk_parse_action(const char *action_name)
Parse an action type from an action name.
const char * crm_xml_add_ms(xmlNode *node, const char *name, guint ms)
Create an XML attribute with specified name and unsigned value.
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)
bool pcmk__strcase_any_of(const char *s,...) G_GNUC_NULL_TERMINATED
int(* message)(pcmk__output_t *out, const char *message_id,...)
#define PCMK__XA_TRANSITION_MAGIC
#define clear_action_flag_because(action, flag, reason)
#define PCMK__OP_FMT
printf-style format to create operation key from resource, action, interval
#define pcmk__rsc_trace(rsc, fmt, args...)
pcmk__op_digest_t * rsc_action_digest_cmp(pcmk_resource_t *rsc, const xmlNode *xml_op, pcmk_node_t *node, pcmk_scheduler_t *scheduler)
void pcmk__deduplicate_action_inputs(pcmk_action_t *action)
gboolean order_actions(pcmk_action_t *lh_action, pcmk_action_t *rh_action, uint32_t flags)
enum rsc_role_e(* state)(const pcmk_resource_t *rsc, gboolean current)
If 'first' is unrunnable, 'then' becomes a real, unmigratable action.
const char * crm_xml_add_int(xmlNode *node, const char *name, int value)
Create an XML attribute with specified name and integer value.
#define pcmk__insert_meta(obj, name, value)
void pcmk__handle_rsc_config_changes(pcmk_scheduler_t *scheduler)
G_GNUC_INTERNAL bool pcmk__rsc_agent_changed(pcmk_resource_t *rsc, pcmk_node_t *node, const xmlNode *rsc_entry, bool active_on_node)
#define PCMK_ACTION_MONITOR
#define PCMK_XA_EXIT_REASON
G_GNUC_INTERNAL void pcmk__block_colocation_dependents(pcmk_action_t *action)
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)
#define PCMK_XE_PARAMETERS
#define PCMK_ACTION_MIGRATE_TO
#define PCMK_ACTION_DO_SHUTDOWN
gint sort_op_by_callid(gconstpointer a, gconstpointer b)
#define PCMK__META_STONITH_ACTION
xmlNode * pcmk__create_history_xml(xmlNode *parent, lrmd_event_data_t *op, const char *caller_version, int target_rc, const char *node, const char *origin)
#define PCMK_XA_QUEUE_TIME
#define PCMK__XA_OP_RESTART_DIGEST
#define CRM_LOG_ASSERT(expr)
int(* info)(pcmk__output_t *out, const char *format,...) G_GNUC_PRINTF(2
If 'first' is required, 'then' action for instance on same node is.
#define PCMK_ACTION_RELOAD
pcmk_action_t * pe__clear_failcount(pcmk_resource_t *rsc, const pcmk_node_t *node, const char *reason, pcmk_scheduler_t *scheduler)
Schedule a controller operation to clear a fail count.
enum crm_ais_msg_types type
#define PCMK__META_ON_NODE
pcmk_scheduler_t * data_set
pcmk_resource_t * container
#define PCMK_XA_OPERATION
#define pcmk__set_relation_flags(ar_flags, flags_to_set)
xmlNode * get_xpath_object(const char *xpath, xmlNode *xml_obj, int error_level)
int pe_get_failcount(const pcmk_node_t *node, pcmk_resource_t *rsc, time_t *last_failure, uint32_t flags, const xmlNode *xml_op)
G_GNUC_INTERNAL bool pcmk__node_available(const pcmk_node_t *node, bool consider_score, bool consider_guest)
#define PCMK__META_MIGRATE_TARGET
#define pcmk__rsc_debug(rsc, fmt, args...)
bool pcmk__check_action_config(pcmk_resource_t *rsc, pcmk_node_t *node, const xmlNode *xml_op)
#define PCMK_ACTION_RELOAD_AGENT
gboolean did_rsc_op_fail(lrmd_event_data_t *event, int target_rc)
#define PCMK__XE_LRM_RESOURCE
#define PCMK__XA_TRANSITION_KEY
char * calculate_operation_digest(xmlNode *local_cib, const char *version)
Calculate and return digest of XML operation.
#define crm_warn(fmt, args...)
G_GNUC_INTERNAL GList * pcmk__rscs_matching_id(const char *id, const pcmk_scheduler_t *scheduler)
char * pcmk__transition_key(int transition_id, int action_id, int target_rc, const char *node)
#define action_type_str(flags)
int crm_element_value_ms(const xmlNode *data, const char *name, guint *dest)
Retrieve the millisecond value of an XML attribute.
#define action_node_str(a)
#define crm_debug(fmt, args...)
Actions are ordered (optionally, if no other flags are set)
#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.
uint32_t pcmk__update_ordered_actions(pcmk_action_t *first, pcmk_action_t *then, const pcmk_node_t *node, uint32_t flags, uint32_t filter, uint32_t type, pcmk_scheduler_t *scheduler)
xmlNode * pcmk__xe_first_child(const xmlNode *parent, const char *node_name, const char *attr_n, const char *attr_v)
G_GNUC_INTERNAL void pcmk__schedule_cancel(pcmk_resource_t *rsc, const char *call_id, const char *task, guint interval_ms, const pcmk_node_t *node, const char *reason)
#define PCMK__XA_OP_DIGEST
#define crm_trace(fmt, args...)
void pcmk__update_action_for_orderings(pcmk_action_t *then, pcmk_scheduler_t *scheduler)
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.
struct pe_node_shared_s * details
bool pe__bundle_needs_remote_name(pcmk_resource_t *rsc)
#define crm_log_xml_debug(xml, text)
#define pcmk__set_raw_action_flags(action_flags, action_name, to_set)
#define PCMK_ACTION_START
Action completed, result is known.
#define PCMK_ACTION_STONITH
#define pcmk__clear_updated_flags(au_flags, action, flags_to_clear)
#define pcmk__set_rsc_flags(resource, flags_to_set)
char * pcmk__op_key(const char *rsc_id, const char *op_type, guint interval_ms)
Generate an operation key (RESOURCE_ACTION_INTERVAL)
void free_xml(xmlNode *child)
enum pe_obj_types variant
bool pcmk__str_any_of(const char *s,...) G_GNUC_NULL_TERMINATED
#define pcmk__str_copy(str)
const char * pcmk_action_text(enum action_tasks action)
Get string equivalent of an action type.
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.
#define pcmk__clear_relation_flags(ar_flags, flags_to_clear)
const char * crm_xml_add_ll(xmlNode *node, const char *name, long long value)
Create an XML attribute with specified name and long long int value.
#define PCMK_XA_CRM_FEATURE_SET
#define PCMK__XA_OP_SECURE_DIGEST
#define action_runnable_str(flags)
#define action_optional_str(flags)
#define PCMK_XA_EXEC_TIME
xmlNode * pcmk__find_action_config(const pcmk_resource_t *rsc, const char *action_name, guint interval_ms, bool include_disabled)
char * pcmk__notify_key(const char *rsc_id, const char *notify_type, const char *op_type)
#define PCMK_META_INTERVAL
#define PCMK_XA_LAST_RC_CHANGE
If 'then' is required, 'first' must be added to the transition graph.
pcmk__action_result_t result
G_GNUC_INTERNAL void pcmk__reschedule_recurring(pcmk_resource_t *rsc, const char *task, guint interval_ms, pcmk_node_t *node)
#define XPATH_NODE_HISTORY
pcmk_action_t * find_first_action(const GList *input, const char *uuid, const char *task, const pcmk_node_t *on_node)
#define pcmk__set_updated_flags(au_flags, action, flags_to_set)
#define crm_err(fmt, args...)
pcmk_scheduler_t * scheduler
#define PCMK__XE_LRM_RSC_OP
If 'first' is required and runnable, 'then' must be in graph.
void lrmd__set_result(lrmd_event_data_t *event, enum ocf_exitcode rc, int op_status, const char *exit_reason)
#define PCMK__META_OP_NO_WAIT
#define PCMK_ACTION_MIGRATE_FROM
#define PCMK__XA_OP_STATUS
void calculate_active_ops(const GList *sorted_op_list, int *start_index, int *stop_index)
This structure contains everything that makes up a single output formatter.
int compare_version(const char *version1, const char *version2)
gboolean parse_op_key(const char *key, char **rsc_id, char **op_type, guint *interval_ms)
gboolean is_parent(pcmk_resource_t *child, pcmk_resource_t *rsc)
If 'then' action becomes required, 'first' becomes optional.
#define PCMK_ACTION_PROMOTE
enum pe_action_flags flags
uint32_t(* update_ordered_actions)(pcmk_action_t *first, pcmk_action_t *then, const pcmk_node_t *node, uint32_t flags, uint32_t filter, uint32_t type, pcmk_scheduler_t *scheduler)
#define pcmk__set_action_flags(action, flags_to_set)
char * digest_secure_calc
bool pcmk__action_locks_rsc_to_node(const pcmk_action_t *action)
const char * pcmk__readable_interval(guint interval_ms)
pcmk_action_t * pcmk__new_shutdown_action(pcmk_node_t *node)
G_GNUC_INTERNAL void pcmk__order_stops_before_shutdown(pcmk_node_t *node, pcmk_action_t *shutdown_op)
#define PCMK__META_MIGRATE_SOURCE
bool pe__rsc_running_on_only(const pcmk_resource_t *rsc, const pcmk_node_t *node)
const char * crm_meta_value(GHashTable *hash, const char *field)
Get the value of a meta-attribute.
xmlNode * pcmk__xe_create(xmlNode *parent, const char *name)
#define PCMK_XA_CRM_DEBUG_ORIGIN
xmlNode * pcmk__xe_next_same(const xmlNode *node)
'then' action is runnable if certain number of 'first' instances are
void pe__add_param_check(const xmlNode *rsc_op, pcmk_resource_t *rsc, pcmk_node_t *node, enum pcmk__check_parameters, pcmk_scheduler_t *scheduler)
void pcmk__log_action(const char *pre_text, const pcmk_action_t *action, bool details)
#define pcmk__clear_rsc_flags(resource, flags_to_clear)
int required_runnable_before
enum pcmk__digest_result rc
#define PCMK_ACTION_NOTIFY
No relation (compare with equality rather than bit set)
void pcmk__output_actions(pcmk_scheduler_t *scheduler)