35 #define set_config_flag(data_set, option, flag) do { \ 36 const char *tmp = pe_pref(data_set->config_hash, option); \ 38 if(crm_is_true(tmp)) { \ 39 set_bit(data_set->flags, flag); \ 41 clear_bit(data_set->flags, flag); \ 54 is_dangling_container_remote_node(
node_t *node)
80 const char *reason,
bool priority_delay)
91 "(otherwise would because %s): " 92 "its guest resource %s is unmanaged",
95 crm_warn(
"Guest node %s will be fenced " 96 "(by recovering its guest resource %s): %s",
108 }
else if (is_dangling_container_remote_node(node)) {
109 crm_info(
"Cleaning up dangling connection for guest node %s: " 110 "fencing was already done because %s, " 111 "and guest resource no longer exists",
120 "(otherwise would because %s): connection is unmanaged",
126 pe_can_fence(data_set, node)?
"will be fenced" :
"is unclean",
131 pe_fence_op(node, NULL, TRUE, reason, FALSE, data_set);
134 crm_trace(
"Cluster node %s %s because %s",
136 pe_can_fence(data_set, node)?
"would also be fenced" :
"also is unclean",
142 pe_can_fence(data_set, node)?
"will be fenced" :
"is unclean",
145 pe_fence_op(node, NULL, TRUE, reason, priority_delay, data_set);
152 #define XPATH_UNFENCING_NVPAIR XML_CIB_TAG_NVPAIR \ 153 "[(@" XML_NVPAIR_ATTR_NAME "='" XML_RSC_ATTR_PROVIDES "'" \ 154 "or @" XML_NVPAIR_ATTR_NAME "='" XML_RSC_ATTR_REQUIRES "') " \ 155 "and @" XML_NVPAIR_ATTR_VALUE "='unfencing']" 158 #define XPATH_ENABLE_UNFENCING \ 159 "/" XML_TAG_CIB "/" XML_CIB_TAG_CONFIGURATION "/" XML_CIB_TAG_RESOURCES \ 160 "//" XML_TAG_META_SETS "/" XPATH_UNFENCING_NVPAIR \ 161 "|/" XML_TAG_CIB "/" XML_CIB_TAG_CONFIGURATION "/" XML_CIB_TAG_RSCCONFIG \ 162 "/" XML_TAG_META_SETS "/" XPATH_UNFENCING_NVPAIR 165 void set_if_xpath(
unsigned long long flag,
const char *xpath,
168 xmlXPathObjectPtr result = NULL;
170 if (is_not_set(data_set->
flags, flag)) {
172 if (result && (numXpathResults(result) > 0)) {
182 const char *value = NULL;
183 GHashTable *config_hash = crm_str_table_new();
194 crm_info(
"Startup probes: disabled (dangerous)");
199 crm_notice(
"Watchdog will be used via SBD if fencing is required");
213 crm_debug(
"STONITH of failed nodes is %s",
219 "Support for stonith-action of 'poweroff' is deprecated " 220 "and will be removed in a future release (use 'off' instead)");
229 #ifdef ENABLE_PRIORITY_FENCING_DELAY 239 crm_debug(
"Stop all active resources: %s",
244 crm_debug(
"Cluster is symmetric" " - resources can run anywhere by default");
250 "Support for 'default-resource-stickiness' cluster property" 251 " is deprecated and will be removed in a future release" 252 " (use resource-stickiness in rsc_defaults instead)");
274 crm_notice(
"Resetting no-quorum-policy to 'stop': cluster has never had quorum");
278 crm_config_err(
"Resetting no-quorum-policy to 'stop': stonith is not configured");
288 crm_debug(
"On loss of CCM Quorum: Freeze resources");
291 crm_debug(
"On loss of CCM Quorum: Stop ALL resources");
294 crm_notice(
"On loss of CCM Quorum: Fence all remaining nodes");
306 crm_trace(
"Orphan resource actions are %s",
310 crm_trace(
"Stopped resources are removed from the status section: %s",
322 "Support for 'is-managed-default' cluster property" 323 " is deprecated and will be removed in a future release" 324 " (use is-managed in rsc_defaults instead)");
326 crm_trace(
"By default resources are %smanaged",
331 is_set(data_set->
flags,
338 crm_trace(
"Unseen nodes will be fenced");
347 crm_debug(
"Node scores: 'red' = %s, 'yellow' = %s, 'green' = %s",
359 destroy_digest_cache(gpointer ptr)
382 " - this is rarely intended", uname);
385 new_node = calloc(1,
sizeof(
node_t));
386 if (new_node == NULL) {
391 new_node->
fixed = FALSE;
394 if (new_node->
details == NULL) {
399 crm_trace(
"Creating node for entry %s/%s", uname,
id);
411 }
else if (type == NULL ||
safe_str_eq(type,
"member")
430 destroy_digest_cache);
443 if (data->name_check == NULL) {
444 data->name_check = g_hash_table_new(
crm_str_hash, g_str_equal);
445 for (xml_rsc = __xml_first_child_element(parent); xml_rsc != NULL;
446 xml_rsc = __xml_next_element(xml_rsc)) {
448 const char *
id =
ID(xml_rsc);
451 g_hash_table_insert(data->name_check, (
char *)
id, (
char *)
id);
454 if (g_hash_table_lookup(data->name_check, remote_name)) {
459 crm_err(
"Invalid remote-node name, a resource called '%s' already exists.", remote_name);
470 xmlNode *attr_set = NULL;
471 xmlNode *attr = NULL;
473 const char *container_id =
ID(xml_obj);
474 const char *remote_name = NULL;
475 const char *remote_server = NULL;
476 const char *remote_port = NULL;
477 const char *connect_timeout =
"60s";
478 const char *remote_allow_migrate=NULL;
479 const char *container_managed = NULL;
481 for (attr_set = __xml_first_child_element(xml_obj); attr_set != NULL;
482 attr_set = __xml_next_element(attr_set)) {
487 for (attr = __xml_first_child_element(attr_set); attr != NULL;
488 attr = __xml_next_element(attr)) {
495 remote_server = value;
498 }
else if (
safe_str_eq(name,
"remote-connect-timeout")) {
499 connect_timeout = value;
500 }
else if (
safe_str_eq(name,
"remote-allow-migrate")) {
501 remote_allow_migrate=value;
503 container_managed = value;
508 if (remote_name == NULL) {
517 remote_allow_migrate, container_managed,
"30s",
"30s",
518 connect_timeout, remote_server, remote_port);
550 xmlNode *xml_obj = NULL;
552 const char *
id = NULL;
553 const char *
uname = NULL;
554 const char *
type = NULL;
555 const char *score = NULL;
557 for (xml_obj = __xml_first_child_element(xml_nodes); xml_obj != NULL;
558 xml_obj = __xml_next_element(xml_obj)) {
567 crm_trace(
"Processing node %s/%s", uname,
id);
575 if (new_node == NULL) {
585 handle_startup_fencing(data_set, new_node);
596 crm_info(
"Creating a fake local node");
607 const char *container_id = NULL;
612 for (; gIter != NULL; gIter = gIter->next) {
615 setup_container(child_rsc, data_set);
628 pe_rsc_trace(rsc,
"Resource %s's container is %s", rsc->
id, container_id);
630 pe_err(
"Resource %s: Unknown resource container (%s)", rsc->
id, container_id);
638 xmlNode *xml_obj = NULL;
641 for (xml_obj = __xml_first_child_element(xml_resources); xml_obj != NULL;
642 xml_obj = __xml_next_element(xml_obj)) {
644 const char *new_node_id = NULL;
649 new_node_id =
ID(xml_obj);
653 crm_trace(
"Found baremetal remote node %s in container resource %s", new_node_id,
ID(xml_obj));
670 new_node_id = expand_remote_rsc_meta(xml_obj, xml_resources, data_set);
673 crm_trace(
"Found guest remote node %s in container resource %s", new_node_id,
ID(xml_obj));
680 xmlNode *xml_obj2 = NULL;
682 for (xml_obj2 = __xml_first_child_element(xml_obj); xml_obj2 != NULL;
683 xml_obj2 = __xml_next_element(xml_obj2)) {
685 new_node_id = expand_remote_rsc_meta(xml_obj2, xml_resources, data_set);
688 crm_trace(
"Found guest remote node %s in container resource %s which is in group %s", new_node_id,
ID(xml_obj2),
ID(xml_obj));
710 node_t *remote_node = NULL;
724 pe_rsc_trace(new_rsc,
"Linking remote connection resource %s to node %s",
731 handle_startup_fencing(data_set, remote_node);
736 strdup(
"container"));
741 destroy_tag(gpointer data)
747 g_list_free_full(tag->
refs, free);
767 xmlNode *xml_obj = NULL;
774 for (xml_obj = __xml_first_child_element(xml_resources); xml_obj != NULL;
775 xml_obj = __xml_next_element(xml_obj)) {
780 const char *template_id =
ID(xml_obj);
783 template_id, NULL, NULL) == FALSE) {
790 crm_trace(
"Beginning unpack... <%s id=%s... >", crm_element_name(xml_obj),
ID(xml_obj));
791 if (
common_unpack(xml_obj, &new_rsc, NULL, data_set) && (new_rsc != NULL)) {
798 if (new_rsc != NULL && new_rsc->
fns != NULL) {
804 for (gIter = data_set->
resources; gIter != NULL; gIter = gIter->next) {
807 setup_container(rsc, data_set);
808 link_rsc2remotenode(data_set, rsc);
818 crm_config_err(
"Resource start-up disabled since no STONITH resources have been defined");
819 crm_config_err(
"Either configure some or disable STONITH with the stonith-enabled option");
820 crm_config_err(
"NOTE: Clusters with shared data need STONITH to ensure data integrity");
829 xmlNode *xml_tag = NULL;
834 for (xml_tag = __xml_first_child_element(xml_tags); xml_tag != NULL;
835 xml_tag = __xml_next_element(xml_tag)) {
837 xmlNode *xml_obj_ref = NULL;
838 const char *tag_id =
ID(xml_tag);
844 if (tag_id == NULL) {
850 for (xml_obj_ref = __xml_first_child_element(xml_tag); xml_obj_ref != NULL;
851 xml_obj_ref = __xml_next_element(xml_obj_ref)) {
853 const char *obj_ref =
ID(xml_obj_ref);
859 if (obj_ref == NULL) {
860 crm_config_err(
"Failed unpacking %s for tag %s: %s should be specified",
861 crm_element_name(xml_obj_ref), tag_id,
XML_ATTR_ID);
879 const char *ticket_id = NULL;
880 const char *granted = NULL;
881 const char *last_granted = NULL;
882 const char *standby = NULL;
883 xmlAttrPtr xIter = NULL;
887 ticket_id =
ID(xml_ticket);
888 if (ticket_id == NULL || strlen(ticket_id) == 0) {
892 crm_trace(
"Processing ticket state for %s", ticket_id);
894 ticket = g_hash_table_lookup(data_set->
tickets, ticket_id);
895 if (ticket == NULL) {
897 if (ticket == NULL) {
902 for (xIter = xml_ticket->properties; xIter; xIter = xIter->next) {
903 const char *prop_name = (
const char *)xIter->name;
909 g_hash_table_replace(ticket->
state, strdup(prop_name), strdup(prop_value));
912 granted = g_hash_table_lookup(ticket->
state,
"granted");
918 crm_info(
"We do not have ticket '%s'", ticket->
id);
921 last_granted = g_hash_table_lookup(ticket->
state,
"last-granted");
926 standby = g_hash_table_lookup(ticket->
state,
"standby");
930 crm_info(
"Granted ticket '%s' is in standby-mode", ticket->
id);
936 crm_trace(
"Done with ticket state for %s", ticket_id);
944 xmlNode *xml_obj = NULL;
946 for (xml_obj = __xml_first_child_element(xml_tickets); xml_obj != NULL;
947 xml_obj = __xml_next_element(xml_obj)) {
952 unpack_ticket_state(xml_obj, data_set);
961 get_ticket_state_legacy(gpointer key, gpointer value, gpointer user_data)
963 const char *long_key = key;
964 char *state_key = NULL;
966 const char *granted_prefix =
"granted-ticket-";
967 const char *last_granted_prefix =
"last-granted-";
968 static int granted_prefix_strlen = 0;
969 static int last_granted_prefix_strlen = 0;
971 const char *ticket_id = NULL;
972 const char *is_granted = NULL;
973 const char *last_granted = NULL;
974 const char *sep = NULL;
979 if (granted_prefix_strlen == 0) {
980 granted_prefix_strlen = strlen(granted_prefix);
983 if (last_granted_prefix_strlen == 0) {
984 last_granted_prefix_strlen = strlen(last_granted_prefix);
987 if (strstr(long_key, granted_prefix) == long_key) {
988 ticket_id = long_key + granted_prefix_strlen;
989 if (strlen(ticket_id)) {
990 state_key = strdup(
"granted");
993 }
else if (strstr(long_key, last_granted_prefix) == long_key) {
994 ticket_id = long_key + last_granted_prefix_strlen;
995 if (strlen(ticket_id)) {
996 state_key = strdup(
"last-granted");
997 last_granted = value;
999 }
else if ((sep = strrchr(long_key,
'-'))) {
1000 ticket_id = sep + 1;
1001 state_key =
strndup(long_key, strlen(long_key) - strlen(sep));
1004 if (ticket_id == NULL || strlen(ticket_id) == 0) {
1009 if (state_key == NULL || strlen(state_key) == 0) {
1014 ticket = g_hash_table_lookup(data_set->
tickets, ticket_id);
1015 if (ticket == NULL) {
1017 if (ticket == NULL) {
1023 g_hash_table_replace(ticket->
state, state_key, strdup(value));
1031 crm_info(
"We do not have ticket '%s'", ticket->
id);
1034 }
else if (last_granted) {
1042 const char *resource_discovery_enabled = NULL;
1043 xmlNode *attrs = NULL;
1050 if ((this_node == NULL) || (
is_remote_node(this_node) == FALSE)) {
1086 if (resource_discovery_enabled && !
crm_is_true(resource_discovery_enabled)) {
1088 crm_warn(
"ignoring %s attribute on baremetal remote node %s, disabling resource discovery requires stonith to be enabled.",
1102 unpack_node_loop(xmlNode * status,
bool fence,
pe_working_set_t * data_set)
1104 bool changed =
false;
1105 xmlNode *lrm_rsc = NULL;
1107 for (xmlNode *state = __xml_first_child_element(status); state != NULL;
1108 state = __xml_next_element(state)) {
1110 const char *
id = NULL;
1111 const char *
uname = NULL;
1112 node_t *this_node = NULL;
1113 bool process = FALSE;
1123 if (this_node == NULL) {
1124 crm_info(
"Node %s is unknown",
id);
1128 crm_info(
"Node %s is already processed",
id);
1142 }
else if(rsc == NULL) {
1162 determine_remote_online_status(data_set, this_node);
1163 unpack_handle_remote_attrs(this_node, state, data_set);
1175 crm_trace(
"Processing lrm resource entries on %shealthy%s node: %s",
1195 const char *
id = NULL;
1196 const char *
uname = NULL;
1198 xmlNode *state = NULL;
1199 node_t *this_node = NULL;
1203 if (data_set->
tickets == NULL) {
1208 for (state = __xml_first_child_element(status); state != NULL;
1209 state = __xml_next_element(state)) {
1212 xmlNode *xml_tickets = state;
1213 GHashTable *state_hash = NULL;
1217 state_hash = crm_str_table_new();
1220 state_hash, NULL, TRUE, data_set->
now);
1222 g_hash_table_foreach(state_hash, get_ticket_state_legacy, data_set);
1225 g_hash_table_destroy(state_hash);
1229 unpack_tickets_state(xml_tickets, data_set);
1233 xmlNode *attrs = NULL;
1234 const char *resource_discovery_enabled = NULL;
1240 if (uname == NULL) {
1244 }
else if (this_node == NULL) {
1258 crm_trace(
"Processing node id=%s, uname=%s",
id, uname);
1279 if (resource_discovery_enabled && !
crm_is_true(resource_discovery_enabled)) {
1280 crm_warn(
"ignoring %s attribute on node %s, disabling resource discovery is not allowed on cluster nodes",
1293 pe_fence_node(data_set, this_node,
"cluster does not have quorum", FALSE);
1299 while(unpack_node_loop(status, FALSE, data_set)) {
1310 for (GList *item = data_set->
stop_needed; item; item = item->next) {
1312 pe_node_t *node = pe__current_node(container);
1322 for (
GListPtr gIter = data_set->
nodes; gIter != NULL; gIter = gIter->next) {
1323 node_t *this_node = gIter->data;
1325 if (this_node == NULL) {
1332 determine_remote_online_status(data_set, this_node);
1339 determine_online_status_no_fencing(
pe_working_set_t * data_set, xmlNode * node_state,
1342 gboolean online = FALSE;
1355 crm_debug(
"Node is not ready to run resources: %s", join);
1360 crm_trace(
"\tis_peer=%s, join=%s, expected=%s",
1365 pe_fence_node(data_set, this_node,
"peer is unexpectedly down", FALSE);
1366 crm_info(
"\tin_cluster=%s, is_peer=%s, join=%s, expected=%s",
1373 determine_online_status_fencing(
pe_working_set_t * data_set, xmlNode * node_state,
1376 gboolean online = FALSE;
1377 gboolean do_terminate = FALSE;
1392 do_terminate = TRUE;
1394 }
else if (terminate != NULL && strlen(terminate) > 0) {
1396 char t = terminate[0];
1398 if (t !=
'0' && isdigit(t)) {
1399 do_terminate = TRUE;
1403 crm_trace(
"%s: in_cluster=%s, is_peer=%s, join=%s, expected=%s, term=%d",
1411 if (exp_state == NULL) {
1421 }
else if (in_cluster == NULL) {
1422 pe_fence_node(data_set, this_node,
"peer has not been seen by the cluster", FALSE);
1425 pe_fence_node(data_set, this_node,
"peer failed the pacemaker membership criteria", FALSE);
1445 pe_fence_node(data_set, this_node,
"peer is no longer part of the cluster", TRUE);
1448 pe_fence_node(data_set, this_node,
"peer process is no longer available", FALSE);
1451 }
else if (do_terminate) {
1452 pe_fence_node(data_set, this_node,
"termination was requested", FALSE);
1464 pe_fence_node(data_set, this_node,
"peer was in an unknown state", FALSE);
1465 crm_warn(
"%s: in-cluster=%s, is-peer=%s, join=%s, expected=%s, term=%d, shutdown=%d",
1486 goto remote_online_done;
1491 if (container && (g_list_length(rsc->
running_on) == 1)) {
1497 crm_trace(
"%s node %s presumed ONLINE because connection resource is started",
1498 (container?
"Guest" :
"Remote"), this_node->
details->
id);
1504 crm_trace(
"%s node %s shutting down because connection resource is stopping",
1505 (container?
"Guest" :
"Remote"), this_node->
details->
id);
1511 crm_trace(
"Guest node %s UNCLEAN because guest resource failed",
1517 crm_trace(
"%s node %s OFFLINE because connection resource failed",
1518 (container?
"Guest" :
"Remote"), this_node->
details->
id);
1524 crm_trace(
"%s node %s OFFLINE because its resource is stopped",
1525 (container?
"Guest" :
"Remote"), this_node->
details->
id);
1531 crm_trace(
"Guest node %s UNCLEAN because host is unclean",
1546 gboolean online = FALSE;
1549 if (this_node == NULL) {
1572 online = determine_online_status_no_fencing(data_set, node_state, this_node);
1575 online = determine_online_status_fencing(data_set, node_state, this_node);
1583 this_node->
fixed = TRUE;
1589 this_node->
fixed = TRUE;
1624 if (!crm_strlen_zero(
id)) {
1625 const char *end =
id + strlen(
id) - 1;
1627 for (
const char *s = end; s >
id; --s) {
1641 return (s == end)? s : (s - 1);
1665 char *basename = NULL;
1668 basename =
strndup(last_rsc_id, end - last_rsc_id + 1);
1687 size_t base_name_len = end - last_rsc_id + 1;
1691 zero = calloc(base_name_len + 3,
sizeof(
char));
1693 memcpy(zero, last_rsc_id, base_name_len);
1694 zero[base_name_len] =
':';
1695 zero[base_name_len + 1] =
'0';
1700 create_fake_resource(
const char *rsc_id, xmlNode * rsc_entry,
pe_working_set_t * data_set)
1716 crm_debug(
"Detected orphaned remote node %s", rsc_id);
1721 link_rsc2remotenode(data_set, rsc);
1724 crm_trace(
"Setting node %s as shutting down due to orphaned connection resource", rsc_id);
1731 crm_trace(
"Detected orphaned container filler %s", rsc_id);
1744 create_anonymous_orphan(
pe_resource_t *parent,
const char *rsc_id,
1752 pe_rsc_debug(parent,
"Created orphan %s for %s: %s on %s",
1778 gboolean skip_inactive = FALSE;
1786 for (rIter = parent->
children; rsc == NULL && rIter; rIter = rIter->next) {
1831 crm_notice(
"Active (now-)anonymous clone %s has " 1832 "multiple (orphan) instance histories on %s",
1834 skip_inactive = TRUE;
1841 g_list_free(locations);
1845 if (!skip_inactive && !inactive_instance
1848 inactive_instance = parent->
fns->
find_rsc(child, rsc_id, NULL,
1854 if (inactive_instance && inactive_instance->
pending_node 1856 inactive_instance = NULL;
1862 if ((rsc == NULL) && !skip_inactive && (inactive_instance != NULL)) {
1863 pe_rsc_trace(parent,
"Resource %s, empty slot", inactive_instance->
id);
1864 rsc = inactive_instance;
1868 rsc = create_anonymous_orphan(parent, rsc_id, node, data_set);
1876 xmlNode * rsc_entry)
1895 crm_trace(
"%s found as %s (%s)", rsc_id, clone0_id, parent->
id);
1897 crm_trace(
"%s is not known as %s either (orphan)",
1903 crm_trace(
"Resource history for %s is orphaned because it is no longer primitive",
1911 if (pe_rsc_is_anon_clone(parent)) {
1913 if (pe_rsc_is_bundled(parent)) {
1918 rsc = find_anonymous_clone(data_set, node, parent, base);
1929 pe_rsc_debug(rsc,
"Internally renamed %s on %s to %s%s",
1943 rsc = create_fake_resource(rsc_id, rsc_entry, data_set);
1962 char *reason = NULL;
1965 pe_rsc_trace(rsc,
"Resource %s is %s on %s: on_fail=%s",
1993 gboolean should_fence = FALSE;
2004 should_fence = TRUE;
2017 " revoked if remote connection can " 2018 "be re-established elsewhere)",
2021 should_fence = TRUE;
2025 if (reason == NULL) {
2088 if (rsc->
container && pe_rsc_is_bundled(rsc)) {
2117 "remote connection is unrecoverable", FALSE);
2152 " %s must be stopped manually on %s",
2175 for (; gIter != NULL; gIter = gIter->next) {
2181 g_list_free(possible_matches);
2189 int start_index,
int stop_index,
2193 const char *task = NULL;
2194 const char *status = NULL;
2198 pe_rsc_trace(rsc,
"%s: Start index %d, stop index = %d", rsc->
id, start_index, stop_index);
2200 for (; gIter != NULL; gIter = gIter->next) {
2201 xmlNode *rsc_op = (xmlNode *) gIter->data;
2205 const char *
id =
ID(rsc_op);
2206 const char *interval_s = NULL;
2215 }
else if (start_index < stop_index && counter <= stop_index) {
2219 }
else if (counter < start_index) {
2226 if (interval == 0) {
2248 int implied_monitor_start = -1;
2249 int implied_master_start = -1;
2250 const char *task = NULL;
2251 const char *status = NULL;
2257 for (; gIter != NULL; gIter = gIter->next) {
2258 xmlNode *rsc_op = (xmlNode *) gIter->data;
2276 implied_monitor_start =
counter;
2279 implied_master_start =
counter;
2283 if (*start_index == -1) {
2284 if (implied_master_start != -1) {
2285 *start_index = implied_master_start;
2286 }
else if (implied_monitor_start != -1) {
2287 *start_index = implied_monitor_start;
2296 int stop_index = -1;
2297 int start_index = -1;
2300 const char *task = NULL;
2307 xmlNode *migrate_op = NULL;
2308 xmlNode *rsc_op = NULL;
2309 xmlNode *last_failure = NULL;
2315 crm_element_name(rsc_entry), rsc_id, node->
details->
uname);
2319 sorted_op_list = NULL;
2321 for (rsc_op = __xml_first_child_element(rsc_entry); rsc_op != NULL;
2322 rsc_op = __xml_next_element(rsc_op)) {
2324 op_list = g_list_prepend(op_list, rsc_op);
2328 if (op_list == NULL) {
2334 rsc = unpack_find_resource(data_set, node, rsc_id, rsc_entry);
2336 rsc = process_orphan_resource(rsc_entry, node, data_set);
2341 saved_role = rsc->
role;
2346 for (gIter = sorted_op_list; gIter != NULL; gIter = gIter->next) {
2347 xmlNode *rsc_op = (xmlNode *) gIter->data;
2351 migrate_op = rsc_op;
2354 unpack_rsc_op(rsc, node, rsc_op, &last_failure, &on_fail, data_set);
2359 process_recurring(node, rsc, start_index, stop_index, sorted_op_list, data_set);
2362 g_list_free(sorted_op_list);
2364 process_rsc_state(rsc, node, on_fail, migrate_op, data_set);
2368 pe_rsc_debug(rsc,
"%s: Overwriting calculated next role %s" 2369 " with requested next role %s",
2374 pe_rsc_info(rsc,
"%s: Not overwriting calculated next role %s" 2375 " with requested next role %s",
2380 if (saved_role > rsc->
role) {
2381 rsc->
role = saved_role;
2388 handle_orphaned_container_fillers(xmlNode * lrm_rsc_list,
pe_working_set_t * data_set)
2390 xmlNode *rsc_entry = NULL;
2391 for (rsc_entry = __xml_first_child_element(lrm_rsc_list); rsc_entry != NULL;
2392 rsc_entry = __xml_next_element(rsc_entry)) {
2397 const char *container_id;
2405 if (container_id == NULL || rsc_id == NULL) {
2410 if (container == NULL) {
2421 pe_rsc_trace(rsc,
"Mapped orphaned rsc %s's container to %s", rsc->
id, container_id);
2430 xmlNode *rsc_entry = NULL;
2431 gboolean found_orphaned_container_filler = FALSE;
2437 for (rsc_entry = __xml_first_child_element(lrm_rsc_list); rsc_entry != NULL;
2438 rsc_entry = __xml_next_element(rsc_entry)) {
2441 resource_t *rsc = unpack_lrm_rsc_state(node, rsc_entry, data_set);
2446 found_orphaned_container_filler = TRUE;
2454 if (found_orphaned_container_filler) {
2455 handle_orphaned_container_fillers(lrm_rsc_list, data_set);
2473 set_node_score(gpointer key, gpointer value, gpointer user_data)
2476 int *score = user_data;
2481 #define STATUS_PATH_MAX 1024 2483 find_lrm_op(
const char *resource,
const char *op,
const char *node,
const char *source,
2488 xmlNode *xml = NULL;
2490 offset += snprintf(xpath + offset,
STATUS_PATH_MAX - offset,
"//node_state[@uname='%s']", node);
2515 if (xml && success_only) {
2529 pe__call_id(xmlNode *op_xml)
2562 return (stop_op && (pe__call_id(stop_op) > pe__call_id(xml_op)));
2587 int from_status = 0;
2590 xmlNode *migrate_from = NULL;
2594 if (stop_happened_after(rsc, node, xml_op, data_set)) {
2606 source, FALSE, data_set);
2610 pe_rsc_trace(rsc,
"%s op on %s exited with status=%d, rc=%d",
2611 ID(migrate_from), target, from_status, from_rc);
2620 pe_rsc_trace(rsc,
"Detected dangling migration op: %s on %s",
ID(xml_op),
2627 pe_rsc_trace(rsc,
"Marking active on %s %p %d", target, target_node,
2634 pe_rsc_trace(rsc,
"Marking active on %s %p %d", target, target_node,
2658 newer_op(
pe_resource_t *rsc,
const char *action_name,
const char *node_name,
2661 xmlNode *action = find_lrm_op(rsc->
id, action_name, node_name, NULL, TRUE,
2664 return pe__call_id(action) > call_id;
2671 int target_stop_id = 0;
2672 int target_migrate_from_id = 0;
2673 xmlNode *target_stop = NULL;
2674 xmlNode *target_migrate_from = NULL;
2686 target_stop_id = pe__call_id(target_stop);
2690 source, TRUE, data_set);
2691 target_migrate_from_id = pe__call_id(target_migrate_from);
2693 if ((target_stop == NULL) || (target_stop_id < target_migrate_from_id)) {
2701 target_stop_id, target_migrate_from_id);
2706 }
else if (target_migrate_from == NULL) {
2717 int source_migrate_to_id = pe__call_id(xml_op);
2737 xmlNode *source_stop = NULL;
2738 xmlNode *source_migrate_to = NULL;
2753 source, target, TRUE, data_set);
2755 if ((source_stop == NULL)
2756 || (pe__call_id(source_stop) < pe__call_id(source_migrate_to))) {
2772 xmlNode *xIter = NULL;
2779 for (xIter = data_set->
failed->children; xIter; xIter = xIter->next) {
2795 static const char *get_op_key(xmlNode *xml_op)
2805 unpack_rsc_op_failure(
resource_t * rsc,
node_t * node,
int rc, xmlNode * xml_op, xmlNode ** last_failure,
2809 bool is_probe = FALSE;
2812 const char *key = get_op_key(xml_op);
2818 *last_failure = xml_op;
2827 crm_warn(
"Processing failed %s of %s on %s: %s " CRM_XS " rc=%d",
2829 services_ocf_exitcode_str(rc), rc);
2838 crm_notice(
"If it is not possible for %s to run on %s, see " 2839 "the resource-discovery option for location constraints",
2843 record_failed_op(xml_op, node, rsc, data_set);
2846 crm_trace(
"Processing failed op %s for %s on %s: %s (%d)",
2847 task, rsc->
id, node->
details->
uname, services_ocf_exitcode_str(rc),
2851 action =
custom_action(rsc, strdup(key), task, NULL, TRUE, FALSE, data_set);
2865 unpack_migrate_to_failure(rsc, node, xml_op, data_set);
2868 unpack_migrate_from_failure(rsc, node, xml_op, data_set);
2906 pe_rsc_trace(rsc,
"Resource %s: role=%s, unclean=%s, on_fail=%s, fail_role=%s",
2923 if (pe_rsc_is_clone(parent)
2931 crm_warn(
"Making sure %s doesn't come up again", fail_rsc->
id);
2937 g_hash_table_foreach(fail_rsc->
allowed_nodes, set_node_score, &score);
2944 determine_op_status(
2950 const char *key = get_op_key(xml_op);
2953 bool is_probe = FALSE;
2961 if (target_rc >= 0 && target_rc != rc) {
2963 pe_rsc_debug(rsc,
"%s on %s returned '%s' (%d) instead of the expected value: '%s' (%d)",
2965 services_ocf_exitcode_str(rc), rc,
2966 services_ocf_exitcode_str(target_rc), target_rc);
2974 if (is_probe && target_rc == 7) {
2976 pe_rsc_info(rsc,
"Operation %s found resource %s active on %s",
3005 pe_rsc_info(rsc,
"Operation %s found resource %s active in master mode on %s",
3008 }
else if (target_rc == rc) {
3011 }
else if (target_rc >= 0) {
3019 crm_err(
"%s reported %s in master mode on %s",
3047 pe_proc_err(
"No further recovery can be attempted for %s: %s action failed with '%s' (%d)",
3048 rsc->
id, task, services_ocf_exitcode_str(rc), rc);
3057 crm_info(
"Treating %s (rc=%d) on %s as an ERROR",
3068 bool expired = FALSE;
3069 time_t last_failure = 0;
3072 const char *key = get_op_key(xml_op);
3074 const char *clear_reason = NULL;
3095 if (strstr(
ID(xml_op),
"last_failure")) {
3096 crm_info(
"Waiting to clear monitor failure for remote node %s until fencing has occurred", rsc->
id);
3100 failure_timeout = 0;
3105 if (failure_timeout > 0) {
3111 if (now > (last_run + failure_timeout)) {
3124 xml_op, data_set) == 0) {
3126 clear_reason =
"it expired";
3133 && strstr(
ID(xml_op),
"last_failure")) {
3135 clear_reason =
"reconnect interval is set";
3138 }
else if (strstr(
ID(xml_op),
"last_failure") &&
3139 ((strcmp(task,
"start") == 0) || (strcmp(task,
"monitor") == 0))) {
3153 switch (digest_data->
rc) {
3155 crm_trace(
"Resource %s history entry %s on %s has no digest to compare",
3161 clear_reason =
"resource parameters have changed";
3167 if (clear_reason != NULL) {
3178 crm_notice(
"Waiting for %s to complete before clearing %s failure for remote node %s", fence?fence->
uuid:
"nil", task, rsc->
id);
3205 char *dummy_string = NULL;
3230 update_resource_state(
resource_t * rsc,
node_t * node, xmlNode * xml_op,
const char * task,
int rc,
3233 gboolean clear_past_failure = FALSE;
3239 clear_past_failure = TRUE;
3246 const char *op_key = get_op_key(xml_op);
3247 const char *last_failure_key = get_op_key(last_failure);
3250 clear_past_failure = TRUE;
3260 clear_past_failure = TRUE;
3264 clear_past_failure = TRUE;
3268 clear_past_failure = TRUE;
3276 clear_past_failure = TRUE;
3279 unpack_migrate_to_success(rsc, node, xml_op, data_set);
3287 if (clear_past_failure) {
3293 pe_rsc_trace(rsc,
"%s.%s is not cleared by a completed stop",
3325 const char *key = NULL;
3326 const char *task = NULL;
3327 const char *task_key = NULL;
3334 gboolean expired = FALSE;
3340 CRM_CHECK(xml_op != NULL,
return FALSE);
3342 task_key = get_op_key(xml_op);
3366 pe_rsc_trace(rsc,
"Unpacking task %s/%s (call_id=%d, status=%d, rc=%d) on %s (role=%s)",
3370 pe_rsc_trace(rsc,
"Node %s (where %s is running) is unclean." 3371 " Further action depends on the value of the stop's on-fail attribute",
3376 expired = check_operation_expiry(rsc, node, rc, xml_op, data_set);
3386 record_failed_op(xml_op, node, rsc, data_set);
3395 record_failed_op(xml_op, node, rsc, data_set);
3399 if (expired && target_rc != rc) {
3402 pe_rsc_debug(rsc,
"Expired operation '%s' on %s returned '%s' (%d) instead of the expected value: '%s' (%d)",
3404 services_ocf_exitcode_str(rc), rc,
3405 services_ocf_exitcode_str(target_rc), target_rc);
3408 crm_notice(
"Ignoring expired calculated failure %s (rc=%d, magic=%s) on %s",
3413 crm_notice(
"Re-initiated expired calculated failure %s (rc=%d, magic=%s) on %s",
3422 status = determine_op_status(rsc, rc, target_rc, node, xml_op, on_fail, data_set);
3429 pe_err(
"Don't know what to do for cancelled ops yet");
3468 update_resource_state(rsc, node, xml_op, task, rc, *last_failure, on_fail, data_set);
3472 failure_strategy = get_action_on_fail(rsc, task_key, task, data_set);
3474 crm_warn(
"Cannot ignore failed %s (status=%d, rc=%d) on %s: " 3475 "Resource agent doesn't exist",
3481 unpack_rsc_op_failure(rsc, node, rc, xml_op, last_failure, on_fail, data_set);
3490 failure_strategy = get_action_on_fail(rsc, task_key, task, data_set);
3495 crm_warn(
"Pretending the failure of %s (rc=%d) on %s succeeded",
3498 update_resource_state(rsc, node, xml_op, task, target_rc, *last_failure, on_fail, data_set);
3502 record_failed_op(xml_op, node, rsc, data_set);
3505 *on_fail = failure_strategy;
3509 unpack_rsc_op_failure(rsc, node, rc, xml_op, last_failure, on_fail, data_set);
3513 "Preventing %s from re-starting on %s: operation %s failed '%s' (%d)",
3515 task, services_ocf_exitcode_str(rc), rc);
3520 crm_err(
"Preventing %s from re-starting anywhere: operation %s failed '%s' (%d)",
3521 parent->
id, task, services_ocf_exitcode_str(rc), rc);
3537 const char *cluster_name = NULL;
3554 cluster_name = g_hash_table_lookup(data_set->
config_hash,
"cluster-name");
3557 strdup(cluster_name));
3571 }
else if (cluster_name) {
3575 strdup(cluster_name));
3582 extract_operations(
const char *node,
const char *rsc, xmlNode * rsc_entry, gboolean active_filter)
3585 int stop_index = -1;
3586 int start_index = -1;
3588 xmlNode *rsc_op = NULL;
3596 sorted_op_list = NULL;
3598 for (rsc_op = __xml_first_child_element(rsc_entry);
3599 rsc_op != NULL; rsc_op = __xml_next_element(rsc_op)) {
3603 op_list = g_list_prepend(op_list, rsc_op);
3607 if (op_list == NULL) {
3615 if (active_filter == FALSE) {
3616 return sorted_op_list;
3623 for (gIter = sorted_op_list; gIter != NULL; gIter = gIter->next) {
3624 xmlNode *rsc_op = (xmlNode *) gIter->data;
3628 if (start_index < stop_index) {
3629 crm_trace(
"Skipping %s: not active",
ID(rsc_entry));
3632 }
else if (counter < start_index) {
3636 op_list = g_list_append(op_list, rsc_op);
3639 g_list_free(sorted_op_list);
3650 xmlNode *tmp = NULL;
3653 node_t *this_node = NULL;
3655 xmlNode *node_state = NULL;
3657 for (node_state = __xml_first_child_element(status); node_state != NULL;
3658 node_state = __xml_next_element(node_state)) {
3668 if(this_node == NULL) {
3673 determine_remote_online_status(data_set, this_node);
3684 xmlNode *lrm_rsc = NULL;
3689 for (lrm_rsc = __xml_first_child_element(tmp); lrm_rsc != NULL;
3690 lrm_rsc = __xml_next_element(lrm_rsc)) {
3699 intermediate = extract_operations(uname, rsc_id, lrm_rsc, active_filter);
3700 output = g_list_concat(output, intermediate);
gboolean unpack_config(xmlNode *config, pe_working_set_t *data_set)
#define CRM_CHECK(expr, failure_action)
#define XML_RSC_OP_LAST_CHANGE
gboolean unpack_rsc_op(resource_t *rsc, node_t *node, xmlNode *xml_op, xmlNode **last_failure, enum action_fail_response *failed, pe_working_set_t *data_set)
void verify_pe_options(GHashTable *options)
xmlNode * find_xml_node(xmlNode *cib, const char *node_path, gboolean must_find)
#define crm_notice(fmt, args...)
#define CRMD_ACTION_MIGRATED
#define pe_rsc_debug(rsc, fmt, args...)
#define pe_flag_have_stonith_resource
node_t * pe_create_node(const char *id, const char *uname, const char *type, const char *score, pe_working_set_t *data_set)
gboolean safe_str_neq(const char *a, const char *b)
gint sort_rsc_priority(gconstpointer a, gconstpointer b)
gboolean determine_online_status(xmlNode *node_state, node_t *this_node, pe_working_set_t *data_set)
gboolean get_target_role(resource_t *rsc, enum rsc_role_e *role)
#define XML_NODE_IS_FENCED
#define XML_ATTR_TRANSITION_MAGIC
node_t * node_copy(const node_t *this_node)
#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)
#define pe_flag_enable_unfencing
#define pe_rsc_orphan_container_filler
int default_resource_stickiness
char * clone_strip(const char *last_rsc_id)
#define XML_ATTR_QUORUM_PANIC
#define XML_CONFIG_ATTR_PRIORITY_FENCING_DELAY
bool pe_can_fence(pe_working_set_t *data_set, node_t *node)
#define XML_TAG_UTILIZATION
#define pe_flag_have_remote_nodes
void(* free)(resource_t *)
bool container_fix_remote_addr(resource_t *rsc)
#define XML_RULE_ATTR_SCORE
#define XML_BOOLEAN_FALSE
#define crm_config_err(fmt...)
int get_target_rc(xmlNode *xml_op)
int priority_fencing_delay
enum action_fail_response on_fail
int char2score(const char *score)
#define pe_proc_warn(fmt...)
#define XML_TAG_TRANSIENT_NODEATTRS
#define CRMD_ACTION_NOTIFY
#define pe_flag_startup_probes
long long crm_get_msec(const char *input)
GListPtr find_actions(GListPtr input, const char *key, const node_t *on_node)
gboolean common_unpack(xmlNode *xml_obj, resource_t **rsc, resource_t *parent, pe_working_set_t *data_set)
enum pe_obj_types variant
#define XML_LRM_ATTR_INTERVAL
#define XML_LRM_TAG_RESOURCE
#define pe_flag_stop_rsc_orphans
const char * crm_xml_add(xmlNode *node, const char *name, const char *value)
Create an XML attribute with specified name and value.
node_t * partial_migration_source
#define CRMD_ACTION_PROMOTE
int crm_parse_int(const char *text, const char *default_text)
Parse an integer value from a string.
#define XML_NVPAIR_ATTR_NAME
#define XML_NODE_IS_MAINTENANCE
gint sort_op_by_callid(gconstpointer a, gconstpointer b)
#define XML_NODE_EXPECTED
node_t * pe_find_node(GListPtr node_list, const char *uname)
#define XML_CIB_TAG_RSC_TEMPLATE
time_t get_effective_time(pe_working_set_t *data_set)
no_quorum_policy_t no_quorum_policy
#define CRM_LOG_ASSERT(expr)
const char * pe_pref(GHashTable *options, const char *name)
resource_t * uber_parent(resource_t *rsc)
#define clear_bit(word, bit)
void copy_in_properties(xmlNode *target, xmlNode *src)
#define CRMD_JOINSTATE_NACK
#define CRM_ATTR_CLUSTER_NAME
#define pe_rsc_allow_migrate
int crm_element_value_int(const xmlNode *data, const char *name, int *dest)
Retrieve the integer value of an XML attribute.
#define XPATH_ENABLE_UNFENCING
xmlNode * get_xpath_object(const char *xpath, xmlNode *xml_obj, int error_level)
#define pe_proc_err(fmt...)
char * strndup(const char *str, size_t len)
#define XML_CIB_TAG_PROPSET
gboolean decode_transition_key(const char *key, char **uuid, int *action, int *transition_id, int *target_rc)
resource_t * find_container_child(const resource_t *bundle, const node_t *node)
#define XML_LRM_ATTR_RSCID
gboolean unpack_resources(xmlNode *xml_resources, pe_working_set_t *data_set)
#define CRMD_ACTION_START
#define XML_LRM_ATTR_TASK_KEY
#define XML_TAG_ATTR_SETS
#define XML_LRM_ATTR_TASK
const char * pe_base_name_end(const char *id)
const char * role2text(enum rsc_role_e role)
gboolean is_remote_node(node_t *node)
pe_node_t *(* location)(const pe_resource_t *, GList **, int)
struct node_shared_s * details
gboolean unpack_status(xmlNode *status, pe_working_set_t *data_set)
#define CRMD_JOINSTATE_DOWN
#define crm_warn(fmt, args...)
#define CRMD_ACTION_DEMOTE
#define set_bit(word, bit)
#define crm_atoi(text, default_text)
xmlNode * pe_create_remote_xml(xmlNode *parent, const char *uname, const char *container_id, const char *migrateable, const char *is_managed, const char *interval, const char *monitor_timeout, const char *start_timeout, const char *server, const char *port)
#define crm_debug(fmt, args...)
void native_add_running(resource_t *rsc, node_t *node, pe_working_set_t *data_set)
#define XML_RSC_ATTR_CONTAINER
const char * crm_element_value(const xmlNode *data, const char *name)
Retrieve the value of an XML attribute.
#define XML_CIB_TAG_RESOURCE
gboolean unpack_nodes(xmlNode *xml_nodes, pe_working_set_t *data_set)
#define XML_CIB_TAG_STATE
node_t * partial_migration_target
#define pe_flag_startup_fencing
resource_object_functions_t * fns
GHashTable * allowed_nodes
GHashTable * digest_cache
#define set_config_flag(data_set, option, flag)
#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
gboolean is_baremetal_remote_node(node_t *node)
#define pe_rsc_is_container
char * digest_secure_calc
gboolean unpack_remote_nodes(xmlNode *xml_resources, pe_working_set_t *data_set)
gboolean add_node_attrs(xmlNode *xml_obj, node_t *node, gboolean overwrite, pe_working_set_t *data_set)
gboolean is_container_remote_node(node_t *node)
xmlNode * add_node_copy(xmlNode *new_parent, xmlNode *xml_node)
const char * stonith_action
#define crm_log_xml_debug(xml, text)
bool pe__shutdown_requested(pe_node_t *node)
#define XML_TAG_META_SETS
Wrappers for and extensions to libxml2.
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)
char * clone_zero(const char *last_rsc_id)
action_t * custom_action(resource_t *rsc, char *key, const char *task, node_t *on_node, gboolean optional, gboolean foo, pe_working_set_t *data_set)
const char * pe_node_attribute_raw(pe_node_t *node, const char *name)
#define pe_flag_maintenance_mode
pe_resource_t * pe__create_clone_child(pe_resource_t *rsc, pe_working_set_t *data_set)
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.
#define XML_LRM_ATTR_MIGRATE_TARGET
#define CIB_OPTIONS_FIRST
#define XML_RSC_ATTR_REMOTE_NODE
#define XML_LRM_ATTR_RESTART_DIGEST
GListPtr dangling_migrations
void free_xml(xmlNode *child)
#define pe_flag_stop_everything
gboolean crm_str_eq(const char *a, const char *b, gboolean use_case)
const char * placement_strategy
int remote_reconnect_interval
gboolean remote_maintenance
#define crm_config_warn(fmt...)
#define XML_ATTR_TRANSITION_KEY
GHashTable * node_hash_from_list(GListPtr list)
gboolean xml_contains_remote_node(xmlNode *xml)
node_t * pe_find_node_any(GListPtr node_list, const char *id, const char *uname)
const char * fail2text(enum action_fail_response fail)
#define pe_flag_quick_location
#define pe_rsc_start_pending
#define XML_LRM_TAG_RESOURCES
#define crm_err(fmt, args...)
resource_t *(* find_rsc)(resource_t *parent, const char *search, node_t *node, int flags)
#define XML_CIB_TAG_TICKET_STATE
void resource_location(resource_t *rsc, node_t *node, int score, const char *tag, pe_working_set_t *data_set)
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.
ticket_t * ticket_new(const char *ticket_id, pe_working_set_t *data_set)
bool remote_id_conflict(const char *remote_name, pe_working_set_t *data)
enum rsc_role_e next_role
#define XML_ATTR_HAVE_WATCHDOG
#define XML_NODE_ATTR_RSC_DISCOVERY
int compare_version(const char *version1, const char *version2)
gboolean rsc_discovery_enabled
#define pe_flag_remove_after_stop
#define CRMD_ACTION_METADATA
#define pe_rsc_failure_ignored
#define XML_LRM_ATTR_CALLID
#define CRMD_ACTION_MIGRATE
#define XML_NVPAIR_ATTR_VALUE
enum rsc_role_e fail_role
gboolean remote_requires_reset
#define XML_ATTR_CRM_VERSION
#define XML_LRM_ATTR_OPSTATUS
gboolean unpack_lrm_resources(node_t *node, xmlNode *lrm_rsc_list, pe_working_set_t *data_set)
int pe_get_failcount(node_t *node, resource_t *rsc, time_t *last_failure, uint32_t flags, xmlNode *xml_op, pe_working_set_t *data_set)
#define CRMD_JOINSTATE_PENDING
enum pe_action_flags flags
GListPtr find_operations(const char *rsc, const char *node, gboolean active_filter, pe_working_set_t *data_set)
#define XML_NODE_JOIN_STATE
void pe_free_action(action_t *action)
#define pe_flag_have_quorum
void destroy_ticket(gpointer data)
#define XML_CIB_TAG_STATUS
#define XML_CIB_TAG_OBJ_REF
void unpack_instance_attributes(xmlNode *top, xmlNode *xml_obj, const char *set_name, GHashTable *node_hash, GHashTable *hash, const char *always_first, gboolean overwrite, crm_time_t *now)
#define pe_flag_is_managed_default
gboolean remote_was_fenced
#define XML_NODE_IN_CLUSTER
#define pe_flag_stop_action_orphans
gboolean crm_is_true(const char *s)
#define CRM_ATTR_SITE_NAME
void calculate_active_ops(GListPtr sorted_op_list, int *start_index, int *stop_index)
#define XML_CIB_TAG_GROUP
CRM_TRACE_INIT_DATA(pe_status)
#define XML_LRM_TAG_RSC_OP
#define pe_rsc_trace(rsc, fmt, args...)
#define pe_flag_symmetric_cluster
char * generate_op_key(const char *rsc_id, const char *op_type, int interval)
Generate an operation key.
gboolean unpack_tags(xmlNode *xml_tags, pe_working_set_t *data_set)
resource_t * pe_find_resource(GListPtr rsc_list, const char *id_rh)
#define safe_str_eq(a, b)
gboolean order_actions(action_t *lh_action, action_t *rh_action, enum pe_ordering order)
op_digest_cache_t * rsc_action_digest_cmp(resource_t *rsc, xmlNode *xml_op, node_t *node, pe_working_set_t *data_set)
char * crm_strdup_printf(char const *format,...) __attribute__((__format__(__printf__
#define XML_LRM_ATTR_MIGRATE_SOURCE
void freeXpathObject(xmlXPathObjectPtr xpathObj)
gint sort_node_uname(gconstpointer a, gconstpointer b)
#define XML_CIB_TAG_TICKETS
#define crm_info(fmt, args...)
char * digest_restart_calc
void g_hash_destroy_str(gpointer data)
GHashTable * template_rsc_sets
#define pe_flag_concurrent_fencing
#define pe_flag_start_failure_fatal
#define pe_flag_stonith_enabled
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)
enum crm_ais_msg_types type
#define pe_warn_once(pe_wo_bit, fmt...)
#define pe_rsc_info(rsc, fmt, args...)
#define CRMD_ACTION_STATUS