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);
189 && (
action->uuid != NULL)) {
190 char *uuid = action_uuid_for_ordering(
action->uuid, rsc);
194 crm_warn(
"Not remapping %s to %s because %s does not have " 195 "remapped action",
action->uuid, uuid, rsc->
id);
222 static inline uint32_t
246 uint32_t first_flags, uint32_t then_flags,
270 "%s then %s: mapped " 271 "pcmk__ar_first_implies_same_node_then to " 272 "pcmk__ar_first_implies_then on %s",
273 first->
uuid, then->
uuid, pcmk__node_name(node));
277 if (then->
rsc != NULL) {
278 changed |= update(then->
rsc, first, then, node,
288 "%s then %s: %s after pcmk__ar_first_implies_then",
290 (changed?
"changed" :
"unchanged"));
294 && (then->
rsc != NULL)) {
298 changed |= update(then->
rsc, first, then, node, first_flags, restart,
301 "%s then %s: %s after pcmk__ar_intermediate_stop",
303 (changed?
"changed" :
"unchanged"));
307 if (first->
rsc != NULL) {
308 changed |= update(first->
rsc, first, then, node, first_flags,
317 "%s then %s: %s after pcmk__ar_then_implies_first",
319 (changed?
"changed" :
"unchanged"));
323 if (then->
rsc != NULL) {
324 changed |= update(then->
rsc, first, then, node,
330 "%s then %s: %s after " 331 "pcmk__ar_promoted_then_implies_first",
333 (changed?
"changed" :
"unchanged"));
337 if (then->
rsc != NULL) {
338 changed |= update(then->
rsc, first, then, node, first_flags,
358 (changed?
"changed" :
"unchanged"));
362 && (then->
rsc != NULL)) {
365 && (first->
rsc != NULL)
369 "%s then %s: ignoring because first is stopping",
373 changed |= update(then->
rsc, first, then, node, first_flags,
378 "%s then %s: %s after pcmk__ar_nested_remote_probe",
380 (changed?
"changed" :
"unchanged"));
384 if (then->
rsc != NULL) {
385 changed |= update(then->
rsc, first, then, node, first_flags,
396 "%s then %s: %s after pcmk__ar_unrunnable_first_blocks",
398 (changed?
"changed" :
"unchanged"));
402 if (then->
rsc != NULL) {
403 changed |= update(then->
rsc, first, then, node, first_flags,
408 "%s then %s: %s after " 409 "pcmk__ar_unmigratable_then_blocks",
411 (changed?
"changed" :
"unchanged"));
415 if (then->
rsc != NULL) {
416 changed |= update(then->
rsc, first, then, node, first_flags,
421 "%s then %s: %s after pcmk__ar_first_else_then",
423 (changed?
"changed" :
"unchanged"));
427 if (then->
rsc != NULL) {
428 changed |= update(then->
rsc, first, then, node, first_flags,
434 (changed?
"changed" :
"unchanged"));
438 if (then->
rsc != NULL) {
439 changed |= update(then->
rsc, first, then, node, first_flags,
445 (changed?
"changed" :
"unchanged"));
470 && (first->
rsc != NULL)
481 "%s then %s: %s after checking whether first " 482 "is blocked, unmanaged, unrunnable stop",
484 (changed?
"changed" :
"unchanged"));
492 #define action_type_str(flags) \ 493 (pcmk_is_set((flags), pcmk__action_pseudo)? "pseudo-action" : "action") 495 #define action_optional_str(flags) \ 496 (pcmk_is_set((flags), pcmk__action_optional)? "optional" : "required") 498 #define action_runnable_str(flags) \ 499 (pcmk_is_set((flags), pcmk__action_runnable)? "runnable" : "unrunnable") 501 #define action_node_str(a) \ 502 (((a)->node == NULL)? "no node" : (a)->node->priv->name) 517 int last_flags = then->
flags;
548 if ((first->
rsc != NULL)
549 && 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)
769 const char *reason = NULL;
771 pcmk__assert(is_primitive_action(first) && is_primitive_action(then));
787 && (first->
rsc == then->
rsc)) {
791 if (reason == NULL) {
845 uint32_t filter, uint32_t
type,
849 uint32_t then_flags = 0U;
850 uint32_t first_flags = 0U;
854 then_flags = then->
flags;
855 first_flags = first->
flags;
857 handle_asymmetric_ordering(first, then);
877 && (then->
rsc != NULL)
930 handle_restart_ordering(first, then, filter);
933 if (then_flags != then->
flags) {
936 "%s on %s: flags are now %#.6x (was %#.6x) " 937 "because of 'first' %s (%#.6x)",
938 then->
uuid, pcmk__node_name(then->
node),
947 if (first_flags != first->
flags) {
950 "%s on %s: flags are now %#.6x (was %#.6x) " 951 "because of 'then' %s (%#.6x)",
952 first->
uuid, pcmk__node_name(first->
node),
971 const char *node_uname = NULL;
972 const char *node_uuid = NULL;
973 const char *desc = NULL;
978 if (
action->node != NULL) {
979 node_uname =
action->node->priv->name;
980 node_uuid =
action->node->priv->id;
982 node_uname =
"<none>";
994 desc =
"!!Non-Startable!! ";
996 desc =
"(Provisional) ";
998 crm_trace(
"%s%s%sAction %d: %s%s%s%s%s%s",
999 ((pre_text == NULL)?
"" : pre_text),
1000 ((pre_text == NULL)?
"" :
": "),
1002 (node_uname?
"\ton " :
""), (node_uname? node_uname :
""),
1003 (node_uuid?
"\t\t(" :
""), (node_uuid? node_uuid :
""),
1004 (node_uuid?
")" :
""));
1012 desc =
"!!Non-Startable!! ";
1014 desc =
"(Provisional) ";
1016 crm_trace(
"%s%s%sAction %d: %s %s%s%s%s%s%s",
1017 ((pre_text == NULL)?
"" : pre_text),
1018 ((pre_text == NULL)?
"" :
": "),
1021 (node_uname?
"\ton " :
""), (node_uname? node_uname :
""),
1022 (node_uuid?
"\t\t(" :
""), (node_uuid? node_uuid :
""),
1023 (node_uuid?
")" :
""));
1028 const GList *iter = NULL;
1031 crm_trace(
"\t\t====== Preceding Actions");
1032 for (iter =
action->actions_before; iter != NULL; iter = iter->next) {
1036 crm_trace(
"\t\t====== Subsequent Actions");
1037 for (iter =
action->actions_after; iter != NULL; iter = iter->next) {
1045 g_list_length(
action->actions_before),
1046 g_list_length(
action->actions_after));
1061 char *shutdown_id = NULL;
1091 char *digest = NULL;
1092 xmlNode *args_xml = NULL;
1094 if (op->
params == NULL) {
1106 #define FAKE_TE_ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" 1123 const char *caller_version,
int target_rc,
1124 const char *node,
const char *origin)
1129 char *op_id_additional = NULL;
1130 char *local_user_data = NULL;
1131 const char *exit_reason = NULL;
1133 xmlNode *xml_op = NULL;
1134 const char *task = NULL;
1137 crm_trace(
"Creating history XML for %s-interval %s action for %s on %s " 1138 "(DC version: %s, origin: %s)",
1140 ((node == NULL)?
"no node" : node), caller_version, origin);
1185 op_id = strdup(key);
1198 op_id = strdup(key);
1207 if (xml_op == NULL) {
1220 if (magic == NULL) {
1244 "last=%lld change=%lld exec=%u queue=%u",
1255 (
long long) op->
t_run);
1275 add_op_digest_to_xml(op, xml_op);
1277 if (op_id_additional) {
1279 op_id = op_id_additional;
1280 op_id_additional = NULL;
1284 if (local_user_data) {
1285 free(local_user_data);
1313 || !pcmk__same_node(
action->node,
action->rsc->priv->lock_node)) {
1320 if (
action->node->details->shutdown && (
action->task != NULL)
1330 sort_action_id(gconstpointer a, gconstpointer b)
1363 action->actions_before = g_list_sort(
action->actions_before,
1365 for (item =
action->actions_before; item != NULL; item = next) {
1369 if ((last_input != NULL)
1371 crm_trace(
"Input %s (%d) duplicate skipped for action %s (%d)",
1380 if (
input->graphed) {
1385 action->actions_before = g_list_delete_link(
action->actions_before,
1389 input->graphed =
false;
1407 iter != NULL; iter = iter->next) {
1409 char *node_name = NULL;
1413 if (
action->rsc != NULL) {
1422 task = strdup(
"Shutdown");
1426 const char *op = g_hash_table_lookup(
action->meta,
1435 if (pcmk__is_guest_or_bundle_node(
action->node)) {
1439 pcmk__node_name(
action->node),
1441 }
else if (
action->node != NULL) {
1445 out->
message(out,
"node-action", task, node_name,
action->reason);
1453 iter != NULL; iter = iter->next) {
1471 task_for_digest(
const char *task, guint interval_ms)
1476 if ((interval_ms == 0)
1502 only_sanitized_changed(
const xmlNode *xml_op,
1506 const char *digest_secure = NULL;
1530 force_restart(
pcmk_resource_t *rsc,
const char *task, guint interval_ms,
1550 schedule_reload(gpointer
data, gpointer user_data)
1559 g_list_foreach(rsc->
priv->
children, schedule_reload, user_data);
1571 (node == NULL)?
"inactive" : node->
priv->
name);
1580 "%s: preventing agent reload because start pending",
1618 const xmlNode *xml_op)
1620 guint interval_ms = 0;
1621 const char *task = NULL;
1624 CRM_CHECK((rsc != NULL) && (node != NULL) && (xml_op != NULL),
1633 if (interval_ms > 0) {
1636 "%s-interval %s for %s on %s is in configuration",
1638 pcmk__node_name(node));
1643 task, interval_ms, node,
"orphan");
1648 pcmk__node_name(node));
1653 crm_trace(
"Checking %s-interval %s for %s on %s for configuration changes",
1655 pcmk__node_name(node));
1656 task = task_for_digest(task, interval_ms);
1660 if (only_sanitized_changed(xml_op, digest_data, rsc->
priv->
scheduler)) {
1665 "Only 'private' parameters to %s-interval %s for %s " 1666 "on %s changed: %s",
1668 pcmk__node_name(node),
1674 switch (digest_data->
rc) {
1677 force_restart(rsc, task, interval_ms, node);
1684 if (interval_ms > 0) {
1696 "Device parameters changed (reload)", NULL,
1699 schedule_reload((gpointer) rsc, (gpointer) node);
1704 "because agent doesn't support reload",
1708 force_restart(rsc, task, interval_ms, node);
1727 rsc_history_as_list(
const xmlNode *rsc_entry,
int *start_index,
int *stop_index)
1735 ops = g_list_prepend(ops, rsc_op);
1762 int start_index = 0;
1763 GList *sorted_op_list = NULL;
1768 "Skipping configuration check " 1769 "for orphaned clone instance %s",
1773 "Skipping configuration check and scheduling " 1774 "clean-up for orphaned resource %s", rsc->
id);
1781 node->
priv->
id) == NULL) {
1786 "Skipping configuration check for %s " 1787 "because no longer active on %s",
1788 rsc->
id, pcmk__node_name(node));
1792 pcmk__rsc_trace(rsc,
"Checking for configuration changes for %s on %s",
1793 rsc->
id, pcmk__node_name(node));
1799 sorted_op_list = rsc_history_as_list(rsc_entry, &start_index, &stop_index);
1800 if (start_index < stop_index) {
1804 for (GList *iter = sorted_op_list; iter != NULL; iter = iter->next) {
1805 xmlNode *rsc_op = (xmlNode *) iter->data;
1806 const char *task = NULL;
1807 guint interval_ms = 0;
1809 if (++offset < start_index) {
1817 if ((interval_ms > 0)
1823 task, interval_ms, node,
"maintenance mode");
1825 }
else if ((interval_ms > 0)
1853 g_list_free(sorted_op_list);
1870 process_node_history(
pcmk_node_t *node,
const xmlNode *lrm_rscs)
1872 crm_trace(
"Processing node history for %s", pcmk__node_name(node));
1879 if (rsc_entry->children != NULL) {
1883 for (GList *iter =
result; iter != NULL; iter = iter->next) {
1886 if (pcmk__is_primitive(rsc)) {
1887 process_rsc_history(rsc_entry, rsc, node);
1896 #define XPATH_NODE_HISTORY "/" PCMK_XE_CIB "/" PCMK_XE_STATUS \ 1897 "/" PCMK__XE_NODE_STATE \ 1898 "[@" PCMK_XA_UNAME "='%s']" \ 1899 "/" PCMK__XE_LRM "/" PCMK__XE_LRM_RESOURCES 1916 crm_trace(
"Check resource and action configuration for changes");
1922 for (GList *iter =
scheduler->
nodes; iter != NULL; iter = iter->next) {
1933 xmlNode *history = NULL;
1939 process_node_history(node, history);
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)
xmlNode * pcmk__xe_first_child(const xmlNode *parent, const char *node_name, const char *attr_n, const char *attr_v)
'then' is runnable (and migratable) only if 'first' is runnable
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)
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)
User-configured asymmetric ordering.
void hash2field(gpointer key, gpointer value, gpointer user_data)
Set XML attribute based on hash table entry.
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)
enum pcmk_ipc_server type
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)
If 'first' is unrunnable, 'then' becomes a real, unmigratable action.
#define pcmk__set_rsc_flags(resource, flags_to_set)
#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)
pcmk__scheduler_private_t * priv
void pe_action_set_reason(pcmk_action_t *action, const char *reason, bool overwrite)
#define PCMK_XE_PARAMETERS
#define PCMK_ACTION_MIGRATE_TO
pcmk_node_t *(* location)(const pcmk_resource_t *rsc, GList **list, uint32_t target)
#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.
#define PCMK__META_ON_NODE
const pcmk__rsc_methods_t * fns
#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)
void(* output_actions)(pcmk_resource_t *rsc)
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)
xmlNode * pcmk__xe_create(xmlNode *parent, const char *name)
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__META_MIGRATE_TARGET
void pcmk__xml_free(xmlNode *xml)
const char * crm_xml_add(xmlNode *node, const char *name, const char *value)
Create an XML attribute with specified name and value.
#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)
pcmk__node_private_t * priv
#define PCMK__XE_LRM_RESOURCE
#define PCMK__XA_TRANSITION_KEY
#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...)
pcmk_scheduler_t * scheduler
Actions are ordered (optionally, if no other flags are set)
#define pcmk__clear_action_flags(action, flags_to_clear)
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)
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)
enum pcmk__rsc_variant variant
const char * crm_element_value(const xmlNode *data, const char *name)
Retrieve the value of an XML attribute.
#define PCMK__XA_OP_DIGEST
#define crm_trace(fmt, args...)
void pcmk__update_action_for_orderings(pcmk_action_t *then, pcmk_scheduler_t *scheduler)
#define pcmk_is_set(g, f)
Convenience alias for pcmk_all_flags_set(), to check single flag.
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
pcmk__resource_private_t * priv
enum rsc_role_e(* state)(const pcmk_resource_t *rsc, gboolean current)
Action completed, result is known.
#define PCMK_ACTION_STONITH
#define pcmk__clear_rsc_flags(resource, flags_to_clear)
#define pcmk__clear_updated_flags(au_flags, action, flags_to_clear)
pcmk_scheduler_t * scheduler
char * pcmk__op_key(const char *rsc_id, const char *op_type, guint interval_ms)
Generate an operation key (RESOURCE_ACTION_INTERVAL)
bool pcmk__str_any_of(const char *s,...) G_GNUC_NULL_TERMINATED
#define pcmk__str_copy(str)
gboolean order_actions(pcmk_action_t *first, pcmk_action_t *then, uint32_t flags)
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)
xmlNode * pcmk__xe_next(const xmlNode *node, const char *element_name)
#define pcmk__assert(expr)
#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)
int required_runnable_before
#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)
enum pcmk__action_type pcmk__parse_action(const char *action_name)
enum rsc_role_e orig_role
#define PCMK__META_OP_NO_WAIT
pcmk_resource_t * launcher
#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.
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
char * pcmk__digest_operation(xmlNode *input)
const char * pcmk__action_text(enum pcmk__action_type action)
#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)
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__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)
struct pcmk__node_details * details
const char * crm_meta_value(GHashTable *hash, const char *field)
Get the value of a meta-attribute.
#define PCMK_XA_CRM_DEBUG_ORIGIN
'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)
const pcmk__assignment_methods_t * cmds
enum pcmk__digest_result rc
#define PCMK_ACTION_NOTIFY
No relation (compare with equality rather than bit set)
char * crm_strdup_printf(char const *format,...) G_GNUC_PRINTF(1
void pcmk__output_actions(pcmk_scheduler_t *scheduler)
const char * crm_xml_add_int(xmlNode *node, const char *name, int value)
Create an XML attribute with specified name and integer value.