role 118 include/crm/pengine/common.h enum rsc_role_e text2role(const char *role); role 119 include/crm/pengine/common.h const char *role2text(enum rsc_role_e role); role 244 include/crm/pengine/internal.h extern gboolean get_target_role(resource_t * rsc, enum rsc_role_e *role); role 54 include/crm/pengine/rules.h gboolean test_rule(xmlNode * rule, GHashTable * node_hash, enum rsc_role_e role, crm_time_t * now); role 56 include/crm/pengine/rules.h gboolean pe_test_rule_re(xmlNode * rule, GHashTable * node_hash, enum rsc_role_e role, crm_time_t * now, role 59 include/crm/pengine/rules.h gboolean pe_test_rule_full(xmlNode * rule, GHashTable * node_hash, enum rsc_role_e role, crm_time_t * now, role 63 include/crm/pengine/rules.h enum rsc_role_e role, crm_time_t * now); role 66 include/crm/pengine/rules.h enum rsc_role_e role, crm_time_t * now, pe_re_match_data_t * re_match_data); role 69 include/crm/pengine/rules.h enum rsc_role_e role, crm_time_t * now, pe_match_data_t * match_data); role 294 include/crm/pengine/status.h enum rsc_role_e role; role 469 lib/common/xml.c xmlNode *role = NULL; role 471 lib/common/xml.c for (role = __xml_first_child(acl_top); role; role = __xml_next(role)) { role 472 lib/common/xml.c if (strcmp(XML_ACL_TAG_ROLE, (const char *)role->name) == 0) { role 473 lib/common/xml.c const char *role_id = crm_element_value(role, XML_ATTR_ID); role 477 lib/common/xml.c __xml_acl_parse_entry(acl_top, role, target); role 522 lib/pengine/clone.c enum rsc_role_e role = configured_role(rsc); role 524 lib/pengine/clone.c if(role == RSC_ROLE_SLAVE) { role 540 lib/pengine/clone.c enum rsc_role_e role = configured_role(rsc); role 542 lib/pengine/clone.c if (role == RSC_ROLE_STOPPED) { role 346 lib/pengine/common.c role2text(enum rsc_role_e role) role 348 lib/pengine/common.c switch (role) { role 360 lib/pengine/common.c CRM_CHECK(role >= RSC_ROLE_UNKNOWN, return RSC_ROLE_UNKNOWN_S); role 361 lib/pengine/common.c CRM_CHECK(role < RSC_ROLE_MAX, return RSC_ROLE_UNKNOWN_S); role 367 lib/pengine/common.c text2role(const char *role) role 369 lib/pengine/common.c CRM_ASSERT(role != NULL); role 370 lib/pengine/common.c if (safe_str_eq(role, RSC_ROLE_STOPPED_S)) { role 372 lib/pengine/common.c } else if (safe_str_eq(role, RSC_ROLE_STARTED_S)) { role 374 lib/pengine/common.c } else if (safe_str_eq(role, RSC_ROLE_SLAVE_S)) { role 376 lib/pengine/common.c } else if (safe_str_eq(role, RSC_ROLE_MASTER_S)) { role 378 lib/pengine/common.c } else if (safe_str_eq(role, RSC_ROLE_UNKNOWN_S)) { role 381 lib/pengine/common.c crm_err("Unknown role: %s", role); role 227 lib/pengine/complex.c const char *role = crm_element_value(op, "role"); role 230 lib/pengine/complex.c if (role == NULL || crm_str_eq(role, RSC_ROLE_STARTED_S, TRUE) role 231 lib/pengine/complex.c || crm_str_eq(role, RSC_ROLE_SLAVE_S, TRUE)) { role 232 lib/pengine/complex.c role = RSC_ROLE_UNKNOWN_S; role 235 lib/pengine/complex.c key = crm_concat(name, role, '-'); role 564 lib/pengine/complex.c (*rsc)->role = RSC_ROLE_STOPPED; role 225 lib/pengine/group.c enum rsc_role_e role = child_rsc->fns->state(child_rsc, current); role 227 lib/pengine/group.c if (role > group_role) { role 228 lib/pengine/group.c group_role = role; role 377 lib/pengine/native.c enum rsc_role_e role = rsc->role; role 379 lib/pengine/native.c if ((role == RSC_ROLE_STARTED) role 382 lib/pengine/native.c role = RSC_ROLE_SLAVE; role 384 lib/pengine/native.c return role; role 485 lib/pengine/native.c enum rsc_role_e role = native_displayable_role(rsc); role 551 lib/pengine/native.c if(role > RSC_ROLE_SLAVE && is_set(rsc->flags, pe_rsc_failed)) { role 552 lib/pengine/native.c offset += snprintf(buffer + offset, LINE_MAX - offset, "FAILED %s", role2text(role)); role 753 lib/pengine/native.c enum rsc_role_e role = rsc->next_role; role 756 lib/pengine/native.c role = rsc->role; role 758 lib/pengine/native.c pe_rsc_trace(rsc, "%s state: %s", rsc->id, role2text(role)); role 759 lib/pengine/native.c return role; role 41 lib/pengine/rules.c gboolean test_role_expression(xmlNode * expr, enum rsc_role_e role, crm_time_t * now); role 62 lib/pengine/rules.c test_rule(xmlNode * rule, GHashTable * node_hash, enum rsc_role_e role, crm_time_t * now) role 64 lib/pengine/rules.c return pe_test_rule_full(rule, node_hash, role, now, NULL); role 68 lib/pengine/rules.c pe_test_rule_re(xmlNode * rule, GHashTable * node_hash, enum rsc_role_e role, crm_time_t * now, pe_re_match_data_t * re_match_data) role 75 lib/pengine/rules.c return pe_test_rule_full(rule, node_hash, role, now, &match_data); role 79 lib/pengine/rules.c pe_test_rule_full(xmlNode * rule, GHashTable * node_hash, enum rsc_role_e role, crm_time_t * now, pe_match_data_t * match_data) role 97 lib/pengine/rules.c test = pe_test_expression_full(expr, node_hash, role, now, match_data); role 119 lib/pengine/rules.c test_expression(xmlNode * expr, GHashTable * node_hash, enum rsc_role_e role, crm_time_t * now) role 121 lib/pengine/rules.c return pe_test_expression_full(expr, node_hash, role, now, NULL); role 125 lib/pengine/rules.c pe_test_expression_re(xmlNode * expr, GHashTable * node_hash, enum rsc_role_e role, crm_time_t * now, pe_re_match_data_t * re_match_data) role 132 lib/pengine/rules.c return pe_test_expression_full(expr, node_hash, role, now, &match_data); role 136 lib/pengine/rules.c pe_test_expression_full(xmlNode * expr, GHashTable * node_hash, enum rsc_role_e role, crm_time_t * now, pe_match_data_t * match_data) role 143 lib/pengine/rules.c accept = pe_test_rule_full(expr, node_hash, role, now, match_data); role 160 lib/pengine/rules.c accept = test_role_expression(expr, role, now); role 225 lib/pengine/rules.c test_role_expression(xmlNode * expr, enum rsc_role_e role, crm_time_t * now) role 231 lib/pengine/rules.c if (role == RSC_ROLE_UNKNOWN) { role 239 lib/pengine/rules.c if (role > RSC_ROLE_STARTED) { role 244 lib/pengine/rules.c if (role < RSC_ROLE_SLAVE && role > RSC_ROLE_UNKNOWN) { role 249 lib/pengine/rules.c if (text2role(value) == role) { role 255 lib/pengine/rules.c if (role < RSC_ROLE_SLAVE && role > RSC_ROLE_UNKNOWN) { role 258 lib/pengine/rules.c } else if (text2role(value) != role) { role 1110 lib/pengine/unpack.c && rsc->role == RSC_ROLE_STARTED role 1111 lib/pengine/unpack.c && rsc->container->role == RSC_ROLE_STARTED) { role 1117 lib/pengine/unpack.c crm_trace("Checking node %s/%s/%s status %d/%d/%d", id, rsc->id, rsc->container->id, fence, rsc->role, RSC_ROLE_STARTED); role 1120 lib/pengine/unpack.c && rsc->role == RSC_ROLE_STARTED) { role 1122 lib/pengine/unpack.c crm_trace("Checking node %s/%s status %d/%d/%d", id, rsc->id, fence, rsc->role, RSC_ROLE_STARTED); role 1441 lib/pengine/unpack.c if (rsc->role == RSC_ROLE_STARTED) { role 1448 lib/pengine/unpack.c if (rsc->role == RSC_ROLE_STARTED && rsc->next_role == RSC_ROLE_STOPPED) { role 1466 lib/pengine/unpack.c } else if (rsc->role == RSC_ROLE_STOPPED role 1467 lib/pengine/unpack.c || (container && container->role == RSC_ROLE_STOPPED)) { role 1869 lib/pengine/unpack.c rsc->id, role2text(rsc->role), node->details->uname, fail2text(on_fail)); role 1872 lib/pengine/unpack.c if (rsc->role != RSC_ROLE_UNKNOWN) { role 1891 lib/pengine/unpack.c if (rsc->role > RSC_ROLE_STOPPED role 1982 lib/pengine/unpack.c if (rsc->role != RSC_ROLE_STOPPED && rsc->role != RSC_ROLE_UNKNOWN) { role 1993 lib/pengine/unpack.c } else if (rsc->role != RSC_ROLE_STOPPED && rsc->role != RSC_ROLE_UNKNOWN) { role 2017 lib/pengine/unpack.c if (rsc->role > RSC_ROLE_STOPPED) { role 2040 lib/pengine/unpack.c if (rsc->role != RSC_ROLE_STOPPED && rsc->role != RSC_ROLE_UNKNOWN) { role 2235 lib/pengine/unpack.c saved_role = rsc->role; role 2237 lib/pengine/unpack.c rsc->role = RSC_ROLE_UNKNOWN; role 2274 lib/pengine/unpack.c if (saved_role > rsc->role) { role 2275 lib/pengine/unpack.c rsc->role = saved_role; role 2360 lib/pengine/unpack.c rsc->role = RSC_ROLE_SLAVE; role 2362 lib/pengine/unpack.c rsc->role = RSC_ROLE_STARTED; role 2450 lib/pengine/unpack.c rsc->role = RSC_ROLE_STARTED; /* can be master? */ role 2467 lib/pengine/unpack.c rsc->role = RSC_ROLE_STOPPED; role 2527 lib/pengine/unpack.c rsc->role = RSC_ROLE_STARTED; /* can be master? */ role 2557 lib/pengine/unpack.c rsc->role = RSC_ROLE_STARTED; /* can be master? */ role 2662 lib/pengine/unpack.c rsc->role = RSC_ROLE_MASTER; role 2671 lib/pengine/unpack.c rsc->role = RSC_ROLE_MASTER; role 2675 lib/pengine/unpack.c rsc->role = RSC_ROLE_STOPPED; role 2679 lib/pengine/unpack.c rsc->role = RSC_ROLE_SLAVE; role 2691 lib/pengine/unpack.c rsc->role = RSC_ROLE_STOPPED; role 2693 lib/pengine/unpack.c } else if (rsc->role < RSC_ROLE_STARTED) { role 2699 lib/pengine/unpack.c rsc->id, role2text(rsc->role), role 2770 lib/pengine/unpack.c } else if (target_rc < 0 && interval > 0 && rsc->role == RSC_ROLE_MASTER) { role 2781 lib/pengine/unpack.c rsc->role = RSC_ROLE_STOPPED; role 2806 lib/pengine/unpack.c || rsc->role != RSC_ROLE_MASTER) { role 2808 lib/pengine/unpack.c if (rsc->role != RSC_ROLE_MASTER) { role 2813 lib/pengine/unpack.c rsc->role = RSC_ROLE_MASTER; role 2818 lib/pengine/unpack.c rsc->role = RSC_ROLE_MASTER; role 3013 lib/pengine/unpack.c rsc->role = RSC_ROLE_STOPPED; role 3025 lib/pengine/unpack.c if (rsc->role < RSC_ROLE_STARTED) { role 3030 lib/pengine/unpack.c rsc->role = RSC_ROLE_STARTED; role 3034 lib/pengine/unpack.c rsc->role = RSC_ROLE_STOPPED; role 3038 lib/pengine/unpack.c rsc->role = RSC_ROLE_MASTER; role 3043 lib/pengine/unpack.c rsc->role = RSC_ROLE_SLAVE; role 3046 lib/pengine/unpack.c rsc->role = RSC_ROLE_STARTED; role 3052 lib/pengine/unpack.c } else if (rsc->role < RSC_ROLE_STARTED) { role 3138 lib/pengine/unpack.c task_key, task, task_id, status, rc, node->details->uname, role2text(rsc->role)); role 3214 lib/pengine/unpack.c rsc->role = RSC_ROLE_MASTER; role 3305 lib/pengine/unpack.c pe_rsc_trace(rsc, "Resource %s after %s: role=%s, next=%s", rsc->id, task, role2text(rsc->role), role2text(rsc->next_role)); role 595 lib/pengine/utils.c pe_rsc_trace(rsc, "Check resource is already active: %s %s %s %s", rsc->id, action->uuid, role2text(rsc->next_role), role2text(rsc->role)); role 596 lib/pengine/utils.c if (rsc->fns->active(rsc, TRUE) == FALSE || rsc->next_role > rsc->role) { role 642 lib/pengine/utils.c const char *role = NULL; role 656 lib/pengine/utils.c role = crm_element_value(operation, "role"); role 664 lib/pengine/utils.c } else if (safe_str_neq(name, "monitor") || safe_str_neq(role, "Master")) { role 1690 lib/pengine/utils.c get_target_role(resource_t * rsc, enum rsc_role_e * role) role 1695 lib/pengine/utils.c CRM_CHECK(role != NULL, return FALSE); role 1721 lib/pengine/utils.c *role = local_role; role 648 pengine/constraints.c static gboolean unpack_rsc_location(xmlNode * xml_obj, resource_t * rsc_lh, const char * role, role 729 pengine/constraints.c unpack_rsc_location(xmlNode * xml_obj, resource_t * rsc_lh, const char * role, role 776 pengine/constraints.c if (role == NULL) { role 777 pengine/constraints.c role = crm_element_value(xml_obj, XML_RULE_ATTR_ROLE); role 780 pengine/constraints.c if (location && role) { role 781 pengine/constraints.c if (text2role(role) == RSC_ROLE_UNKNOWN) { role 782 pengine/constraints.c pe_err("Invalid constraint %s: Bad role %s", id, role); role 786 pengine/constraints.c enum rsc_role_e r = text2role(role); role 888 pengine/constraints.c const char *role; role 902 pengine/constraints.c role = crm_element_value(set, "role"); role 908 pengine/constraints.c unpack_rsc_location(location, resource, role, local_score, data_set, NULL); role 993 pengine/constraints.c const char *role = NULL; role 1008 pengine/constraints.c role = crm_element_value(rule_xml, XML_RULE_ATTR_ROLE); role 1012 pengine/constraints.c if (role != NULL && text2role(role) == RSC_ROLE_UNKNOWN) { role 1013 pengine/constraints.c pe_err("Bad role specified for %s: %s", rule_id, role); role 1045 pengine/constraints.c if (role != NULL) { role 1046 pengine/constraints.c crm_trace("Setting role filter: %s", role); role 1047 pengine/constraints.c location_rule->role_filter = text2role(role); role 2162 pengine/constraints.c const char *role = crm_element_value(set, "role"); role 2186 pengine/constraints.c rsc_colocation_new(set_id, NULL, local_score, resource, with, role, role, role 2200 pengine/constraints.c rsc_colocation_new(set_id, NULL, local_score, last, resource, role, role, role 2233 pengine/constraints.c rsc_colocation_new(set_id, NULL, local_score, resource, with, role, role, role 2659 pengine/constraints.c const char *role = NULL; role 2670 pengine/constraints.c role = crm_element_value(set, "role"); role 2678 pengine/constraints.c rsc_ticket_new(set_id, resource, ticket, role, loss_policy, data_set); role 56 pengine/group.c rsc->role = group_data->first_child->role; role 171 pengine/master.c enum rsc_role_e role = RSC_ROLE_UNKNOWN; role 173 pengine/master.c role = rsc->fns->state(rsc, FALSE); role 174 pengine/master.c crm_info("%s role: %s", rsc->id, role2text(role)); role 609 pengine/master.c if (rsc->role == RSC_ROLE_STARTED) { role 610 pengine/master.c rsc->role = RSC_ROLE_SLAVE; role 797 pengine/master.c } else if(child_rsc->role < RSC_ROLE_MASTER role 801 pengine/master.c child_rsc->id, role2text(child_rsc->role), role2text(child_rsc->next_role)); role 808 pengine/master.c child_rsc->id, role2text(child_rsc->role), chosen->details->uname); role 502 pengine/native.c } else if(rsc->next_role > rsc->role role 506 pengine/native.c rsc->id, role2text(rsc->role), role2text(rsc->next_role)); role 507 pengine/native.c rsc->next_role = rsc->role; role 521 pengine/native.c rsc->next_role = rsc->role; role 524 pengine/native.c } else if (rsc->role == RSC_ROLE_MASTER) { role 739 pengine/native.c switch (rsc->role) { role 815 pengine/native.c } else if (rsc->role == RSC_ROLE_MASTER) { role 845 pengine/native.c const char *role = NULL; role 859 pengine/native.c role = crm_element_value(operation, "role"); role 860 pengine/native.c if (role == NULL || text2role(role) != RSC_ROLE_STOPPED) { role 928 pengine/native.c key, role, role2text(rsc->next_role), crm_str(node_uname)); role 1152 pengine/native.c enum rsc_role_e role = RSC_ROLE_UNKNOWN; role 1167 pengine/native.c role2text(rsc->role), role2text(rsc->next_role)); role 1256 pengine/native.c } else if (rsc->role > RSC_ROLE_STARTED && current != NULL && chosen != NULL) { role 1266 pengine/native.c role2text(rsc->role), role2text(rsc->next_role)); role 1271 pengine/native.c role = rsc->role; role 1272 pengine/native.c while (role != RSC_ROLE_STOPPED) { role 1273 pengine/native.c next_role = rsc_state_matrix[role][RSC_ROLE_STOPPED]; role 1274 pengine/native.c pe_rsc_trace(rsc, "Down: Executing: %s->%s (%s)%s", role2text(role), role2text(next_role), role 1276 pengine/native.c if (rsc_action_matrix[role][next_role] (rsc, current, !need_stop, data_set) == FALSE) { role 1279 pengine/native.c role = next_role; role 1283 pengine/native.c while (rsc->role <= rsc->next_role && role != rsc->role && is_not_set(rsc->flags, pe_rsc_block)) { role 1284 pengine/native.c next_role = rsc_state_matrix[role][rsc->role]; role 1285 pengine/native.c pe_rsc_trace(rsc, "Up: Executing: %s->%s (%s)%s", role2text(role), role2text(next_role), role 1287 pengine/native.c if (rsc_action_matrix[role][next_role] (rsc, chosen, !need_stop, data_set) == FALSE) { role 1290 pengine/native.c role = next_role; role 1292 pengine/native.c role = rsc->role; role 1295 pengine/native.c while (role != rsc->next_role) { role 1296 pengine/native.c next_role = rsc_state_matrix[role][rsc->next_role]; role 1297 pengine/native.c pe_rsc_trace(rsc, "Role: Executing: %s->%s = (%s on %s)", role2text(role), role2text(next_role), rsc->id, chosen?chosen->details->uname:"NA"); role 1298 pengine/native.c if (rsc_action_matrix[role][next_role] (rsc, chosen, FALSE, data_set) == FALSE) { role 1301 pengine/native.c role = next_role; role 1364 pengine/native.c if (top->variant == pe_master || rsc->role > RSC_ROLE_SLAVE) { role 1778 pengine/native.c if (rsc_ticket->role_lh != RSC_ROLE_UNKNOWN && rsc_ticket->role_lh != rsc_lh->role) { role 1943 pengine/native.c then->rsc && (then->rsc->role == RSC_ROLE_MASTER)) { role 2207 pengine/native.c if(rsc->role > RSC_ROLE_STARTED || rsc->next_role > RSC_ROLE_SLAVE) { role 2215 pengine/native.c if(rsc->role == rsc->next_role) { role 2221 pengine/native.c details = crm_strdup_printf("%s -> %s %s", role2text(rsc->role), role2text(rsc->next_role), destination->details->uname); role 2225 pengine/native.c details = crm_strdup_printf("%s %s", role2text(rsc->role), origin->details->uname); role 2233 pengine/native.c details = crm_strdup_printf("%s %s", role2text(rsc->role), origin->details->uname); role 2241 pengine/native.c details = crm_strdup_printf("%s -> %s %s", origin->details->uname, destination->details->uname, role2text(rsc->role)); role 2249 pengine/native.c details = crm_strdup_printf("%s -> %s %s", role2text(rsc->role), role2text(rsc->next_role), origin->details->uname); role 2253 pengine/native.c details = crm_strdup_printf("%s %s -> %s %s", role2text(rsc->role), origin->details->uname, role2text(rsc->next_role), destination->details->uname); role 2324 pengine/native.c if (rsc->role == RSC_ROLE_STOPPED) { role 2329 pengine/native.c rsc->role = RSC_ROLE_STARTED; role 2341 pengine/native.c rsc->id, role2text(rsc->role), is_not_set(rsc->flags, role 2386 pengine/native.c if (rsc->role == rsc->next_role) { role 2406 pengine/native.c pe_rsc_info(rsc, "Leave %s\t(%s %s)", rsc->id, role2text(rsc->role), role 2474 pengine/native.c } else if (rsc->role == RSC_ROLE_MASTER) { role 2482 pengine/native.c } else if (rsc->role == RSC_ROLE_STOPPED && rsc->next_role > RSC_ROLE_STOPPED) { role 2918 pengine/native.c if(remote->role == RSC_ROLE_STOPPED) { role 3006 pengine/native.c } else if (rsc->role == RSC_ROLE_MASTER) { role 3010 pengine/native.c crm_debug("Probing %s on %s (%s) %d %p", rsc->id, node->details->uname, role2text(rsc->role), role 3020 pengine/native.c crm_trace("Probing %s on %s (%s) as %s", rsc->id, node->details->uname, role2text(rsc->role), top->id); role 465 pengine/notif.c pe_rsc_trace(rsc, "%s state: %s", rsc->id, role2text(rsc->role)); role 467 pengine/notif.c switch (rsc->role) { role 680 pengine/notif.c n_data->action, rsc->id, role2text(rsc->role), role2text(rsc->next_role)); role 686 pengine/notif.c if (rsc->role != RSC_ROLE_STOPPED) { role 253 pengine/pengine.c if (is_set(rsc->flags, pe_rsc_orphan) && rsc->role == RSC_ROLE_STOPPED) { role 699 tools/crm_resource_runtime.c enum rsc_role_e role = text2role(role_s); role 700 tools/crm_resource_runtime.c if(role == RSC_ROLE_UNKNOWN) { role 703 tools/crm_resource_runtime.c } else if(role == RSC_ROLE_STOPPED) { role 707 tools/crm_resource_runtime.c } else if(parent->variant == pe_master && role == RSC_ROLE_SLAVE) { role 199 tools/crm_simulate.c && rsc->role == RSC_ROLE_STOPPED) {