34 #define set_config_flag(data_set, option, flag) do { \ 35 const char *scf_value = pe_pref((data_set)->config_hash, (option)); \ 36 if (scf_value != NULL) { \ 37 if (crm_is_true(scf_value)) { \ 38 (data_set)->flags = pcmk__set_flags_as(__func__, __LINE__, \ 39 LOG_TRACE, "Working set", \ 40 crm_system_name, (data_set)->flags, \ 43 (data_set)->flags = pcmk__clear_flags_as(__func__, __LINE__,\ 44 LOG_TRACE, "Working set", \ 45 crm_system_name, (data_set)->flags, \ 52 xmlNode **last_failure,
57 static void add_node_attrs(xmlNode *attrs,
pe_node_t *node,
bool overwrite,
59 static void determine_online_status(xmlNode *node_state,
pe_node_t *this_node,
62 static void unpack_node_lrm(
pe_node_t *node, xmlNode *xml,
96 const char *reason,
bool priority_delay)
107 "(otherwise would because %s): " 108 "its guest resource %s is unmanaged",
111 crm_warn(
"Guest node %s will be fenced " 112 "(by recovering its guest resource %s): %s",
124 }
else if (is_dangling_guest_node(node)) {
125 crm_info(
"Cleaning up dangling connection for guest node %s: " 126 "fencing was already done because %s, " 127 "and guest resource no longer exists",
137 "(otherwise would because %s): connection is unmanaged",
151 crm_trace(
"Cluster node %s %s because %s",
169 #define XPATH_UNFENCING_NVPAIR XML_CIB_TAG_NVPAIR \ 170 "[(@" XML_NVPAIR_ATTR_NAME "='" PCMK_STONITH_PROVIDES "'" \ 171 "or @" XML_NVPAIR_ATTR_NAME "='" XML_RSC_ATTR_REQUIRES "') " \ 172 "and @" XML_NVPAIR_ATTR_VALUE "='unfencing']" 175 #define XPATH_ENABLE_UNFENCING \ 176 "/" XML_TAG_CIB "/" XML_CIB_TAG_CONFIGURATION "/" XML_CIB_TAG_RESOURCES \ 177 "//" XML_TAG_META_SETS "/" XPATH_UNFENCING_NVPAIR \ 178 "|/" XML_TAG_CIB "/" XML_CIB_TAG_CONFIGURATION "/" XML_CIB_TAG_RSCCONFIG \ 179 "/" XML_TAG_META_SETS "/" XPATH_UNFENCING_NVPAIR 184 xmlXPathObjectPtr
result = NULL;
198 const char *value = NULL;
219 crm_info(
"Startup probes: disabled (dangerous)");
224 crm_info(
"Watchdog-based self-fencing will be performed via SBD if " 225 "fencing is required and stonith-watchdog-timeout is nonzero");
239 crm_debug(
"STONITH of failed nodes is %s",
245 "Support for stonith-action of 'poweroff' is deprecated " 246 "and will be removed in a future release (use 'off' instead)");
263 crm_debug(
"Stop all active resources: %s",
268 crm_debug(
"Cluster is symmetric" " - resources can run anywhere by default");
291 crm_notice(
"Resetting no-quorum-policy to 'stop': cluster has never had quorum");
296 "fencing is disabled");
306 crm_debug(
"On loss of quorum: Freeze resources");
309 crm_debug(
"On loss of quorum: Stop ALL resources");
313 "Demote promotable resources and stop other resources");
316 crm_notice(
"On loss of quorum: Fence all remaining nodes");
328 crm_trace(
"Orphan resource actions are %s",
335 #ifndef PCMK__COMPAT_2_0 337 "Support for the remove-after-stop cluster property is" 338 " deprecated and will be removed in a future release");
357 crm_trace(
"Unseen nodes will be fenced");
368 crm_trace(
"Resources will%s be locked to cleanly shut down nodes",
391 if (new_node == NULL) {
396 new_node->
fixed = FALSE;
399 if (new_node->
details == NULL) {
429 "Support for nodes of type 'ping' (such as %s) is " 430 "deprecated and will be removed in a future release",
456 xmlNode *attr_set = NULL;
457 xmlNode *attr = NULL;
459 const char *container_id =
ID(xml_obj);
460 const char *remote_name = NULL;
461 const char *remote_server = NULL;
462 const char *remote_port = NULL;
463 const char *connect_timeout =
"60s";
464 const char *remote_allow_migrate=NULL;
465 const char *is_managed = NULL;
467 for (attr_set = pcmk__xe_first_child(xml_obj); attr_set != NULL;
468 attr_set = pcmk__xe_next(attr_set)) {
475 for (attr = pcmk__xe_first_child(attr_set); attr != NULL;
476 attr = pcmk__xe_next(attr)) {
483 remote_server = value;
487 connect_timeout = value;
489 remote_allow_migrate=value;
496 if (remote_name == NULL) {
505 remote_allow_migrate, is_managed,
506 connect_timeout, remote_server, remote_port);
538 xmlNode *xml_obj = NULL;
540 const char *
id = NULL;
541 const char *
uname = NULL;
542 const char *
type = NULL;
543 const char *score = NULL;
554 for (xml_obj = pcmk__xe_first_child(xml_nodes); xml_obj != NULL;
555 xml_obj = pcmk__xe_next(xml_obj)) {
568 "> entry in configuration without id");
573 if (new_node == NULL) {
583 handle_startup_fencing(
data_set, new_node);
585 add_node_attrs(xml_obj, new_node, FALSE,
data_set);
595 crm_info(
"Creating a fake local node");
606 const char *container_id = NULL;
621 pe_rsc_trace(rsc,
"Resource %s's container is %s", rsc->
id, container_id);
623 pe_err(
"Resource %s: Unknown resource container (%s)", rsc->
id, container_id);
631 xmlNode *xml_obj = NULL;
636 for (xml_obj = pcmk__xe_first_child(xml_resources); xml_obj != NULL;
637 xml_obj = pcmk__xe_next(xml_obj)) {
639 const char *new_node_id = NULL;
645 new_node_id =
ID(xml_obj);
649 crm_trace(
"Found remote node %s defined by resource %s",
650 new_node_id,
ID(xml_obj));
665 new_node_id = expand_remote_rsc_meta(xml_obj, xml_resources,
data_set);
667 crm_trace(
"Found guest node %s in resource %s",
668 new_node_id,
ID(xml_obj));
679 xmlNode *xml_obj2 = NULL;
680 for (xml_obj2 = pcmk__xe_first_child(xml_obj); xml_obj2 != NULL;
681 xml_obj2 = pcmk__xe_next(xml_obj2)) {
683 new_node_id = expand_remote_rsc_meta(xml_obj2, xml_resources,
data_set);
686 crm_trace(
"Found guest node %s in resource %s inside group %s",
687 new_node_id,
ID(xml_obj2),
ID(xml_obj));
722 pe_rsc_trace(new_rsc,
"Linking remote connection resource %s to node %s",
730 handle_startup_fencing(
data_set, remote_node);
737 strdup(
"container"));
742 destroy_tag(gpointer
data)
748 g_list_free_full(tag->
refs, free);
768 xmlNode *xml_obj = NULL;
773 for (xml_obj = pcmk__xe_first_child(xml_resources); xml_obj != NULL;
774 xml_obj = pcmk__xe_next(xml_obj)) {
779 const char *template_id =
ID(xml_obj);
782 template_id, NULL, NULL) == FALSE) {
789 crm_trace(
"Beginning unpack... <%s id=%s... >", crm_element_name(xml_obj),
ID(xml_obj));
796 "because configuration is invalid",
797 crm_element_name(xml_obj),
crm_str(
ID(xml_obj)));
798 if (new_rsc != NULL && new_rsc->
fns != NULL) {
818 pcmk__config_err(
"Resource start-up disabled since no STONITH resources have been defined");
819 pcmk__config_err(
"Either configure some or disable STONITH with the stonith-enabled option");
820 pcmk__config_err(
"NOTE: Clusters with shared data need STONITH to ensure data integrity");
829 xmlNode *xml_tag = NULL;
833 for (xml_tag = pcmk__xe_first_child(xml_tags); xml_tag != NULL;
834 xml_tag = pcmk__xe_next(xml_tag)) {
836 xmlNode *xml_obj_ref = NULL;
837 const char *tag_id =
ID(xml_tag);
843 if (tag_id == NULL) {
845 crm_element_name(xml_tag));
849 for (xml_obj_ref = pcmk__xe_first_child(xml_tag); xml_obj_ref != NULL;
850 xml_obj_ref = pcmk__xe_next(xml_obj_ref)) {
852 const char *obj_ref =
ID(xml_obj_ref);
858 if (obj_ref == NULL) {
860 crm_element_name(xml_obj_ref), tag_id);
878 const char *ticket_id = NULL;
879 const char *granted = NULL;
880 const char *last_granted = NULL;
881 const char *standby = NULL;
882 xmlAttrPtr xIter = NULL;
886 ticket_id =
ID(xml_ticket);
887 if (pcmk__str_empty(ticket_id)) {
891 crm_trace(
"Processing ticket state for %s", ticket_id);
894 if (ticket == NULL) {
896 if (ticket == NULL) {
901 for (xIter = xml_ticket->properties; xIter; xIter = xIter->next) {
902 const char *prop_name = (
const char *)xIter->name;
908 g_hash_table_replace(ticket->
state, strdup(prop_name), strdup(prop_value));
911 granted = g_hash_table_lookup(ticket->
state,
"granted");
917 crm_info(
"We do not have ticket '%s'", ticket->
id);
920 last_granted = g_hash_table_lookup(ticket->
state,
"last-granted");
922 long long last_granted_ll;
928 standby = g_hash_table_lookup(ticket->
state,
"standby");
932 crm_info(
"Granted ticket '%s' is in standby-mode", ticket->
id);
938 crm_trace(
"Done with ticket state for %s", ticket_id);
946 xmlNode *xml_obj = NULL;
948 for (xml_obj = pcmk__xe_first_child(xml_tickets); xml_obj != NULL;
949 xml_obj = pcmk__xe_next(xml_obj)) {
954 unpack_ticket_state(xml_obj,
data_set);
963 const char *resource_discovery_enabled = NULL;
964 xmlNode *attrs = NULL;
985 add_node_attrs(attrs, this_node, TRUE,
data_set);
1004 if (resource_discovery_enabled && !
crm_is_true(resource_discovery_enabled)) {
1007 crm_warn(
"Ignoring %s attribute on remote node %s because stonith is disabled",
1030 unpack_transient_attributes(xmlNode *state,
pe_node_t *node,
1033 const char *discovery = NULL;
1036 add_node_attrs(attrs, node, TRUE,
data_set);
1049 if ((discovery != NULL) && !
crm_is_true(discovery)) {
1050 crm_warn(
"Ignoring %s attribute for node %s because disabling " 1051 "resource discovery is not allowed for cluster nodes",
1071 const char *
id = NULL;
1072 const char *
uname = NULL;
1083 if (
uname == NULL) {
1090 if (this_node == NULL) {
1092 "it is no longer in the configuration",
uname);
1107 unpack_transient_attributes(state, this_node,
data_set);
1115 crm_trace(
"Determining online status of cluster node %s (id %s)",
1117 determine_online_status(state, this_node,
data_set);
1157 const char *
id =
ID(state);
1161 if ((
id == NULL) || (
uname == NULL)) {
1163 crm_trace(
"Not unpacking resource history from malformed " 1169 if (this_node == NULL) {
1171 crm_trace(
"Not unpacking resource history for node %s because " 1172 "no longer in configuration",
id);
1177 crm_trace(
"Not unpacking resource history for node %s because " 1178 "already unpacked",
id);
1194 crm_trace(
"Not unpacking resource history for guest node %s " 1195 "because container and connection are not known to " 1211 crm_trace(
"Not unpacking resource history for remote node %s " 1212 "because connection is not known to be up",
id);
1224 crm_trace(
"Not unpacking resource history for offline " 1225 "cluster node %s",
id);
1230 determine_remote_online_status(
data_set, this_node);
1231 unpack_handle_remote_attrs(this_node, state,
data_set);
1234 crm_trace(
"Unpacking resource history for %snode %s",
1235 (fence?
"unseen " :
""),
id);
1238 unpack_node_lrm(this_node, state,
data_set);
1251 xmlNode *state = NULL;
1259 for (state = pcmk__xe_first_child(status); state != NULL;
1260 state = pcmk__xe_next(state)) {
1263 unpack_tickets_state((xmlNode *) state,
data_set);
1266 unpack_node_state(state,
data_set);
1270 while (unpack_node_history(status, FALSE,
data_set) == EAGAIN) {
1271 crm_trace(
"Another pass through node resource histories is needed");
1275 unpack_node_history(status,
1285 pe_node_t *node = pe__current_node(container);
1299 for (GList *gIter =
data_set->
nodes; gIter != NULL; gIter = gIter->next) {
1311 determine_remote_online_status(
data_set, this_node);
1322 gboolean online = FALSE;
1335 crm_debug(
"Node is not ready to run resources: %s", join);
1340 crm_trace(
"\tis_peer=%s, join=%s, expected=%s",
1346 crm_info(
"\tin_cluster=%s, is_peer=%s, join=%s, expected=%s",
1356 gboolean online = FALSE;
1357 gboolean do_terminate = FALSE;
1358 bool crmd_online = FALSE;
1373 do_terminate = TRUE;
1375 }
else if (terminate != NULL && strlen(terminate) > 0) {
1377 char t = terminate[0];
1379 if (t !=
'0' && isdigit(t)) {
1380 do_terminate = TRUE;
1384 crm_trace(
"%s: in_cluster=%s, is_peer=%s, join=%s, expected=%s, term=%d",
1390 if (exp_state == NULL) {
1398 online = crmd_online;
1400 }
else if (in_cluster == NULL) {
1405 "peer failed Pacemaker membership criteria", FALSE);
1419 &&
crm_is_true(in_cluster) == FALSE && !crmd_online) {
1427 }
else if (!crmd_online) {
1431 }
else if (do_terminate) {
1444 crm_warn(
"%s: in-cluster=%s, is-peer=%s, join=%s, expected=%s, term=%d, shutdown=%d",
1465 goto remote_online_done;
1470 if (container && pcmk__list_of_1(rsc->
running_on)) {
1476 crm_trace(
"%s node %s presumed ONLINE because connection resource is started",
1477 (container?
"Guest" :
"Remote"), this_node->
details->
id);
1483 crm_trace(
"%s node %s shutting down because connection resource is stopping",
1484 (container?
"Guest" :
"Remote"), this_node->
details->
id);
1490 crm_trace(
"Guest node %s UNCLEAN because guest resource failed",
1496 crm_trace(
"%s node %s OFFLINE because connection resource failed",
1497 (container?
"Guest" :
"Remote"), this_node->
details->
id);
1503 crm_trace(
"%s node %s OFFLINE because its resource is stopped",
1504 (container?
"Guest" :
"Remote"), this_node->
details->
id);
1508 }
else if (
host && (
host->details->online == FALSE)
1509 &&
host->details->unclean) {
1510 crm_trace(
"Guest node %s UNCLEAN because host is unclean",
1524 gboolean online = FALSE;
1547 online = determine_online_status_no_fencing(
data_set, node_state, this_node);
1550 online = determine_online_status_fencing(
data_set, node_state, this_node);
1558 this_node->
fixed = TRUE;
1564 this_node->
fixed = TRUE;
1597 if (!pcmk__str_empty(
id)) {
1598 const char *end =
id + strlen(
id) - 1;
1600 for (
const char *s = end; s >
id; --s) {
1614 return (s == end)? s : (s - 1);
1638 char *basename = NULL;
1641 basename =
strndup(last_rsc_id, end - last_rsc_id + 1);
1660 size_t base_name_len = end - last_rsc_id + 1;
1664 zero = calloc(base_name_len + 3,
sizeof(
char));
1666 memcpy(zero, last_rsc_id, base_name_len);
1667 zero[base_name_len] =
':';
1668 zero[base_name_len + 1] =
'0';
1689 crm_debug(
"Detected orphaned remote node %s", rsc_id);
1694 link_rsc2remotenode(
data_set, rsc);
1697 crm_trace(
"Setting node %s as shutting down due to orphaned connection resource", rsc_id);
1704 crm_trace(
"Detected orphaned container filler %s", rsc_id);
1748 GList *rIter = NULL;
1751 gboolean skip_inactive = FALSE;
1759 for (rIter =
parent->children; rsc == NULL && rIter; rIter = rIter->next) {
1760 GList *locations = NULL;
1804 crm_notice(
"Active (now-)anonymous clone %s has " 1805 "multiple (orphan) instance histories on %s",
1807 skip_inactive = TRUE;
1814 g_list_free(locations);
1818 if (!skip_inactive && !inactive_instance
1821 inactive_instance =
parent->fns->find_rsc(child, rsc_id, NULL,
1827 if (inactive_instance && inactive_instance->
pending_node 1829 inactive_instance = NULL;
1835 if ((rsc == NULL) && !skip_inactive && (inactive_instance != NULL)) {
1837 rsc = inactive_instance;
1869 xmlNode * rsc_entry)
1890 crm_trace(
"%s is not known as %s either (orphan)",
1896 crm_trace(
"Resource history for %s is orphaned because it is no longer primitive",
1904 if (pe_rsc_is_anon_clone(
parent)) {
1906 if (pe_rsc_is_bundled(
parent)) {
1921 pe_rsc_debug(rsc,
"Internally renamed %s on %s to %s%s",
1935 rsc = create_fake_resource(rsc_id, rsc_entry,
data_set);
1957 char *reason = NULL;
1961 pe_rsc_trace(rsc,
"Resource %s is %s on %s: on_fail=%s",
1974 ((rsc->
clone_name == NULL)?
"" :
" also known as "),
1992 gboolean should_fence = FALSE;
2003 should_fence = TRUE;
2017 " revoked if remote connection can " 2018 "be re-established elsewhere)",
2021 should_fence = TRUE;
2025 if (reason == NULL) {
2034 save_on_fail = on_fail;
2095 if (rsc->
container && pe_rsc_is_bundled(rsc)) {
2125 "remote connection is unrecoverable", FALSE);
2160 "%s because cluster is configured not to " 2161 "stop active orphans",
2190 GList *gIter = possible_matches;
2192 for (; gIter != NULL; gIter = gIter->next) {
2198 g_list_free(possible_matches);
2205 int start_index,
int stop_index,
2209 const char *task = NULL;
2210 const char *status = NULL;
2211 GList *gIter = sorted_op_list;
2214 pe_rsc_trace(rsc,
"%s: Start index %d, stop index = %d", rsc->
id, start_index, stop_index);
2216 for (; gIter != NULL; gIter = gIter->next) {
2217 xmlNode *rsc_op = (xmlNode *) gIter->data;
2219 guint interval_ms = 0;
2221 const char *
id =
ID(rsc_op);
2230 }
else if (start_index < stop_index && counter <= stop_index) {
2234 }
else if (counter < start_index) {
2240 if (interval_ms == 0) {
2262 int implied_monitor_start = -1;
2263 int implied_clone_start = -1;
2264 const char *task = NULL;
2265 const char *status = NULL;
2266 GList *gIter = sorted_op_list;
2271 for (; gIter != NULL; gIter = gIter->next) {
2272 xmlNode *rsc_op = (xmlNode *) gIter->data;
2281 *stop_index = counter;
2284 *start_index = counter;
2290 implied_monitor_start = counter;
2293 implied_clone_start = counter;
2297 if (*start_index == -1) {
2298 if (implied_clone_start != -1) {
2299 *start_index = implied_clone_start;
2300 }
else if (implied_monitor_start != -1) {
2301 *start_index = implied_monitor_start;
2311 time_t lock_time = 0;
2314 &lock_time) ==
pcmk_ok) && (lock_time != 0)) {
2319 pe_rsc_info(rsc,
"Shutdown lock for %s on %s expired",
2340 unpack_lrm_resource(
pe_node_t *node, xmlNode *lrm_resource,
2343 GList *gIter = NULL;
2344 int stop_index = -1;
2345 int start_index = -1;
2348 const char *task = NULL;
2349 const char *rsc_id =
ID(lrm_resource);
2352 GList *op_list = NULL;
2353 GList *sorted_op_list = NULL;
2355 xmlNode *migrate_op = NULL;
2356 xmlNode *rsc_op = NULL;
2357 xmlNode *last_failure = NULL;
2362 if (rsc_id == NULL) {
2364 " entry without id");
2374 op_list = g_list_prepend(op_list, rsc_op);
2378 if (op_list == NULL) {
2385 rsc = unpack_find_resource(
data_set, node, rsc_id, lrm_resource);
2387 if (op_list == NULL) {
2391 rsc = process_orphan_resource(lrm_resource, node,
data_set);
2398 unpack_shutdown_lock(lrm_resource, rsc, node,
data_set);
2402 saved_role = rsc->
role;
2406 for (gIter = sorted_op_list; gIter != NULL; gIter = gIter->next) {
2407 xmlNode *rsc_op = (xmlNode *) gIter->data;
2411 migrate_op = rsc_op;
2414 unpack_rsc_op(rsc, node, rsc_op, &last_failure, &on_fail,
data_set);
2419 process_recurring(node, rsc, start_index, stop_index, sorted_op_list,
data_set);
2422 g_list_free(sorted_op_list);
2424 process_rsc_state(rsc, node, on_fail, migrate_op,
data_set);
2431 pe_rsc_info(rsc,
"%s: Not overwriting calculated next role %s" 2432 " with requested next role %s",
2437 if (saved_role > rsc->
role) {
2438 rsc->
role = saved_role;
2447 xmlNode *rsc_entry = NULL;
2448 for (rsc_entry = pcmk__xe_first_child(lrm_rsc_list); rsc_entry != NULL;
2449 rsc_entry = pcmk__xe_next(rsc_entry)) {
2454 const char *container_id;
2462 if (container_id == NULL || rsc_id == NULL) {
2467 if (container == NULL) {
2478 pe_rsc_trace(rsc,
"Mapped container of orphaned resource %s to %s",
2479 rsc->
id, container_id);
2496 bool found_orphaned_container_filler =
false;
2516 found_orphaned_container_filler =
true;
2523 if (found_orphaned_container_filler) {
2524 handle_orphaned_container_fillers(xml,
data_set);
2541 set_node_score(gpointer key, gpointer value, gpointer user_data)
2544 int *score = user_data;
2549 #define STATUS_PATH_MAX 1024 2551 find_lrm_op(
const char *resource,
const char *op,
const char *node,
const char *source,
2556 xmlNode *xml = NULL;
2558 offset += snprintf(xpath + offset,
STATUS_PATH_MAX - offset,
"//node_state[@uname='%s']", node);
2583 if (xml && success_only) {
2597 pe__call_id(xmlNode *op_xml)
2630 return (stop_op && (pe__call_id(stop_op) > pe__call_id(xml_op)));
2655 int from_status = 0;
2658 xmlNode *migrate_from = NULL;
2665 if (stop_happened_after(rsc, node, xml_op,
data_set)) {
2681 pe_rsc_trace(rsc,
"%s op on %s exited with status=%d, rc=%d",
2682 ID(migrate_from),
target, from_status, from_rc);
2691 pe_rsc_trace(rsc,
"Detected dangling migration op: %s on %s",
ID(xml_op),
2729 newer_op(
pe_resource_t *rsc,
const char *action_name,
const char *node_name,
2732 xmlNode *
action = find_lrm_op(rsc->
id, action_name, node_name, NULL, TRUE,
2735 return pe__call_id(
action) > call_id;
2742 int target_stop_id = 0;
2743 int target_migrate_from_id = 0;
2744 xmlNode *target_stop = NULL;
2745 xmlNode *target_migrate_from = NULL;
2760 target_stop_id = pe__call_id(target_stop);
2765 target_migrate_from_id = pe__call_id(target_migrate_from);
2767 if ((target_stop == NULL) || (target_stop_id < target_migrate_from_id)) {
2775 target_stop_id, target_migrate_from_id);
2780 }
else if (target_migrate_from == NULL) {
2791 int source_migrate_to_id = pe__call_id(xml_op);
2811 xmlNode *source_stop = NULL;
2812 xmlNode *source_migrate_to = NULL;
2832 if ((source_stop == NULL)
2833 || (pe__call_id(source_stop) < pe__call_id(source_migrate_to))) {
2847 record_failed_op(xmlNode *op,
const pe_node_t *node,
2850 xmlNode *xIter = NULL;
2857 for (xIter =
data_set->
failed->children; xIter; xIter = xIter->next) {
2873 static const char *get_op_key(xmlNode *xml_op)
2883 last_change_str(xmlNode *xml_op)
2886 const char *when_s = NULL;
2893 when_s = strchr(when_s,
' ');
2899 return ((when_s && *when_s)? when_s :
"unknown time");
2989 return first - second;
2993 unpack_rsc_op_failure(
pe_resource_t * rsc,
pe_node_t * node,
int rc, xmlNode * xml_op, xmlNode ** last_failure,
2996 bool is_probe =
false;
2999 const char *key = get_op_key(xml_op);
3007 *last_failure = xml_op;
3011 if (exit_reason == NULL) {
3017 crm_trace(
"Unexpected result (%s%s%s) was recorded for " 3018 "%s of %s on %s at %s " CRM_XS " rc=%d id=%s",
3019 services_ocf_exitcode_str(rc),
3020 (*exit_reason?
": " :
""), exit_reason,
3022 last_change_str(xml_op), rc,
ID(xml_op));
3024 crm_warn(
"Unexpected result (%s%s%s) was recorded for " 3025 "%s of %s on %s at %s " CRM_XS " rc=%d id=%s",
3026 services_ocf_exitcode_str(rc),
3027 (*exit_reason?
": " :
""), exit_reason,
3029 last_change_str(xml_op), rc,
ID(xml_op));
3038 crm_notice(
"If it is not possible for %s to run on %s, see " 3039 "the resource-discovery option for location constraints",
3043 record_failed_op(xml_op, node, rsc,
data_set);
3047 if (cmp_on_fail(*on_fail,
action->on_fail) < 0) {
3050 *on_fail =
action->on_fail;
3057 unpack_migrate_to_failure(rsc, node, xml_op,
data_set);
3060 unpack_migrate_from_failure(rsc, node, xml_op,
data_set);
3069 "demote with on-fail=block");
3094 pe_rsc_trace(rsc,
"Resource %s: role=%s, unclean=%s, on_fail=%s, fail_role=%s",
3111 if (pe_rsc_is_clone(
parent)
3119 crm_notice(
"%s will not be started under current conditions",
3126 g_hash_table_foreach(fail_rsc->
allowed_nodes, set_node_score, &score);
3162 int target_rc,
int *rc,
int *status) {
3163 bool is_probe =
false;
3165 const char *key = get_op_key(xml_op);
3172 if (*rc != remapped_rc) {
3173 crm_trace(
"Remapping monitor result %d to %d", *rc, remapped_rc);
3175 record_failed_op(xml_op, node, rsc,
data_set);
3202 if (exit_reason == NULL) {
3212 if (target_rc < 0) {
3222 crm_warn(
"Expected result not found for %s on %s (corrupt or obsolete CIB?)",
3225 }
else if (target_rc != *rc) {
3227 pe_rsc_debug(rsc,
"%s on %s: expected %d (%s), got %d (%s%s%s)",
3229 target_rc, services_ocf_exitcode_str(target_rc),
3230 *rc, services_ocf_exitcode_str(*rc),
3231 (*exit_reason?
": " :
""), exit_reason);
3238 pe_rsc_info(rsc,
"Probe found %s active on %s at %s",
3240 last_change_str(xml_op));
3245 if (is_probe || (target_rc == *rc)
3258 if (is_probe && (*rc != target_rc)) {
3261 "Probe found %s active and promoted on %s at %s",
3263 last_change_str(xml_op));
3279 guint interval_ms = 0;
3282 if (interval_ms > 0) {
3295 pe_proc_err(
"No further recovery can be attempted for %s " 3296 "because %s on %s failed (%s%s%s) at %s " 3297 CRM_XS " rc=%d id=%s", rsc->
id, task,
3299 (*exit_reason?
": " :
""), exit_reason,
3300 last_change_str(xml_op), *rc,
ID(xml_op));
3309 crm_info(
"Treating unknown exit status %d from %s of %s " 3310 "on %s at %s as failure",
3312 last_change_str(xml_op));
3319 key, pcmk_exec_status_str(*status));
3324 should_clear_for_param_change(xmlNode *xml_op,
const char *task,
3328 if (!strcmp(task,
"start") || !strcmp(task,
"monitor")) {
3342 switch (digest_data->
rc) {
3344 crm_trace(
"Resource %s history entry %s on %s" 3345 " has no digest to compare",
3374 should_ignore_failure_timeout(
pe_resource_t *rsc, xmlNode *xml_op,
3375 const char *task, guint interval_ms,
3405 if (is_last_failure) {
3406 crm_info(
"Waiting to clear monitor failure for remote node %s" 3407 " until fencing has occurred", rsc->
id);
3441 bool expired = FALSE;
3443 time_t last_run = 0;
3444 guint interval_ms = 0;
3445 int unexpired_fail_count = 0;
3447 const char *clear_reason = NULL;
3458 time_t last_failure = 0;
3462 && !should_ignore_failure_timeout(rsc, xml_op, task, interval_ms,
3473 crm_trace(
"%s@%lld is %sexpired @%lld with unexpired_failures=%d timeout=%ds" 3474 " last-failure@%lld",
3475 ID(xml_op), (
long long) last_run, (expired?
"" :
"not "),
3477 (
long long) last_failure);
3479 if (unexpired_fail_count && (now < last_failure)) {
3489 if (unexpired_fail_count == 0) {
3491 clear_reason =
"it expired";
3507 clear_reason =
"reconnect interval is set";
3511 if (!expired && is_last_failure
3512 && should_clear_for_param_change(xml_op, task, rsc, node,
data_set)) {
3513 clear_reason =
"resource parameters have changed";
3516 if (clear_reason != NULL) {
3531 crm_info(
"Clearing %s failure will wait until any scheduled " 3532 "fencing of %s completes", task, rsc->
id);
3533 order_after_remote_fencing(clear_op, rsc,
data_set);
3578 update_resource_state(
pe_resource_t * rsc,
pe_node_t * node, xmlNode * xml_op,
const char * task,
int rc,
3581 gboolean clear_past_failure = FALSE;
3590 clear_past_failure = TRUE;
3594 const char *op_key = get_op_key(xml_op);
3595 const char *last_failure_key = get_op_key(last_failure);
3598 clear_past_failure = TRUE;
3608 clear_past_failure = TRUE;
3612 clear_past_failure = TRUE;
3616 clear_past_failure = TRUE;
3622 clear_past_failure = TRUE;
3628 clear_past_failure = TRUE;
3631 unpack_migrate_to_success(rsc, node, xml_op,
data_set);
3639 if (clear_past_failure) {
3645 pe_rsc_trace(rsc,
"%s.%s is not cleared by a completed stop",
3667 "clear past failures and reset remote");
3683 int old_target_rc = 0;
3685 guint interval_ms = 0;
3686 const char *task = NULL;
3687 const char *task_key = NULL;
3688 const char *exit_reason = NULL;
3689 bool expired =
false;
3692 bool maskable_probe_failure =
false;
3694 CRM_CHECK(rsc && node && xml_op,
return);
3697 task_key = get_op_key(xml_op);
3700 if (exit_reason == NULL) {
3723 pe_rsc_trace(rsc,
"Unpacking task %s/%s (call_id=%d, status=%d, rc=%d) on %s (role=%s)",
3727 pe_rsc_trace(rsc,
"Node %s (where %s is running) is unclean." 3728 " Further action depends on the value of the stop's on-fail attribute",
3745 && check_operation_expiry(rsc, node, rc, xml_op,
data_set)) {
3750 old_target_rc = target_rc;
3752 remap_operation(xml_op, rsc, node,
data_set, on_fail, target_rc,
3757 if (expired && maskable_probe_failure && old_rc != old_target_rc) {
3764 }
else if (expired && (rc != target_rc)) {
3767 if (interval_ms == 0) {
3768 crm_notice(
"Ignoring expired %s failure on %s " 3769 CRM_XS " actual=%d expected=%d magic=%s",
3784 crm_notice(
"Rescheduling %s after failure expired on %s " 3785 CRM_XS " actual=%d expected=%d magic=%s",
3792 if (maskable_probe_failure) {
3793 crm_notice(
"Treating probe result '%s' for %s on %s as 'not running'",
3794 services_ocf_exitcode_str(old_rc), rsc->
id, node->
details->
uname);
3795 update_resource_state(rsc, node, xml_op, task, target_rc, *last_failure,
3799 record_failed_op(xml_op, node, rsc,
data_set);
3807 pe_err(
"Resource history contains cancellation '%s' " 3808 "(%s of %s on %s at %s)",
3810 last_change_str(xml_op));
3852 last_change_str(xml_op),
ID(xml_op));
3853 update_resource_state(rsc, node, xml_op, task, rc, *last_failure, on_fail,
data_set);
3857 failure_strategy = get_action_on_fail(rsc, task_key, task,
data_set);
3859 crm_warn(
"Cannot ignore failed %s of %s on %s: " 3860 "Resource agent doesn't exist " 3861 CRM_XS " status=%d rc=%d id=%s",
3868 unpack_rsc_op_failure(rsc, node, rc, xml_op, last_failure, on_fail,
data_set);
3899 failure_strategy = get_action_on_fail(rsc, task_key, task,
data_set);
3904 crm_warn(
"Pretending failed %s (%s%s%s) of %s on %s at %s " 3905 "succeeded " CRM_XS " rc=%d id=%s",
3906 task, services_ocf_exitcode_str(rc),
3907 (*exit_reason?
": " :
""), exit_reason, rsc->
id,
3911 update_resource_state(rsc, node, xml_op, task, target_rc, *last_failure,
3916 record_failed_op(xml_op, node, rsc,
data_set);
3920 *on_fail = failure_strategy;
3924 unpack_rsc_op_failure(rsc, node, rc, xml_op, last_failure, on_fail,
3929 "Preventing %s from restarting on %s because " 3930 "of hard failure (%s%s%s)" CRM_XS " rc=%d id=%s",
3932 services_ocf_exitcode_str(rc),
3933 (*exit_reason?
": " :
""), exit_reason,
3938 crm_err(
"Preventing %s from restarting anywhere because " 3939 "of fatal failure (%s%s%s) " CRM_XS " rc=%d id=%s",
3940 parent->id, services_ocf_exitcode_str(rc),
3941 (*exit_reason?
": " :
""), exit_reason,
3948 pe_rsc_trace(rsc,
"Resource %s after %s: role=%s, next=%s",
3954 add_node_attrs(xmlNode *xml_obj,
pe_node_t *node,
bool overwrite,
3957 const char *cluster_name = NULL;
3986 strdup(cluster_name));
4000 }
else if (cluster_name) {
4004 strdup(cluster_name));
4010 extract_operations(
const char *node,
const char *rsc, xmlNode * rsc_entry, gboolean active_filter)
4013 int stop_index = -1;
4014 int start_index = -1;
4016 xmlNode *rsc_op = NULL;
4018 GList *gIter = NULL;
4019 GList *op_list = NULL;
4020 GList *sorted_op_list = NULL;
4024 sorted_op_list = NULL;
4026 for (rsc_op = pcmk__xe_first_child(rsc_entry);
4027 rsc_op != NULL; rsc_op = pcmk__xe_next(rsc_op)) {
4033 op_list = g_list_prepend(op_list, rsc_op);
4037 if (op_list == NULL) {
4045 if (active_filter == FALSE) {
4046 return sorted_op_list;
4053 for (gIter = sorted_op_list; gIter != NULL; gIter = gIter->next) {
4054 xmlNode *rsc_op = (xmlNode *) gIter->data;
4058 if (start_index < stop_index) {
4059 crm_trace(
"Skipping %s: not active",
ID(rsc_entry));
4062 }
else if (counter < start_index) {
4066 op_list = g_list_append(op_list, rsc_op);
4069 g_list_free(sorted_op_list);
4077 GList *output = NULL;
4078 GList *intermediate = NULL;
4080 xmlNode *tmp = NULL;
4085 xmlNode *node_state = NULL;
4087 for (node_state = pcmk__xe_first_child(status); node_state != NULL;
4088 node_state = pcmk__xe_next(node_state)) {
4098 if(this_node == NULL) {
4103 determine_remote_online_status(
data_set, this_node);
4106 determine_online_status(node_state, this_node,
data_set);
4115 xmlNode *lrm_rsc = NULL;
4120 for (lrm_rsc = pcmk__xe_first_child(tmp); lrm_rsc != NULL;
4121 lrm_rsc = pcmk__xe_next(lrm_rsc)) {
4123 if (pcmk__str_eq((
const char *)lrm_rsc->name,
4132 intermediate = extract_operations(
uname, rsc_id, lrm_rsc, active_filter);
4133 output = g_list_concat(output, intermediate);
#define CRM_CHECK(expr, failure_action)
#define XML_RSC_OP_LAST_CHANGE
void verify_pe_options(GHashTable *options)
pe_node_t * pe_find_node(GList *node_list, const char *uname)
xmlNode * find_xml_node(xmlNode *cib, const char *node_path, gboolean must_find)
enum pe_quorum_policy no_quorum_policy
pe_node_t * pe_find_node_any(GList *node_list, const char *id, const char *uname)
Service failed and possibly in promoted role.
GHashTable * pe__node_list2table(GList *list)
#define crm_notice(fmt, args...)
#define CRMD_ACTION_MIGRATED
No connection to executor.
#define pe_flag_stop_action_orphans
bool pe__is_guest_or_remote_node(const pe_node_t *node)
#define pe_rsc_debug(rsc, fmt, args...)
#define XML_CONFIG_ATTR_SHUTDOWN_LOCK
gint sort_rsc_priority(gconstpointer a, gconstpointer b)
Service active and promoted.
#define pe__set_action_flags(action, flags_to_set)
#define XML_NODE_IS_FENCED
#define XML_ATTR_TRANSITION_MAGIC
int pcmk__scan_min_int(const char *text, int *result, int minimum)
#define stop_action(rsc, node, optional)
void pe__add_param_check(xmlNode *rsc_op, pe_resource_t *rsc, pe_node_t *node, enum pe_check_parameters, pe_working_set_t *data_set)
pe_resource_t * container
bool pcmk__strcase_any_of(const char *s,...) G_GNUC_NULL_TERMINATED
pe_node_t * partial_migration_source
#define XML_ATTR_QUORUM_PANIC
#define pe_flag_concurrent_fencing
#define XML_CONFIG_ATTR_PRIORITY_FENCING_DELAY
void pe__update_recheck_time(time_t recheck, pe_working_set_t *data_set)
#define XML_TAG_UTILIZATION
#define pcmk__config_warn(fmt...)
#define XML_RULE_ATTR_SCORE
#define XML_BOOLEAN_FALSE
#define pe_flag_symmetric_cluster
int priority_fencing_delay
xmlNode * first_named_child(const xmlNode *parent, const char *name)
#define pe_flag_remove_after_stop
enum rsc_role_e next_role
#define pe_flag_maintenance_mode
int char2score(const char *score)
Get the integer value of a score string.
#define pcmk__config_err(fmt...)
#define pe_proc_warn(fmt...)
pe_resource_t * remote_rsc
#define XML_TAG_TRANSIENT_NODEATTRS
#define CRMD_ACTION_NOTIFY
gboolean unpack_resources(xmlNode *xml_resources, pe_working_set_t *data_set)
resource_object_functions_t * fns
#define XML_LRM_TAG_RESOURCE
const char * crm_xml_add(xmlNode *node, const char *name, const char *value)
Create an XML attribute with specified name and value.
pe_node_t * pe__copy_node(const pe_node_t *this_node)
#define CRMD_ACTION_PROMOTE
bool pe__bundle_needs_remote_name(pe_resource_t *rsc, pe_working_set_t *data_set)
gboolean unpack_tags(xmlNode *xml_tags, pe_working_set_t *data_set)
void calculate_active_ops(GList *sorted_op_list, int *start_index, int *stop_index)
#define XML_NVPAIR_ATTR_NAME
#define XML_NODE_IS_MAINTENANCE
gint sort_op_by_callid(gconstpointer a, gconstpointer b)
#define XML_NODE_EXPECTED
#define XML_CIB_TAG_RSC_TEMPLATE
Necessary CIB secrets are unavailable.
pe_resource_t * pe_find_resource(GList *rsc_list, const char *id_rh)
time_t get_effective_time(pe_working_set_t *data_set)
#define CRM_LOG_ASSERT(expr)
const char * pe_pref(GHashTable *options, const char *name)
void resource_location(pe_resource_t *rsc, pe_node_t *node, int score, const char *tag, pe_working_set_t *data_set)
Service promoted but more likely to fail soon.
gboolean unpack_remote_nodes(xmlNode *xml_resources, pe_working_set_t *data_set)
enum crm_ais_msg_types type
void copy_in_properties(xmlNode *target, xmlNode *src)
#define CRMD_JOINSTATE_NACK
#define CRM_ATTR_CLUSTER_NAME
pe_node_t * partial_migration_target
Action did not complete in time.
gboolean remote_was_fenced
int crm_element_value_int(const xmlNode *data, const char *name, int *dest)
Retrieve the integer value of an XML attribute.
Execution failed, do not retry on node.
bool pcmk__ends_with(const char *s, const char *match)
#define pe_flag_have_quorum
gboolean unpack_config(xmlNode *config, pe_working_set_t *data_set)
xmlNode * get_xpath_object(const char *xpath, xmlNode *xml_obj, int error_level)
#define pe_proc_err(fmt...)
gboolean remote_requires_reset
pe_working_set_t * data_set
Cluster that this node is part of.
char * strndup(const char *str, size_t len)
No fence device is configured for target.
#define pe__set_resource_flags(resource, flags_to_set)
#define XML_CIB_TAG_PROPSET
int pcmk__effective_rc(int rc)
#define pe_flag_stop_everything
void pe__unpack_dataset_nvpairs(xmlNode *xml_obj, const char *set_name, pe_rule_eval_data_t *rule_data, GHashTable *hash, const char *always_first, gboolean overwrite, pe_working_set_t *data_set)
#define XML_LRM_ATTR_RSCID
gboolean remote_maintenance
#define CRMD_ACTION_START
#define demote_action(rsc, node, optional)
#define XML_LRM_ATTR_TASK_KEY
bool pe__is_remote_node(const pe_node_t *node)
#define XML_TAG_ATTR_SETS
#define XML_LRM_ATTR_TASK
const char * role2text(enum rsc_role_e role)
xmlNode * pe_create_remote_xml(xmlNode *parent, const char *uname, const char *container_id, const char *migrateable, const char *is_managed, const char *start_timeout, const char *server, const char *port)
pe_node_t *(* location)(const pe_resource_t *, GList **, int)
pe_resource_t * pe__find_bundle_replica(const pe_resource_t *bundle, const pe_node_t *node)
int pcmk__scan_ll(const char *text, long long *result, long long default_value)
#define pe_flag_have_remote_nodes
GList * dangling_migrations
#define CRMD_JOINSTATE_DOWN
Maximum value for this enum.
#define crm_warn(fmt, args...)
guint remote_reconnect_ms
#define XML_CONFIG_ATTR_SHUTDOWN_LOCK_LIMIT
#define CRMD_ACTION_DEMOTE
char * clone_zero(const char *last_rsc_id)
#define pe_rsc_allow_migrate
#define pe_rsc_orphan_container_filler
int crm_element_value_ms(const xmlNode *data, const char *name, guint *dest)
Retrieve the millisecond value of an XML attribute.
#define crm_debug(fmt, args...)
int pe__target_rc_from_xml(xmlNode *xml_op)
pe_resource_t * uber_parent(pe_resource_t *rsc)
#define XML_RSC_ATTR_CONTAINER
Used only to initialize variables.
const char * crm_element_value(const xmlNode *data, const char *name)
Retrieve the value of an XML attribute.
#define XML_CIB_TAG_RESOURCE
#define pe_rsc_is_container
#define XML_CIB_TAG_STATE
const char * pe_base_name_end(const char *id)
bool pe__is_guest_node(const pe_node_t *node)
Parameter invalid (in local context)
match only clone instances
#define pe_rsc_start_pending
Parameter invalid (inherently)
#define pe_warn_once(pe_wo_bit, fmt...)
pe_ticket_t * ticket_new(const char *ticket_id, pe_working_set_t *data_set)
#define crm_trace(fmt, args...)
#define CRMD_JOINSTATE_MEMBER
#define do_crm_log(level, fmt, args...)
Log a message.
enum rsc_digest_cmp_val rc
bool xml_contains_remote_node(xmlNode *xml)
char * crm_strdup_printf(char const *format,...) G_GNUC_PRINTF(1
#define pcmk_is_set(g, f)
Convenience alias for pcmk_all_flags_set(), to check single flag.
xmlNode * add_node_copy(xmlNode *new_parent, xmlNode *xml_node)
#define pe_flag_startup_fencing
const char * stonith_action
struct pe_node_shared_s * details
gboolean get_target_role(pe_resource_t *rsc, enum rsc_role_e *role)
#define crm_log_xml_debug(xml, text)
bool pe__shutdown_requested(pe_node_t *node)
#define pe_rsc_needs_fencing
gboolean order_actions(pe_action_t *lh_action, pe_action_t *rh_action, enum pe_ordering order)
#define pe_rsc_promotable
pe_working_set_t * data_set
#define XML_TAG_META_SETS
void pcmk__str_update(char **str, const char *value)
Wrappers for and extensions to libxml2.
bool pcmk_xe_mask_probe_failure(xmlNode *xml_op)
gboolean add_tag_ref(GHashTable *tags, const char *tag_name, const char *obj_ref)
#define XML_RSC_ATTR_MANAGED
xmlNode * create_xml_node(xmlNode *parent, const char *name)
Action completed, result is known.
#define pe_flag_stonith_enabled
gboolean unpack_status(xmlNode *status, pe_working_set_t *data_set)
int crm_element_value_epoch(const xmlNode *xml, const char *name, time_t *dest)
Retrieve the seconds-since-epoch value of an XML attribute.
const char * pe_node_attribute_raw(pe_node_t *node, const char *name)
pe_resource_t * pe__create_clone_child(pe_resource_t *rsc, pe_working_set_t *data_set)
#define XML_RSC_ATTR_TARGET_ROLE
void(* free)(pe_resource_t *)
#define XML_LRM_ATTR_MIGRATE_TARGET
Execution failed, do not retry anywhere.
#define CIB_OPTIONS_FIRST
#define XML_RSC_ATTR_REMOTE_NODE
#define XML_LRM_ATTR_EXIT_REASON
#define XML_LRM_ATTR_RESTART_DIGEST
void pe__free_digests(gpointer ptr)
Dependencies not available locally.
enum pe_obj_types variant
const char * placement_strategy
const char * pcmk__epoch2str(time_t *when)
char * pcmk__op_key(const char *rsc_id, const char *op_type, guint interval_ms)
Generate an operation key (RESOURCE_ACTION_INTERVAL)
bool pe_can_fence(pe_working_set_t *data_set, pe_node_t *node)
#define XML_ATTR_TRANSITION_KEY
gboolean rsc_discovery_enabled
void pe_fence_node(pe_working_set_t *data_set, pe_node_t *node, const char *reason, bool priority_delay)
Schedule a fence action for a node.
pe_node_t * pe_create_node(const char *id, const char *uname, const char *type, const char *score, pe_working_set_t *data_set)
Requested action not implemented.
#define pe_flag_quick_location
Service active but more likely to fail soon.
bool pcmk_xe_is_probe(xmlNode *xml_op)
const char * fail2text(enum action_fail_response fail)
Agent does not implement requested action.
GHashTable * pcmk__strkey_table(GDestroyNotify key_destroy_func, GDestroyNotify value_destroy_func)
pcmk__action_result_t result
void pe__unpack_node_health_scores(pe_working_set_t *data_set)
#define XML_LRM_TAG_RESOURCES
#define crm_err(fmt, args...)
#define XML_CIB_TAG_TICKET_STATE
#define set_config_flag(data_set, option, flag)
xmlXPathObjectPtr xpath_search(xmlNode *xml_top, const char *path)
pe_action_t * pe__clear_failcount(pe_resource_t *rsc, pe_node_t *node, const char *reason, pe_working_set_t *data_set)
Schedule a controller operation to clear a fail count.
char guint crm_parse_interval_spec(const char *input)
Parse milliseconds from a Pacemaker interval specification.
gboolean decode_transition_key(const char *key, char **uuid, int *transition_id, int *action_id, int *target_rc)
Parse a transition key into its constituent parts.
op_digest_cache_t * rsc_action_digest_cmp(pe_resource_t *rsc, xmlNode *xml_op, pe_node_t *node, pe_working_set_t *data_set)
void pe__set_next_role(pe_resource_t *rsc, enum rsc_role_e role, const char *why)
#define XML_ATTR_HAVE_WATCHDOG
#define XML_NODE_ATTR_RSC_DISCOVERY
gboolean unpack_nodes(xmlNode *xml_nodes, pe_working_set_t *data_set)
#define CRMD_ACTION_METADATA
#define XML_LRM_ATTR_INTERVAL_MS
#define XML_LRM_ATTR_CALLID
#define CRMD_ACTION_MIGRATE
#define XML_NVPAIR_ATTR_VALUE
void native_add_running(pe_resource_t *rsc, pe_node_t *node, pe_working_set_t *data_set, gboolean failed)
#define pe__clear_resource_flags(resource, flags_to_clear)
#define XML_LRM_ATTR_OPSTATUS
#define pe__set_working_set_flags(working_set, flags_to_set)
#define CRMD_JOINSTATE_PENDING
rsc_role_e
Possible roles that a resource can be in.
CRM_TRACE_INIT_DATA(pe_status)
Agent or dependency not available locally.
GHashTable * digest_cache
cache of calculated resource digests
bool pe__is_universal_clone(pe_resource_t *rsc, pe_working_set_t *data_set)
#define pe_rsc_failure_ignored
#define XML_NODE_JOIN_STATE
void destroy_ticket(gpointer data)
#define XML_CIB_TAG_STATUS
#define XML_CIB_TAG_OBJ_REF
gboolean common_unpack(xmlNode *xml_obj, pe_resource_t **rsc, pe_resource_t *parent, pe_working_set_t *data_set)
#define XML_NODE_IN_CLUSTER
gboolean crm_is_true(const char *s)
#define pe_flag_have_stonith_resource
#define CRM_ATTR_SITE_NAME
#define XML_CIB_TAG_GROUP
#define pe_flag_enable_unfencing
GList * find_operations(const char *rsc, const char *node, gboolean active_filter, pe_working_set_t *data_set)
#define XML_LRM_TAG_RSC_OP
#define pe_rsc_trace(rsc, fmt, args...)
Action cannot be attempted (e.g. shutdown)
GList * pe__resource_actions(const pe_resource_t *rsc, const pe_node_t *node, const char *task, bool require_node)
Find all actions of given type for a resource.
pe_action_t * pe__clear_resource_history(pe_resource_t *rsc, pe_node_t *node, pe_working_set_t *data_set)
#define XML_LRM_ATTR_MIGRATE_SOURCE
pe_resource_t *(* find_rsc)(pe_resource_t *parent, const char *search, const pe_node_t *node, int flags)
void freeXpathObject(xmlXPathObjectPtr xpathObj)
gint sort_node_uname(gconstpointer a, gconstpointer b)
#define pe__clear_working_set_flags(working_set, flags_to_clear)
#define XPATH_ENABLE_UNFENCING
#define pe_flag_start_failure_fatal
#define XML_CIB_TAG_TICKETS
Execution failed, may be retried.
#define crm_info(fmt, args...)
GHashTable * template_rsc_sets
char * clone_strip(const char *last_rsc_id)
int pe_get_failcount(pe_node_t *node, pe_resource_t *rsc, time_t *last_failure, uint32_t flags, xmlNode *xml_op, pe_working_set_t *data_set)
pe_action_t * pe_fence_op(pe_node_t *node, const char *op, bool optional, const char *reason, bool priority_delay, pe_working_set_t *data_set)
void pe_free_action(pe_action_t *action)
#define pe_flag_shutdown_lock
#define pe_rsc_info(rsc, fmt, args...)
GHashTable * allowed_nodes
pe_action_t * custom_action(pe_resource_t *rsc, char *key, const char *task, pe_node_t *on_node, gboolean optional, gboolean foo, pe_working_set_t *data_set)
Create or update an action object.
#define pe_flag_startup_probes
#define CRMD_ACTION_STATUS
xmlNode * crm_next_same_xml(const xmlNode *sibling)
Get next instance of same XML tag.
#define pe_flag_stop_rsc_orphans