diff --git a/include/crm/msg_xml.h b/include/crm/msg_xml.h index a40dda5fce..caf68f7866 100644 --- a/include/crm/msg_xml.h +++ b/include/crm/msg_xml.h @@ -1,349 +1,350 @@ /* * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef XML_TAGS__H # define XML_TAGS__H #ifndef F_ORIG # define F_ORIG "src" #endif #ifndef F_SEQ # define F_SEQ "seq" #endif #ifndef F_SUBTYPE # define F_SUBTYPE "subt" #endif #ifndef F_TYPE # define F_TYPE "t" #endif #ifndef F_CLIENTNAME # define F_CLIENTNAME "cn" #endif #ifndef F_XML_TAGNAME # define F_XML_TAGNAME "__name__" #endif #ifndef T_CRM # define T_CRM "crmd" #endif #ifndef T_ATTRD # define T_ATTRD "attrd" #endif # define CIB_OPTIONS_FIRST "cib-bootstrap-options" # define F_CRM_DATA "crm_xml" # define F_CRM_TASK "crm_task" # define F_CRM_HOST_TO "crm_host_to" # define F_CRM_MSG_TYPE F_SUBTYPE # define F_CRM_SYS_TO "crm_sys_to" # define F_CRM_SYS_FROM "crm_sys_from" # define F_CRM_HOST_FROM F_ORIG # define F_CRM_REFERENCE XML_ATTR_REFERENCE # define F_CRM_VERSION XML_ATTR_VERSION # define F_CRM_ORIGIN "origin" # define F_CRM_USER "crm_user" # define F_CRM_JOIN_ID "join_id" # define F_CRM_ELECTION_ID "election-id" # define F_CRM_ELECTION_AGE_S "election-age-sec" # define F_CRM_ELECTION_AGE_US "election-age-nano-sec" # define F_CRM_ELECTION_OWNER "election-owner" # define F_CRM_TGRAPH "crm-tgraph" # define F_CRM_TGRAPH_INPUT "crm-tgraph-in" /*---- Common tags/attrs */ # define XML_DIFF_MARKER "__crm_diff_marker__" # define XML_ATTR_TAGNAME F_XML_TAGNAME # define XML_TAG_CIB "cib" # define XML_TAG_FAILED "failed" # define XML_ATTR_CRM_VERSION "crm_feature_set" # define XML_ATTR_DIGEST "digest" # define XML_ATTR_VALIDATION "validate-with" # define XML_ATTR_QUORUM_PANIC "no-quorum-panic" # define XML_ATTR_HAVE_QUORUM "have-quorum" # define XML_ATTR_EXPECTED_VOTES "expected-quorum-votes" # define XML_ATTR_GENERATION "epoch" # define XML_ATTR_GENERATION_ADMIN "admin_epoch" # define XML_ATTR_NUMUPDATES "num_updates" # define XML_ATTR_TIMEOUT "timeout" # define XML_ATTR_ORIGIN "crm-debug-origin" # define XML_ATTR_TSTAMP "crm-timestamp" # define XML_CIB_ATTR_WRITTEN "cib-last-written" # define XML_ATTR_VERSION "version" # define XML_ATTR_DESC "description" # define XML_ATTR_ID "id" # define XML_ATTR_IDREF "id-ref" # define XML_ATTR_ID_LONG "long-id" # define XML_ATTR_TYPE "type" # define XML_ATTR_FILTER_TYPE "type-filter" # define XML_ATTR_FILTER_ID "id-filter" # define XML_ATTR_FILTER_PRIORITY "priority-filter" # define XML_ATTR_VERBOSE "verbose" # define XML_ATTR_OP "op" # define XML_ATTR_DC "is_dc" # define XML_ATTR_DC_UUID "dc-uuid" # define XML_ATTR_UPDATE_ORIG "update-origin" # define XML_ATTR_UPDATE_CLIENT "update-client" # define XML_ATTR_UPDATE_USER "update-user" # define XML_BOOLEAN_TRUE "true" # define XML_BOOLEAN_FALSE "false" # define XML_BOOLEAN_YES XML_BOOLEAN_TRUE # define XML_BOOLEAN_NO XML_BOOLEAN_FALSE # define XML_TAG_OPTIONS "options" /*---- top level tags/attrs */ # define XML_MSG_TAG "crm_message" # define XML_MSG_TAG_DATA "msg_data" # define XML_ATTR_REQUEST "request" # define XML_ATTR_RESPONSE "response" # define XML_ATTR_UNAME "uname" # define XML_ATTR_UUID "id" # define XML_ATTR_REFERENCE "reference" # define XML_FAIL_TAG_RESOURCE "failed_resource" # define XML_FAILRES_ATTR_RESID "resource_id" # define XML_FAILRES_ATTR_REASON "reason" # define XML_FAILRES_ATTR_RESSTATUS "resource_status" # define XML_CRM_TAG_PING "ping_response" # define XML_PING_ATTR_STATUS "result" # define XML_PING_ATTR_SYSFROM "crm_subsystem" # define XML_TAG_FRAGMENT "cib_fragment" # define XML_ATTR_RESULT "result" # define XML_ATTR_SECTION "section" # define XML_FAIL_TAG_CIB "failed_update" # define XML_FAILCIB_ATTR_ID "id" # define XML_FAILCIB_ATTR_OBJTYPE "object_type" # define XML_FAILCIB_ATTR_OP "operation" # define XML_FAILCIB_ATTR_REASON "reason" /*---- CIB specific tags/attrs */ # define XML_CIB_TAG_SECTION_ALL "all" # define XML_CIB_TAG_CONFIGURATION "configuration" # define XML_CIB_TAG_STATUS "status" # define XML_CIB_TAG_RESOURCES "resources" # define XML_CIB_TAG_NODES "nodes" # define XML_CIB_TAG_DOMAINS "domains" # define XML_CIB_TAG_CONSTRAINTS "constraints" # define XML_CIB_TAG_CRMCONFIG "crm_config" # define XML_CIB_TAG_OPCONFIG "op_defaults" # define XML_CIB_TAG_RSCCONFIG "rsc_defaults" # define XML_CIB_TAG_ACLS "acls" # define XML_CIB_TAG_STATE "node_state" # define XML_CIB_TAG_NODE "node" # define XML_CIB_TAG_DOMAIN "domain" # define XML_CIB_TAG_CONSTRAINT "constraint" # define XML_CIB_TAG_NVPAIR "nvpair" # define XML_CIB_TAG_PROPSET "cluster_property_set" # define XML_TAG_ATTR_SETS "instance_attributes" # define XML_TAG_META_SETS "meta_attributes" # define XML_TAG_ATTRS "attributes" # define XML_TAG_PARAMS "parameters" # define XML_TAG_PARAM "param" # define XML_TAG_UTILIZATION "utilization" # define XML_TAG_RESOURCE_REF "resource_ref" # define XML_CIB_TAG_RESOURCE "primitive" # define XML_CIB_TAG_GROUP "group" # define XML_CIB_TAG_INCARNATION "clone" # define XML_CIB_TAG_MASTER "master" # define XML_CIB_TAG_RSC_TEMPLATE "template" # define XML_RSC_ATTR_RESTART "restart-type" # define XML_RSC_ATTR_ORDERED "ordered" # define XML_RSC_ATTR_INTERLEAVE "interleave" # define XML_RSC_ATTR_INCARNATION "clone" # define XML_RSC_ATTR_INCARNATION_MAX "clone-max" # define XML_RSC_ATTR_INCARNATION_NODEMAX "clone-node-max" # define XML_RSC_ATTR_MASTER_MAX "master-max" # define XML_RSC_ATTR_MASTER_NODEMAX "master-node-max" # define XML_RSC_ATTR_STATE "clone-state" # define XML_RSC_ATTR_MANAGED "is-managed" # define XML_RSC_ATTR_TARGET_ROLE "target-role" # define XML_RSC_ATTR_UNIQUE "globally-unique" # define XML_RSC_ATTR_NOTIFY "notify" # define XML_RSC_ATTR_STICKINESS "resource-stickiness" # define XML_RSC_ATTR_FAIL_STICKINESS "migration-threshold" # define XML_RSC_ATTR_FAIL_TIMEOUT "failure-timeout" # define XML_RSC_ATTR_MULTIPLE "multiple-active" # define XML_RSC_ATTR_PRIORITY "priority" +# define XML_RSC_ATTR_REQUIRES "requires" # define XML_OP_ATTR_ON_FAIL "on-fail" # define XML_OP_ATTR_START_DELAY "start-delay" # define XML_OP_ATTR_ALLOW_MIGRATE "allow-migrate" # define XML_OP_ATTR_ORIGIN "interval-origin" # define XML_OP_ATTR_PENDING "record-pending" # define XML_CIB_TAG_LRM "lrm" # define XML_LRM_TAG_RESOURCES "lrm_resources" # define XML_LRM_TAG_RESOURCE "lrm_resource" # define XML_LRM_TAG_AGENTS "lrm_agents" # define XML_LRM_TAG_AGENT "lrm_agent" # define XML_LRM_TAG_RSC_OP "lrm_rsc_op" # define XML_AGENT_ATTR_CLASS "class" # define XML_AGENT_ATTR_PROVIDER "provider" # define XML_LRM_TAG_ATTRIBUTES "attributes" # define XML_CIB_ATTR_REPLACE "replace" # define XML_CIB_ATTR_SOURCE "source" # define XML_CIB_ATTR_HEALTH "health" # define XML_CIB_ATTR_WEIGHT "weight" # define XML_CIB_ATTR_PRIORITY "priority" # define XML_CIB_ATTR_CLEAR "clear_on" # define XML_CIB_ATTR_SOURCE "source" # define XML_NODE_JOIN_STATE "join" # define XML_NODE_EXPECTED "expected" # define XML_NODE_IN_CLUSTER "in_ccm" # define XML_NODE_IS_PEER "crmd" # define XML_CIB_ATTR_SHUTDOWN "shutdown" # define XML_CIB_ATTR_STONITH "stonith" # define XML_LRM_ATTR_INTERVAL "interval" # define XML_LRM_ATTR_TASK "operation" # define XML_LRM_ATTR_TASK_KEY "operation_key" # define XML_LRM_ATTR_TARGET "on_node" # define XML_LRM_ATTR_TARGET_UUID "on_node_uuid" # define XML_LRM_ATTR_RSCID "rsc-id" # define XML_LRM_ATTR_OPSTATUS "op-status" # define XML_LRM_ATTR_RC "rc-code" # define XML_LRM_ATTR_CALLID "call-id" # define XML_LRM_ATTR_OP_DIGEST "op-digest" # define XML_LRM_ATTR_OP_RESTART "op-force-restart" # define XML_LRM_ATTR_RESTART_DIGEST "op-restart-digest" # define XML_LRM_ATTR_MIGRATE_SOURCE "migrate_source" # define XML_LRM_ATTR_MIGRATE_TARGET "migrate_target" # define XML_TAG_GRAPH "transition_graph" # define XML_GRAPH_TAG_RSC_OP "rsc_op" # define XML_GRAPH_TAG_PSEUDO_EVENT "pseudo_event" # define XML_GRAPH_TAG_CRM_EVENT "crm_event" # define XML_TAG_RULE "rule" # define XML_RULE_ATTR_SCORE "score" # define XML_RULE_ATTR_SCORE_ATTRIBUTE "score-attribute" # define XML_RULE_ATTR_SCORE_MANGLED "score-attribute-mangled" # define XML_RULE_ATTR_ROLE "role" # define XML_RULE_ATTR_RESULT "result" # define XML_RULE_ATTR_BOOLEAN_OP "boolean-op" # define XML_TAG_EXPRESSION "expression" # define XML_EXPR_ATTR_ATTRIBUTE "attribute" # define XML_EXPR_ATTR_OPERATION "operation" # define XML_EXPR_ATTR_VALUE "value" # define XML_EXPR_ATTR_TYPE "type" # define XML_CONS_TAG_RSC_DEPEND "rsc_colocation" # define XML_CONS_TAG_RSC_ORDER "rsc_order" # define XML_CONS_TAG_RSC_LOCATION "rsc_location" # define XML_CONS_TAG_RSC_TICKET "rsc_ticket" # define XML_CONS_TAG_RSC_SET "resource_set" # define XML_CONS_ATTR_SYMMETRICAL "symmetrical" # define XML_COLOC_ATTR_SOURCE "rsc" # define XML_COLOC_ATTR_SOURCE_ROLE "rsc-role" # define XML_COLOC_ATTR_TARGET "with-rsc" # define XML_COLOC_ATTR_TARGET_ROLE "with-rsc-role" # define XML_COLOC_ATTR_NODE_ATTR "node-attribute" # define XML_COLOC_ATTR_SOURCE_INSTANCE "rsc-instance" # define XML_COLOC_ATTR_TARGET_INSTANCE "with-rsc-instance" # define XML_ORDER_ATTR_FIRST "first" # define XML_ORDER_ATTR_THEN "then" # define XML_ORDER_ATTR_FIRST_ACTION "first-action" # define XML_ORDER_ATTR_THEN_ACTION "then-action" # define XML_ORDER_ATTR_FIRST_INSTANCE "first-instance" # define XML_ORDER_ATTR_THEN_INSTANCE "then-instance" # define XML_ORDER_ATTR_KIND "kind" # define XML_TICKET_ATTR_TICKET "ticket" # define XML_TICKET_ATTR_LOSS_POLICY "loss-policy" # define XML_NVPAIR_ATTR_NAME "name" # define XML_NVPAIR_ATTR_VALUE "value" # define XML_NODE_ATTR_STATE "state" # define XML_CONFIG_ATTR_DC_DEADTIME "dc-deadtime" # define XML_CONFIG_ATTR_ELECTION_FAIL "election-timeout" # define XML_CONFIG_ATTR_FORCE_QUIT "shutdown-escalation" # define XML_CONFIG_ATTR_RECHECK "cluster-recheck-interval" # define XML_CIB_TAG_GENERATION_TUPPLE "generation_tuple" # define XML_ATTR_TRANSITION_MAGIC "transition-magic" # define XML_ATTR_TRANSITION_KEY "transition-key" # define XML_ATTR_TE_NOWAIT "op_no_wait" # define XML_ATTR_TE_TARGET_RC "op_target_rc" # define XML_ATTR_TE_ALLOWFAIL "op_allow_fail" # define XML_ATTR_LRM_PROBE "lrm-is-probe" # define XML_TAG_TRANSIENT_NODEATTRS "transient_attributes" # define XML_TAG_DIFF_ADDED "diff-added" # define XML_TAG_DIFF_REMOVED "diff-removed" # define XML_ACL_TAG_USER "acl_user" # define XML_ACL_TAG_ROLE "acl_role" # define XML_ACL_TAG_ROLE_REF "role_ref" # define XML_ACL_TAG_READ "read" # define XML_ACL_TAG_WRITE "write" # define XML_ACL_TAG_DENY "deny" # define XML_ACL_ATTR_REF "ref" # define XML_ACL_ATTR_TAG "tag" # define XML_ACL_ATTR_XPATH "xpath" # define XML_ACL_ATTR_ATTRIBUTE "attribute" # define XML_CIB_TAG_TICKETS "tickets" # define XML_CIB_TAG_TICKET_STATE "ticket_state" # define XML_TAG_FENCING_TOPOLOGY "fencing-topology" # define XML_TAG_FENCING_LEVEL "fencing-level" # define XML_ATTR_STONITH_INDEX "index" # define XML_ATTR_STONITH_TARGET "target" # define XML_ATTR_STONITH_DEVICES "devices" # include # define ID(x) crm_element_value(x, XML_ATTR_ID) # define INSTANCE(x) crm_element_value(x, XML_CIB_ATTR_INSTANCE) # define TSTAMP(x) crm_element_value(x, XML_ATTR_TSTAMP) # define TYPE(x) crm_element_name(x) # define NAME(x) crm_element_value(x, XML_NVPAIR_ATTR_NAME) # define VALUE(x) crm_element_value(x, XML_NVPAIR_ATTR_VALUE) #endif diff --git a/include/crm/pengine/status.h b/include/crm/pengine/status.h index a3f53b8216..d8ab44bbbb 100644 --- a/include/crm/pengine/status.h +++ b/include/crm/pengine/status.h @@ -1,337 +1,340 @@ /* * Copyright (C) 2004 Andrew Beekhof * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef PENGINE_STATUS__H # define PENGINE_STATUS__H # include # include # include typedef struct node_s node_t; typedef struct pe_action_s action_t; typedef struct pe_action_s pe_action_t; typedef struct resource_s resource_t; typedef struct ticket_s ticket_t; typedef enum no_quorum_policy_e { no_quorum_freeze, no_quorum_stop, no_quorum_ignore, no_quorum_suicide } no_quorum_policy_t; enum node_type { node_ping, node_member }; enum pe_restart { pe_restart_restart, pe_restart_ignore }; enum pe_find { pe_find_renamed = 0x001, pe_find_clone = 0x004, pe_find_current = 0x008, pe_find_inactive = 0x010, }; # define pe_flag_have_quorum 0x00000001ULL # define pe_flag_symmetric_cluster 0x00000002ULL # define pe_flag_is_managed_default 0x00000004ULL # define pe_flag_maintenance_mode 0x00000008ULL # define pe_flag_stonith_enabled 0x00000010ULL # define pe_flag_have_stonith_resource 0x00000020ULL # define pe_flag_stop_rsc_orphans 0x00000100ULL # define pe_flag_stop_action_orphans 0x00000200ULL # define pe_flag_stop_everything 0x00000400ULL # define pe_flag_start_failure_fatal 0x00001000ULL # define pe_flag_remove_after_stop 0x00002000ULL # define pe_flag_startup_probes 0x00010000ULL # define pe_flag_have_status 0x00020000ULL typedef struct pe_working_set_s { xmlNode *input; crm_time_t *now; /* options extracted from the input */ char *dc_uuid; node_t *dc_node; const char *stonith_action; const char *placement_strategy; unsigned long long flags; int stonith_timeout; int default_resource_stickiness; no_quorum_policy_t no_quorum_policy; GHashTable *config_hash; GHashTable *domains; GHashTable *tickets; GListPtr nodes; GListPtr resources; GListPtr placement_constraints; GListPtr ordering_constraints; GListPtr colocation_constraints; GListPtr ticket_constraints; GListPtr actions; xmlNode *failed; xmlNode *op_defaults; xmlNode *rsc_defaults; /* stats */ int num_synapse; int max_valid_nodes; int order_id; int action_id; /* final output */ xmlNode *graph; GHashTable *template_rsc_sets; } pe_working_set_t; struct node_shared_s { const char *id; const char *uname; gboolean online; gboolean standby; gboolean standby_onfail; gboolean pending; gboolean unclean; gboolean shutdown; gboolean expected_up; gboolean is_dc; int num_resources; GListPtr running_rsc; /* resource_t* */ GListPtr allocated_rsc; /* resource_t* */ GHashTable *attrs; /* char* => char* */ enum node_type type; GHashTable *utilization; }; struct node_s { int weight; gboolean fixed; int count; struct node_shared_s *details; }; # include # define pe_rsc_orphan 0x00000001ULL # define pe_rsc_managed 0x00000002ULL # define pe_rsc_block 0x00000004ULL /* Further operations are prohibited due to failure policy */ # define pe_rsc_notify 0x00000010ULL # define pe_rsc_unique 0x00000020ULL # define pe_rsc_provisional 0x00000100ULL # define pe_rsc_allocating 0x00000200ULL # define pe_rsc_merging 0x00000400ULL # define pe_rsc_try_reload 0x00001000ULL # define pe_rsc_reload 0x00002000ULL # define pe_rsc_failed 0x00010000ULL # define pe_rsc_shutdown 0x00020000ULL # define pe_rsc_runnable 0x00040000ULL # define pe_rsc_start_pending 0x00080000ULL # define pe_rsc_starting 0x00100000ULL # define pe_rsc_stopping 0x00200000ULL # define pe_rsc_failure_ignored 0x01000000ULL +# define pe_rsc_needs_quorum 0x10000000ULL +# define pe_rsc_needs_fencing 0x20000000ULL + enum pe_graph_flags { pe_graph_none = 0x00000, pe_graph_updated_first = 0x00001, pe_graph_updated_then = 0x00002, pe_graph_disable = 0x00004, }; /* *INDENT-OFF* */ enum pe_action_flags { pe_action_pseudo = 0x00001, pe_action_runnable = 0x00002, pe_action_optional = 0x00004, pe_action_print_always = 0x00008, pe_action_have_node_attrs = 0x00010, pe_action_failure_is_fatal = 0x00020, pe_action_implied_by_stonith = 0x00040, pe_action_dumped = 0x00100, pe_action_processed = 0x00200, pe_action_clear = 0x00400, pe_action_dangle = 0x00800, pe_action_requires_any = 0x01000, /* This action requires one or mre of its dependancies to be runnable * We use this to clear the runnable flag before checking dependancies */ }; /* *INDENT-ON* */ struct resource_s { char *id; char *clone_name; xmlNode *xml; xmlNode *orig_xml; xmlNode *ops_xml; resource_t *parent; void *variant_opaque; enum pe_obj_types variant; resource_object_functions_t *fns; resource_alloc_functions_t *cmds; enum rsc_recovery_type recovery_type; enum pe_restart restart_type; int priority; int stickiness; int sort_index; int failure_timeout; int effective_priority; int migration_threshold; unsigned long long flags; GListPtr rsc_cons_lhs; /* rsc_colocation_t* */ GListPtr rsc_cons; /* rsc_colocation_t* */ GListPtr rsc_location; /* rsc_to_node_t* */ GListPtr actions; /* action_t* */ GListPtr rsc_tickets; /* rsc_ticket* */ node_t *allocated_to; GListPtr running_on; /* node_t* */ GHashTable *known_on; /* node_t* */ GHashTable *allowed_nodes; /* node_t* */ enum rsc_role_e role; enum rsc_role_e next_role; GHashTable *meta; GHashTable *parameters; GHashTable *utilization; GListPtr children; /* resource_t* */ GListPtr dangling_migrations; /* node_t* */ node_t *partial_migration_target; node_t *partial_migration_source; }; struct pe_action_s { int id; int priority; resource_t *rsc; node_t *node; xmlNode *op_entry; char *task; char *uuid; enum pe_action_flags flags; enum rsc_start_requirement needs; enum action_fail_response on_fail; enum rsc_role_e fail_role; action_t *pre_notify; action_t *pre_notified; action_t *post_notify; action_t *post_notified; int seen_count; GHashTable *meta; GHashTable *extra; GListPtr actions_before; /* action_warpper_t* */ GListPtr actions_after; /* action_warpper_t* */ }; struct ticket_s { char *id; gboolean granted; time_t last_granted; gboolean standby; GHashTable *state; }; enum pe_link_state { pe_link_not_dumped, pe_link_dumped, pe_link_dup, }; /* *INDENT-OFF* */ enum pe_ordering { pe_order_none = 0x0, /* deleted */ pe_order_optional = 0x1, /* pure ordering, nothing implied */ pe_order_implies_first = 0x10, /* If 'first' is required, ensure 'then' is too */ pe_order_implies_then = 0x20, /* If 'then' is required, ensure 'first' is too */ pe_order_implies_first_master = 0x40, /* Imply 'first' is required when 'then' is required and then's rsc holds Master role. */ pe_order_runnable_left = 0x100, /* 'then' requires 'first' to be runnable */ pe_order_restart = 0x1000, /* 'then' is runnable if 'first' is optional or runnable */ pe_order_stonith_stop = 0x2000, /* only applies if the action is non-pseudo */ pe_order_serialize_only = 0x4000, /* serialize */ pe_order_implies_first_printed = 0x10000, /* Like ..implies_first but only ensures 'first' is printed, not manditory */ pe_order_implies_then_printed = 0x20000, /* Like ..implies_then but only ensures 'then' is printed, not manditory */ pe_order_asymmetrical = 0x100000, /* Indicates asymmetrical one way ordering constraint. */ pe_order_load = 0x200000, /* Only relevant if... */ pe_order_one_or_more = 0x400000, /* 'then' is only runnable if one or more of it's dependancies are too */ pe_order_trace = 0x4000000 /* test marker */ }; /* *INDENT-ON* */ typedef struct action_wrapper_s action_wrapper_t; struct action_wrapper_s { enum pe_ordering type; enum pe_link_state state; action_t *action; }; gboolean cluster_status(pe_working_set_t * data_set); void set_working_set_defaults(pe_working_set_t * data_set); void cleanup_calculations(pe_working_set_t * data_set); resource_t *pe_find_resource(GListPtr rsc_list, const char *id_rh); node_t *pe_find_node(GListPtr node_list, const char *uname); node_t *pe_find_node_id(GListPtr node_list, const char *id); node_t *pe_find_node_any(GListPtr node_list, const char *id, const char *uname); GListPtr find_operations(const char *rsc, const char *node, gboolean active_filter, pe_working_set_t * data_set); #endif diff --git a/lib/pengine/complex.c b/lib/pengine/complex.c index 9a9a06db08..6a5c317b1c 100644 --- a/lib/pengine/complex.c +++ b/lib/pengine/complex.c @@ -1,671 +1,707 @@ /* * Copyright (C) 2004 Andrew Beekhof * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include extern xmlNode *get_object_root(const char *object_type, xmlNode * the_root); void populate_hash(xmlNode * nvpair_list, GHashTable * hash, const char **attrs, int attrs_length); resource_object_functions_t resource_class_functions[] = { { native_unpack, native_find_rsc, native_parameter, native_print, native_active, native_resource_state, native_location, native_free}, { group_unpack, native_find_rsc, native_parameter, group_print, group_active, group_resource_state, native_location, group_free}, { clone_unpack, native_find_rsc, native_parameter, clone_print, clone_active, clone_resource_state, native_location, clone_free}, { master_unpack, native_find_rsc, native_parameter, clone_print, clone_active, clone_resource_state, native_location, clone_free} }; enum pe_obj_types get_resource_type(const char *name) { if (safe_str_eq(name, XML_CIB_TAG_RESOURCE)) { return pe_native; } else if (safe_str_eq(name, XML_CIB_TAG_GROUP)) { return pe_group; } else if (safe_str_eq(name, XML_CIB_TAG_INCARNATION)) { return pe_clone; } else if (safe_str_eq(name, XML_CIB_TAG_MASTER)) { return pe_master; } return pe_unknown; } const char * get_resource_typename(enum pe_obj_types type) { switch (type) { case pe_native: return XML_CIB_TAG_RESOURCE; case pe_group: return XML_CIB_TAG_GROUP; case pe_clone: return XML_CIB_TAG_INCARNATION; case pe_master: return XML_CIB_TAG_MASTER; case pe_unknown: return "unknown"; } return ""; } static void dup_attr(gpointer key, gpointer value, gpointer user_data) { add_hash_param(user_data, key, value); } void get_meta_attributes(GHashTable * meta_hash, resource_t * rsc, node_t * node, pe_working_set_t * data_set) { GHashTable *node_hash = NULL; if (node) { node_hash = node->details->attrs; } if (rsc->xml) { xmlAttrPtr xIter = NULL; for (xIter = rsc->xml->properties; xIter; xIter = xIter->next) { const char *prop_name = (const char *)xIter->name; const char *prop_value = crm_element_value(rsc->xml, prop_name); add_hash_param(meta_hash, prop_name, prop_value); } } unpack_instance_attributes(data_set->input, rsc->xml, XML_TAG_META_SETS, node_hash, meta_hash, NULL, FALSE, data_set->now); /* populate from the regular attributes until the GUI can create * meta attributes */ unpack_instance_attributes(data_set->input, rsc->xml, XML_TAG_ATTR_SETS, node_hash, meta_hash, NULL, FALSE, data_set->now); /* set anything else based on the parent */ if (rsc->parent != NULL) { g_hash_table_foreach(rsc->parent->meta, dup_attr, meta_hash); } /* and finally check the defaults */ unpack_instance_attributes(data_set->input, data_set->rsc_defaults, XML_TAG_META_SETS, node_hash, meta_hash, NULL, FALSE, data_set->now); } void get_rsc_attributes(GHashTable * meta_hash, resource_t * rsc, node_t * node, pe_working_set_t * data_set) { GHashTable *node_hash = NULL; if (node) { node_hash = node->details->attrs; } unpack_instance_attributes(data_set->input, rsc->xml, XML_TAG_ATTR_SETS, node_hash, meta_hash, NULL, FALSE, data_set->now); /* set anything else based on the parent */ if (rsc->parent != NULL) { get_rsc_attributes(meta_hash, rsc->parent, node, data_set); } else { /* and finally check the defaults */ unpack_instance_attributes(data_set->input, data_set->rsc_defaults, XML_TAG_ATTR_SETS, node_hash, meta_hash, NULL, FALSE, data_set->now); } } static char * template_op_key(xmlNode * op) { const char *name = crm_element_value(op, "name"); const char *role = crm_element_value(op, "role"); char *key = NULL; if (role == NULL || crm_str_eq(role, RSC_ROLE_STARTED_S, TRUE) || crm_str_eq(role, RSC_ROLE_SLAVE_S, TRUE)) { role = RSC_ROLE_UNKNOWN_S; } key = crm_concat(name, role, '-'); return key; } static gboolean unpack_template(xmlNode * xml_obj, xmlNode ** expanded_xml, pe_working_set_t * data_set) { xmlNode *cib_resources = NULL; xmlNode *template = NULL; xmlNode *new_xml = NULL; xmlNode *child_xml = NULL; xmlNode *rsc_ops = NULL; xmlNode *template_ops = NULL; const char *template_ref = NULL; const char *id = NULL; if (xml_obj == NULL) { pe_err("No resource object for template unpacking"); return FALSE; } template_ref = crm_element_value(xml_obj, XML_CIB_TAG_RSC_TEMPLATE); if (template_ref == NULL) { return TRUE; } id = ID(xml_obj); if (id == NULL) { pe_err("'%s' object must have a id", crm_element_name(xml_obj)); return FALSE; } if (crm_str_eq(template_ref, id, TRUE)) { pe_err("The resource object '%s' should not reference itself", id); return FALSE; } cib_resources = get_object_root(XML_CIB_TAG_RESOURCES, data_set->input); if (cib_resources == NULL) { pe_err("Cannot get the root of object '%s'", XML_CIB_TAG_RESOURCES); return FALSE; } template = find_entity(cib_resources, XML_CIB_TAG_RSC_TEMPLATE, template_ref); if (template == NULL) { pe_err("No template named '%s'", template_ref); return FALSE; } new_xml = copy_xml(template); xmlNodeSetName(new_xml, xml_obj->name); crm_xml_replace(new_xml, XML_ATTR_ID, id); template_ops = find_xml_node(new_xml, "operations", FALSE); for (child_xml = __xml_first_child(xml_obj); child_xml != NULL; child_xml = __xml_next(child_xml)) { xmlNode *new_child = NULL; new_child = add_node_copy(new_xml, child_xml); if (crm_str_eq((const char *)new_child->name, "operations", TRUE)) { rsc_ops = new_child; } } if (template_ops && rsc_ops) { xmlNode *op = NULL; GHashTable *rsc_ops_hash = g_hash_table_new_full(crm_str_hash, g_str_equal, g_hash_destroy_str, NULL); for (op = __xml_first_child(rsc_ops); op != NULL; op = __xml_next(op)) { char *key = template_op_key(op); g_hash_table_insert(rsc_ops_hash, key, op); } for (op = __xml_first_child(template_ops); op != NULL; op = __xml_next(op)) { char *key = template_op_key(op); if (g_hash_table_lookup(rsc_ops_hash, key) == NULL) { add_node_copy(rsc_ops, op); } free(key); } if (rsc_ops_hash) { g_hash_table_destroy(rsc_ops_hash); } free_xml(template_ops); } /*free_xml(*expanded_xml); */ *expanded_xml = new_xml; /* Disable multi-level templates for now */ /*if(unpack_template(new_xml, expanded_xml, data_set) == FALSE) { free_xml(*expanded_xml); *expanded_xml = NULL; return FALSE; } */ return TRUE; } static gboolean add_template_rsc(xmlNode * xml_obj, pe_working_set_t * data_set) { const char *template_ref = NULL; const char *id = NULL; xmlNode *rsc_set = NULL; xmlNode *rsc_ref = NULL; if (xml_obj == NULL) { pe_err("No resource object for processing resource list of template"); return FALSE; } template_ref = crm_element_value(xml_obj, XML_CIB_TAG_RSC_TEMPLATE); if (template_ref == NULL) { return TRUE; } id = ID(xml_obj); if (id == NULL) { pe_err("'%s' object must have a id", crm_element_name(xml_obj)); return FALSE; } if (crm_str_eq(template_ref, id, TRUE)) { pe_err("The resource object '%s' should not reference itself", id); return FALSE; } rsc_set = g_hash_table_lookup(data_set->template_rsc_sets, template_ref); if (rsc_set == NULL) { rsc_set = create_xml_node(NULL, XML_CONS_TAG_RSC_SET); crm_xml_add(rsc_set, XML_ATTR_ID, template_ref); g_hash_table_insert(data_set->template_rsc_sets, strdup(template_ref), rsc_set); } rsc_ref = create_xml_node(rsc_set, XML_TAG_RESOURCE_REF); crm_xml_add(rsc_ref, XML_ATTR_ID, id); return TRUE; } gboolean common_unpack(xmlNode * xml_obj, resource_t ** rsc, resource_t * parent, pe_working_set_t * data_set) { xmlNode *expanded_xml = NULL; xmlNode *ops = NULL; resource_t *top = NULL; const char *value = NULL; const char *id = crm_element_value(xml_obj, XML_ATTR_ID); const char *class = crm_element_value(xml_obj, XML_AGENT_ATTR_CLASS); crm_log_xml_trace(xml_obj, "Processing resource input..."); if (id == NULL) { pe_err("Must specify id tag in "); return FALSE; } else if (rsc == NULL) { pe_err("Nowhere to unpack resource into"); return FALSE; } if (unpack_template(xml_obj, &expanded_xml, data_set) == FALSE) { return FALSE; } *rsc = calloc(1, sizeof(resource_t)); if (expanded_xml) { crm_log_xml_trace(expanded_xml, "Expanded resource..."); (*rsc)->xml = expanded_xml; (*rsc)->orig_xml = xml_obj; } else { (*rsc)->xml = xml_obj; (*rsc)->orig_xml = NULL; } (*rsc)->parent = parent; ops = find_xml_node((*rsc)->xml, "operations", FALSE); (*rsc)->ops_xml = expand_idref(ops, data_set->input); (*rsc)->variant = get_resource_type(crm_element_name(xml_obj)); if ((*rsc)->variant == pe_unknown) { pe_err("Unknown resource type: %s", crm_element_name(xml_obj)); free(*rsc); return FALSE; } (*rsc)->parameters = g_hash_table_new_full(crm_str_hash, g_str_equal, g_hash_destroy_str, g_hash_destroy_str); (*rsc)->meta = g_hash_table_new_full(crm_str_hash, g_str_equal, g_hash_destroy_str, g_hash_destroy_str); (*rsc)->allowed_nodes = g_hash_table_new_full(crm_str_hash, g_str_equal, NULL, g_hash_destroy_str); (*rsc)->known_on = g_hash_table_new_full(crm_str_hash, g_str_equal, NULL, g_hash_destroy_str); value = crm_element_value(xml_obj, XML_RSC_ATTR_INCARNATION); if (value) { (*rsc)->id = crm_concat(id, value, ':'); add_hash_param((*rsc)->meta, XML_RSC_ATTR_INCARNATION, value); } else { (*rsc)->id = strdup(id); } (*rsc)->fns = &resource_class_functions[(*rsc)->variant]; pe_rsc_trace((*rsc), "Unpacking resource..."); get_meta_attributes((*rsc)->meta, *rsc, NULL, data_set); (*rsc)->flags = 0; set_bit((*rsc)->flags, pe_rsc_runnable); set_bit((*rsc)->flags, pe_rsc_provisional); if (is_set(data_set->flags, pe_flag_is_managed_default)) { set_bit((*rsc)->flags, pe_rsc_managed); } (*rsc)->rsc_cons = NULL; (*rsc)->rsc_tickets = NULL; (*rsc)->actions = NULL; (*rsc)->role = RSC_ROLE_STOPPED; (*rsc)->next_role = RSC_ROLE_UNKNOWN; (*rsc)->recovery_type = recovery_stop_start; (*rsc)->stickiness = data_set->default_resource_stickiness; (*rsc)->migration_threshold = INFINITY; (*rsc)->failure_timeout = 0; value = g_hash_table_lookup((*rsc)->meta, XML_CIB_ATTR_PRIORITY); (*rsc)->priority = crm_parse_int(value, "0"); (*rsc)->effective_priority = (*rsc)->priority; value = g_hash_table_lookup((*rsc)->meta, XML_RSC_ATTR_NOTIFY); if (crm_is_true(value)) { set_bit((*rsc)->flags, pe_rsc_notify); } value = g_hash_table_lookup((*rsc)->meta, XML_RSC_ATTR_MANAGED); if (value != NULL && safe_str_neq("default", value)) { gboolean bool_value = TRUE; crm_str_to_boolean(value, &bool_value); if (bool_value == FALSE) { clear_bit((*rsc)->flags, pe_rsc_managed); } else { set_bit((*rsc)->flags, pe_rsc_managed); } } if (is_set(data_set->flags, pe_flag_maintenance_mode)) { clear_bit((*rsc)->flags, pe_rsc_managed); } pe_rsc_trace((*rsc), "Options for %s", (*rsc)->id); value = g_hash_table_lookup((*rsc)->meta, XML_RSC_ATTR_UNIQUE); top = uber_parent(*rsc); if (crm_is_true(value) || top->variant < pe_clone) { set_bit((*rsc)->flags, pe_rsc_unique); } value = g_hash_table_lookup((*rsc)->meta, XML_RSC_ATTR_RESTART); if (safe_str_eq(value, "restart")) { (*rsc)->restart_type = pe_restart_restart; pe_rsc_trace((*rsc), "\tDependency restart handling: restart"); } else { (*rsc)->restart_type = pe_restart_ignore; pe_rsc_trace((*rsc), "\tDependency restart handling: ignore"); } value = g_hash_table_lookup((*rsc)->meta, XML_RSC_ATTR_MULTIPLE); if (safe_str_eq(value, "stop_only")) { (*rsc)->recovery_type = recovery_stop_only; pe_rsc_trace((*rsc), "\tMultiple running resource recovery: stop only"); } else if (safe_str_eq(value, "block")) { (*rsc)->recovery_type = recovery_block; pe_rsc_trace((*rsc), "\tMultiple running resource recovery: block"); } else { (*rsc)->recovery_type = recovery_stop_start; pe_rsc_trace((*rsc), "\tMultiple running resource recovery: stop/start"); } value = g_hash_table_lookup((*rsc)->meta, XML_RSC_ATTR_STICKINESS); if (value != NULL && safe_str_neq("default", value)) { (*rsc)->stickiness = char2score(value); } value = g_hash_table_lookup((*rsc)->meta, XML_RSC_ATTR_FAIL_STICKINESS); if (value != NULL && safe_str_neq("default", value)) { (*rsc)->migration_threshold = char2score(value); } else if (value == NULL) { /* Make a best-effort guess at a migration threshold for people with 0.6 configs * try with underscores and hyphens, from both the resource and global defaults section */ value = g_hash_table_lookup((*rsc)->meta, "resource-failure-stickiness"); if (value == NULL) { value = g_hash_table_lookup((*rsc)->meta, "resource_failure_stickiness"); } if (value == NULL) { value = g_hash_table_lookup(data_set->config_hash, "default-resource-failure-stickiness"); } if (value == NULL) { value = g_hash_table_lookup(data_set->config_hash, "default_resource_failure_stickiness"); } if (value) { int fail_sticky = char2score(value); if (fail_sticky == -INFINITY) { (*rsc)->migration_threshold = 1; pe_rsc_info((*rsc), "Set a migration threshold of %d for %s based on a failure-stickiness of %s", (*rsc)->migration_threshold, (*rsc)->id, value); } else if ((*rsc)->stickiness != 0 && fail_sticky != 0) { (*rsc)->migration_threshold = (*rsc)->stickiness / fail_sticky; if ((*rsc)->migration_threshold < 0) { /* Make sure it's positive */ (*rsc)->migration_threshold = 0 - (*rsc)->migration_threshold; } (*rsc)->migration_threshold += 1; pe_rsc_info((*rsc), "Calculated a migration threshold for %s of %d based on a stickiness of %d/%s", (*rsc)->id, (*rsc)->migration_threshold, (*rsc)->stickiness, value); } } } + value = g_hash_table_lookup((*rsc)->meta, XML_RSC_ATTR_REQUIRES); + if (safe_str_eq(class, "stonith")) { + value = "nothing (fencing device)"; + + } else if (safe_str_eq(value, "nothing")) { + + } else if (safe_str_eq(value, "quorum")) { + set_bit((*rsc)->flags, pe_rsc_needs_quorum); + + } else if (is_set(data_set->flags, pe_flag_stonith_enabled) /* TODO: Drop this condition */ + && safe_str_eq(value, "fencing")) { + set_bit((*rsc)->flags, pe_rsc_needs_fencing); + + } else { + if (value) { + crm_config_err("Invalid value for %s->requires: %s%s", + (*rsc)->id, value, + is_set(data_set->flags, + pe_flag_stonith_enabled) ? "" : " (stonith-enabled=false)"); + } + + if (is_set(data_set->flags, pe_flag_stonith_enabled)) { + set_bit((*rsc)->flags, pe_rsc_needs_fencing); + value = "fencing (default)"; + + } else if (data_set->no_quorum_policy == no_quorum_ignore) { + value = "nothing (default)"; + + } else { + set_bit((*rsc)->flags, pe_rsc_needs_quorum); + value = "quorum (default)"; + } + } + + pe_rsc_trace((*rsc), "\tRequired to start: %s", value); + value = g_hash_table_lookup((*rsc)->meta, XML_RSC_ATTR_FAIL_TIMEOUT); if (value != NULL) { /* call crm_get_msec() and convert back to seconds */ (*rsc)->failure_timeout = (crm_get_msec(value) / 1000); } get_target_role(*rsc, &((*rsc)->next_role)); pe_rsc_trace((*rsc), "\tDesired next state: %s", (*rsc)->next_role != RSC_ROLE_UNKNOWN ? role2text((*rsc)->next_role) : "default"); if ((*rsc)->fns->unpack(*rsc, data_set) == FALSE) { return FALSE; } if (is_set(data_set->flags, pe_flag_symmetric_cluster)) { resource_location(*rsc, NULL, 0, "symmetric_default", data_set); } pe_rsc_trace((*rsc), "\tAction notification: %s", is_set((*rsc)->flags, pe_rsc_notify) ? "required" : "not required"); if (safe_str_eq(class, "stonith")) { set_bit(data_set->flags, pe_flag_have_stonith_resource); } (*rsc)->utilization = g_hash_table_new_full(crm_str_hash, g_str_equal, g_hash_destroy_str, g_hash_destroy_str); unpack_instance_attributes(data_set->input, (*rsc)->xml, XML_TAG_UTILIZATION, NULL, (*rsc)->utilization, NULL, FALSE, data_set->now); /* data_set->resources = g_list_append(data_set->resources, (*rsc)); */ if (expanded_xml) { if (add_template_rsc(xml_obj, data_set) == FALSE) { return FALSE; } } return TRUE; } void common_update_score(resource_t * rsc, const char *id, int score) { node_t *node = NULL; node = pe_hash_table_lookup(rsc->allowed_nodes, id); if (node != NULL) { pe_rsc_trace(rsc, "Updating score for %s on %s: %d + %d", rsc->id, id, node->weight, score); node->weight = merge_weights(node->weight, score); } if (rsc->children) { GListPtr gIter = rsc->children; for (; gIter != NULL; gIter = gIter->next) { resource_t *child_rsc = (resource_t *) gIter->data; common_update_score(child_rsc, id, score); } } } resource_t * uber_parent(resource_t * rsc) { resource_t *parent = rsc; if (parent == NULL) { return NULL; } while (parent->parent != NULL) { parent = parent->parent; } return parent; } void common_free(resource_t * rsc) { if (rsc == NULL) { return; } pe_rsc_trace(rsc, "Freeing %s %d", rsc->id, rsc->variant); g_list_free(rsc->rsc_cons); g_list_free(rsc->rsc_cons_lhs); g_list_free(rsc->rsc_tickets); g_list_free(rsc->dangling_migrations); if (rsc->parameters != NULL) { g_hash_table_destroy(rsc->parameters); } if (rsc->meta != NULL) { g_hash_table_destroy(rsc->meta); } if (rsc->utilization != NULL) { g_hash_table_destroy(rsc->utilization); } if (rsc->orig_xml) { free_xml(rsc->xml); } if (rsc->parent == NULL && is_set(rsc->flags, pe_rsc_orphan)) { if (rsc->orig_xml) { free_xml(rsc->orig_xml); } else { free_xml(rsc->xml); } } if (rsc->running_on) { g_list_free(rsc->running_on); rsc->running_on = NULL; } if (rsc->known_on) { g_hash_table_destroy(rsc->known_on); rsc->known_on = NULL; } if (rsc->actions) { g_list_free(rsc->actions); rsc->actions = NULL; } if (rsc->allowed_nodes) { g_hash_table_destroy(rsc->allowed_nodes); rsc->allowed_nodes = NULL; } g_list_free(rsc->rsc_location); pe_rsc_trace(rsc, "Resource freed"); free(rsc->id); free(rsc->clone_name); free(rsc->allocated_to); free(rsc->variant_opaque); free(rsc); } diff --git a/lib/pengine/utils.c b/lib/pengine/utils.c index 70eec1682e..1bb89a1787 100644 --- a/lib/pengine/utils.c +++ b/lib/pengine/utils.c @@ -1,1505 +1,1495 @@ /* * Copyright (C) 2004 Andrew Beekhof * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include pe_working_set_t *pe_dataset = NULL; extern xmlNode *get_object_root(const char *object_type, xmlNode * the_root); void print_str_str(gpointer key, gpointer value, gpointer user_data); gboolean ghash_free_str_str(gpointer key, gpointer value, gpointer user_data); void unpack_operation(action_t * action, xmlNode * xml_obj, pe_working_set_t * data_set); static xmlNode *find_rsc_op_entry_helper(resource_t * rsc, const char *key, gboolean include_disabled); node_t * node_copy(node_t * this_node) { node_t *new_node = NULL; CRM_CHECK(this_node != NULL, return NULL); new_node = calloc(1, sizeof(node_t)); CRM_ASSERT(new_node != NULL); crm_trace("Copying %p (%s) to %p", this_node, this_node->details->uname, new_node); new_node->weight = this_node->weight; new_node->fixed = this_node->fixed; new_node->details = this_node->details; return new_node; } /* any node in list1 or list2 and not in the other gets a score of -INFINITY */ void node_list_exclude(GHashTable * hash, GListPtr list, gboolean merge_scores) { GHashTable *result = hash; node_t *other_node = NULL; GListPtr gIter = list; GHashTableIter iter; node_t *node = NULL; g_hash_table_iter_init(&iter, hash); while (g_hash_table_iter_next(&iter, NULL, (void **)&node)) { other_node = pe_find_node_id(list, node->details->id); if (other_node == NULL) { node->weight = -INFINITY; } else if (merge_scores) { node->weight = merge_weights(node->weight, other_node->weight); } } for (; gIter != NULL; gIter = gIter->next) { node_t *node = (node_t *) gIter->data; other_node = pe_hash_table_lookup(result, node->details->id); if (other_node == NULL) { node_t *new_node = node_copy(node); new_node->weight = -INFINITY; g_hash_table_insert(result, (gpointer) new_node->details->id, new_node); } } } GHashTable * node_hash_from_list(GListPtr list) { GListPtr gIter = list; GHashTable *result = g_hash_table_new_full(crm_str_hash, g_str_equal, NULL, g_hash_destroy_str); for (; gIter != NULL; gIter = gIter->next) { node_t *node = (node_t *) gIter->data; node_t *n = node_copy(node); g_hash_table_insert(result, (gpointer) n->details->id, n); } return result; } GListPtr node_list_dup(GListPtr list1, gboolean reset, gboolean filter) { GListPtr result = NULL; GListPtr gIter = list1; for (; gIter != NULL; gIter = gIter->next) { node_t *new_node = NULL; node_t *this_node = (node_t *) gIter->data; if (filter && this_node->weight < 0) { continue; } new_node = node_copy(this_node); if (reset) { new_node->weight = 0; } if (new_node != NULL) { result = g_list_prepend(result, new_node); } } return result; } gint sort_node_uname(gconstpointer a, gconstpointer b) { const node_t *node_a = a; const node_t *node_b = b; return strcmp(node_a->details->uname, node_b->details->uname); } void dump_node_scores_worker(int level, const char *file, const char *function, int line, resource_t * rsc, const char *comment, GHashTable * nodes) { GHashTable *hash = nodes; GHashTableIter iter; node_t *node = NULL; if (rsc) { hash = rsc->allowed_nodes; } if (rsc && is_set(rsc->flags, pe_rsc_orphan)) { /* Don't show the allocation scores for orphans */ return; } if (level == 0) { /* For now we want this in sorted order to keep the regression tests happy */ GListPtr gIter = NULL; GListPtr list = g_hash_table_get_values(hash); list = g_list_sort(list, sort_node_uname); gIter = list; for (; gIter != NULL; gIter = gIter->next) { node_t *node = (node_t *) gIter->data; char *score = score2char(node->weight); if (rsc) { printf("%s: %s allocation score on %s: %s\n", comment, rsc->id, node->details->uname, score); } else { printf("%s: %s = %s\n", comment, node->details->uname, score); } free(score); } g_list_free(list); } else if (hash) { g_hash_table_iter_init(&iter, hash); while (g_hash_table_iter_next(&iter, NULL, (void **)&node)) { char *score = score2char(node->weight); if (rsc) { do_crm_log_alias(LOG_TRACE, file, function, line, "%s: %s allocation score on %s: %s", comment, rsc->id, node->details->uname, score); } else { do_crm_log_alias(LOG_TRACE, file, function, line + 1, "%s: %s = %s", comment, node->details->uname, score); } free(score); } } if (rsc && rsc->children) { GListPtr gIter = NULL; gIter = rsc->children; for (; gIter != NULL; gIter = gIter->next) { resource_t *child = (resource_t *) gIter->data; dump_node_scores_worker(level, file, function, line, child, comment, nodes); } } } static void append_dump_text(gpointer key, gpointer value, gpointer user_data) { char **dump_text = user_data; int len = 0; char *new_text = NULL; len = strlen(*dump_text) + strlen(" ") + strlen(key) + strlen("=") + strlen(value) + 1; new_text = calloc(1, len); sprintf(new_text, "%s %s=%s", *dump_text, (char *)key, (char *)value); free(*dump_text); *dump_text = new_text; } void dump_node_capacity(int level, const char *comment, node_t * node) { int len = 0; char *dump_text = NULL; len = strlen(comment) + strlen(": ") + strlen(node->details->uname) + strlen(" capacity:") + 1; dump_text = calloc(1, len); sprintf(dump_text, "%s: %s capacity:", comment, node->details->uname); g_hash_table_foreach(node->details->utilization, append_dump_text, &dump_text); if (level == 0) { fprintf(stdout, "%s\n", dump_text); } else { crm_trace("%s", dump_text); } free(dump_text); } void dump_rsc_utilization(int level, const char *comment, resource_t * rsc, node_t * node) { int len = 0; char *dump_text = NULL; len = strlen(comment) + strlen(": ") + strlen(rsc->id) + strlen(" utilization on ") + strlen(node->details->uname) + strlen(":") + 1; dump_text = calloc(1, len); sprintf(dump_text, "%s: %s utilization on %s:", comment, rsc->id, node->details->uname); g_hash_table_foreach(rsc->utilization, append_dump_text, &dump_text); if (level == 0) { fprintf(stdout, "%s\n", dump_text); } else { crm_trace("%s", dump_text); } free(dump_text); } gint sort_rsc_index(gconstpointer a, gconstpointer b) { const resource_t *resource1 = (const resource_t *)a; const resource_t *resource2 = (const resource_t *)b; if (a == NULL && b == NULL) { return 0; } if (a == NULL) { return 1; } if (b == NULL) { return -1; } if (resource1->sort_index > resource2->sort_index) { return -1; } if (resource1->sort_index < resource2->sort_index) { return 1; } return 0; } gint sort_rsc_priority(gconstpointer a, gconstpointer b) { const resource_t *resource1 = (const resource_t *)a; const resource_t *resource2 = (const resource_t *)b; if (a == NULL && b == NULL) { return 0; } if (a == NULL) { return 1; } if (b == NULL) { return -1; } if (resource1->priority > resource2->priority) { return -1; } if (resource1->priority < resource2->priority) { return 1; } return 0; } action_t * custom_action(resource_t * rsc, char *key, const char *task, node_t * on_node, gboolean optional, gboolean save_action, pe_working_set_t * data_set) { action_t *action = NULL; GListPtr possible_matches = NULL; CRM_CHECK(key != NULL, return NULL); CRM_CHECK(task != NULL, return NULL); if (save_action && rsc != NULL) { possible_matches = find_actions(rsc->actions, key, on_node); } if (possible_matches != NULL) { if (g_list_length(possible_matches) > 1) { pe_warn("Action %s for %s on %s exists %d times", task, rsc ? rsc->id : "", on_node ? on_node->details->uname : "", g_list_length(possible_matches)); } action = g_list_nth_data(possible_matches, 0); pe_rsc_trace(rsc, "Found existing action (%d) %s for %s on %s", action->id, task, rsc ? rsc->id : "", on_node ? on_node->details->uname : ""); g_list_free(possible_matches); } if (action == NULL) { if (save_action) { pe_rsc_trace(rsc, "Creating%s action %d: %s for %s on %s", optional ? "" : " manditory", data_set->action_id, key, rsc ? rsc->id : "", on_node ? on_node->details->uname : ""); } action = calloc(1, sizeof(action_t)); if (save_action) { action->id = data_set->action_id++; } else { action->id = 0; } action->rsc = rsc; CRM_ASSERT(task != NULL); action->task = strdup(task); if (on_node) { action->node = node_copy(on_node); } action->uuid = strdup(key); pe_set_action_bit(action, pe_action_failure_is_fatal); pe_set_action_bit(action, pe_action_runnable); if (optional) { pe_set_action_bit(action, pe_action_optional); } else { pe_clear_action_bit(action, pe_action_optional); } /* Implied by calloc()... action->actions_before = NULL; action->actions_after = NULL; action->pseudo = FALSE; action->dumped = FALSE; action->processed = FALSE; action->seen_count = 0; */ action->extra = g_hash_table_new_full(crm_str_hash, g_str_equal, free, free); action->meta = g_hash_table_new_full(crm_str_hash, g_str_equal, free, free); if (save_action) { data_set->actions = g_list_prepend(data_set->actions, action); } if (rsc != NULL) { action->op_entry = find_rsc_op_entry_helper(rsc, key, TRUE); unpack_operation(action, action->op_entry, data_set); if (save_action) { rsc->actions = g_list_prepend(rsc->actions, action); } } if (save_action) { pe_rsc_trace(rsc, "Action %d created", action->id); } } if (optional == FALSE) { pe_rsc_trace(rsc, "Action %d (%s) marked manditory", action->id, action->uuid); pe_clear_action_bit(action, pe_action_optional); } if (rsc != NULL) { enum action_tasks a_task = text2task(action->task); int warn_level = LOG_TRACE; if (save_action) { warn_level = LOG_WARNING; } if (is_set(action->flags, pe_action_have_node_attrs) == FALSE && action->node != NULL && action->op_entry != NULL) { pe_set_action_bit(action, pe_action_have_node_attrs); unpack_instance_attributes(data_set->input, action->op_entry, XML_TAG_ATTR_SETS, action->node->details->attrs, action->extra, NULL, FALSE, data_set->now); } if (is_set(action->flags, pe_action_pseudo)) { /* leave untouched */ } else if (action->node == NULL) { pe_clear_action_bit(action, pe_action_runnable); } else if (is_not_set(rsc->flags, pe_rsc_managed) && g_hash_table_lookup(action->meta, XML_LRM_ATTR_INTERVAL) == NULL) { crm_debug("Action %s (unmanaged)", action->uuid); pe_set_action_bit(action, pe_action_optional); /* action->runnable = FALSE; */ } else if (action->node->details->online == FALSE) { pe_clear_action_bit(action, pe_action_runnable); do_crm_log(warn_level, "Action %s on %s is unrunnable (offline)", action->uuid, action->node->details->uname); if (is_set(action->rsc->flags, pe_rsc_managed) && action->node->details->unclean == FALSE && save_action && a_task == stop_rsc) { do_crm_log(warn_level, "Marking node %s unclean", action->node->details->uname); action->node->details->unclean = TRUE; } } else if (action->node->details->pending) { pe_clear_action_bit(action, pe_action_runnable); do_crm_log(warn_level, "Action %s on %s is unrunnable (pending)", action->uuid, action->node->details->uname); } else if (action->needs == rsc_req_nothing) { pe_rsc_trace(rsc, "Action %s doesnt require anything", action->uuid); pe_set_action_bit(action, pe_action_runnable); #if 0 /* * No point checking this * - if we dont have quorum we cant stonith anyway */ } else if (action->needs == rsc_req_stonith) { crm_trace("Action %s requires only stonith", action->uuid); action->runnable = TRUE; #endif } else if (is_set(data_set->flags, pe_flag_have_quorum) == FALSE && data_set->no_quorum_policy == no_quorum_stop) { pe_clear_action_bit(action, pe_action_runnable); crm_debug("%s\t%s (cancelled : quorum)", action->node->details->uname, action->uuid); } else if (is_set(data_set->flags, pe_flag_have_quorum) == FALSE && data_set->no_quorum_policy == no_quorum_freeze) { pe_rsc_trace(rsc, "Check resource is already active"); if (rsc->fns->active(rsc, TRUE) == FALSE) { pe_clear_action_bit(action, pe_action_runnable); pe_rsc_debug(rsc, "%s\t%s (cancelled : quorum freeze)", action->node->details->uname, action->uuid); } } else { pe_rsc_trace(rsc, "Action %s is runnable", action->uuid); pe_set_action_bit(action, pe_action_runnable); } if (save_action) { switch (a_task) { case stop_rsc: set_bit(rsc->flags, pe_rsc_stopping); break; case start_rsc: clear_bit(rsc->flags, pe_rsc_starting); if (is_set(action->flags, pe_action_runnable)) { set_bit(rsc->flags, pe_rsc_starting); } break; default: break; } } } free(key); return action; } void unpack_operation(action_t * action, xmlNode * xml_obj, pe_working_set_t * data_set) { int value_i = 0; unsigned long long interval = 0; unsigned long long start_delay = 0; char *value_ms = NULL; const char *class = NULL; const char *value = NULL; const char *field = NULL; CRM_CHECK(action->rsc != NULL, return); unpack_instance_attributes(data_set->input, data_set->op_defaults, XML_TAG_META_SETS, NULL, action->meta, NULL, FALSE, data_set->now); if (xml_obj) { xmlAttrPtr xIter = NULL; for (xIter = xml_obj->properties; xIter; xIter = xIter->next) { const char *prop_name = (const char *)xIter->name; const char *prop_value = crm_element_value(xml_obj, prop_name); g_hash_table_replace(action->meta, strdup(prop_name), strdup(prop_value)); } } unpack_instance_attributes(data_set->input, xml_obj, XML_TAG_META_SETS, NULL, action->meta, NULL, FALSE, data_set->now); unpack_instance_attributes(data_set->input, xml_obj, XML_TAG_ATTR_SETS, NULL, action->meta, NULL, FALSE, data_set->now); g_hash_table_remove(action->meta, "id"); + /* Begin compatability code */ class = g_hash_table_lookup(action->rsc->meta, "class"); - value = g_hash_table_lookup(action->meta, "requires"); if (safe_str_eq(class, "stonith")) { action->needs = rsc_req_nothing; value = "nothing (fencing op)"; + } else if (safe_str_neq(action->task, RSC_START)) { + action->needs = rsc_req_nothing; + value = "nothing (not start)"; + } else if (safe_str_eq(value, "nothing")) { action->needs = rsc_req_nothing; } else if (safe_str_eq(value, "quorum")) { action->needs = rsc_req_quorum; } else if (is_set(data_set->flags, pe_flag_stonith_enabled) && safe_str_eq(value, "fencing")) { action->needs = rsc_req_stonith; + /* End compatability code */ - } else { - if (value) { - crm_config_err("Invalid value for %s->requires: %s%s", - action->rsc->id, value, - is_set(data_set->flags, - pe_flag_stonith_enabled) ? "" : " (stonith-enabled=false)"); - } - - if (safe_str_eq(action->task, CRMD_ACTION_STATUS) - || safe_str_eq(action->task, CRMD_ACTION_NOTIFY)) { - action->needs = rsc_req_nothing; - value = "nothing (default)"; - - } else if (data_set->no_quorum_policy == no_quorum_stop - && safe_str_neq(action->task, CRMD_ACTION_START)) { - action->needs = rsc_req_nothing; - value = "nothing (default)"; + } else if (is_set(action->rsc->flags, pe_rsc_needs_fencing)) { + action->needs = rsc_req_stonith; + value = "fencing (resource)"; - } else if (is_set(data_set->flags, pe_flag_stonith_enabled)) { - action->needs = rsc_req_stonith; - value = "fencing (default)"; + } else if (is_set(action->rsc->flags, pe_rsc_needs_quorum)) { + action->needs = rsc_req_quorum; + value = "quorum (resource)"; - } else { - action->needs = rsc_req_quorum; - value = "quorum (default)"; - } + } else { + action->needs = rsc_req_nothing; + value = "nothing (resource)"; } pe_rsc_trace(action->rsc, "\tAction %s requires: %s", action->task, value); value = g_hash_table_lookup(action->meta, XML_OP_ATTR_ON_FAIL); if (safe_str_eq(action->task, CRMD_ACTION_STOP) && safe_str_eq(value, "standby")) { crm_config_err("on-fail=standby is not allowed for stop actions: %s", action->rsc->id); value = NULL; } if (value == NULL) { } else if (safe_str_eq(value, "block")) { action->on_fail = action_fail_block; } else if (safe_str_eq(value, "fence")) { action->on_fail = action_fail_fence; value = "node fencing"; if (is_set(data_set->flags, pe_flag_stonith_enabled) == FALSE) { crm_config_err("Specifying on_fail=fence and" " stonith-enabled=false makes no sense"); action->on_fail = action_fail_stop; action->fail_role = RSC_ROLE_STOPPED; value = "stop resource"; } } else if (safe_str_eq(value, "standby")) { action->on_fail = action_fail_standby; value = "node standby"; } else if (safe_str_eq(value, "ignore") || safe_str_eq(value, "nothing")) { action->on_fail = action_fail_ignore; value = "ignore"; } else if (safe_str_eq(value, "migrate")) { action->on_fail = action_fail_migrate; value = "force migration"; } else if (safe_str_eq(value, "stop")) { action->on_fail = action_fail_stop; action->fail_role = RSC_ROLE_STOPPED; value = "stop resource"; } else if (safe_str_eq(value, "restart")) { action->on_fail = action_fail_recover; value = "restart (and possibly migrate)"; } else { pe_err("Resource %s: Unknown failure type (%s)", action->rsc->id, value); value = NULL; } /* defaults */ if (value == NULL && safe_str_eq(action->task, CRMD_ACTION_STOP)) { if (is_set(data_set->flags, pe_flag_stonith_enabled)) { action->on_fail = action_fail_fence; value = "resource fence (default)"; } else { action->on_fail = action_fail_block; value = "resource block (default)"; } } else if (value == NULL) { action->on_fail = action_fail_recover; value = "restart (and possibly migrate) (default)"; } pe_rsc_trace(action->rsc, "\t%s failure handling: %s", action->task, value); value = NULL; if (xml_obj != NULL) { value = g_hash_table_lookup(action->meta, "role_after_failure"); } if (value != NULL && action->fail_role == RSC_ROLE_UNKNOWN) { action->fail_role = text2role(value); } /* defaults */ if (action->fail_role == RSC_ROLE_UNKNOWN) { if (safe_str_eq(action->task, CRMD_ACTION_PROMOTE)) { action->fail_role = RSC_ROLE_SLAVE; } else { action->fail_role = RSC_ROLE_STARTED; } } pe_rsc_trace(action->rsc, "\t%s failure results in: %s", action->task, role2text(action->fail_role)); field = XML_LRM_ATTR_INTERVAL; value = g_hash_table_lookup(action->meta, field); if (value != NULL) { interval = crm_get_interval(value); if (interval > 0) { value_ms = crm_itoa(interval); g_hash_table_replace(action->meta, strdup(field), value_ms); } else { g_hash_table_remove(action->meta, field); } } field = XML_OP_ATTR_START_DELAY; value = g_hash_table_lookup(action->meta, field); if (value != NULL) { value_i = crm_get_msec(value); if (value_i < 0) { value_i = 0; } start_delay = value_i; value_ms = crm_itoa(value_i); g_hash_table_replace(action->meta, strdup(field), value_ms); } else if (interval > 0 && g_hash_table_lookup(action->meta, XML_OP_ATTR_ORIGIN)) { crm_time_t *origin = NULL; value = g_hash_table_lookup(action->meta, XML_OP_ATTR_ORIGIN); origin = crm_time_new(value); if (origin == NULL) { crm_config_err("Operation %s contained an invalid " XML_OP_ATTR_ORIGIN ": %s", ID(xml_obj), value); } else { crm_time_t *delay = NULL; int rc = crm_time_compare(origin, data_set->now); unsigned long long delay_s = 0; while (rc < 0) { crm_time_add_seconds(origin, interval / 1000); rc = crm_time_compare(origin, data_set->now); } delay = crm_time_subtract(origin, data_set->now); delay_s = crm_time_get_seconds(delay); start_delay = delay_s * 1000; crm_info("Calculated a start delay of %llus for %s", delay_s, ID(xml_obj)); g_hash_table_replace(action->meta, strdup(XML_OP_ATTR_START_DELAY), crm_itoa(start_delay)); crm_time_free(origin); crm_time_free(delay); } } field = XML_ATTR_TIMEOUT; value = g_hash_table_lookup(action->meta, field); if (value == NULL) { value = pe_pref(data_set->config_hash, "default-action-timeout"); } value_i = crm_get_msec(value); if (value_i < 0) { value_i = 0; } value_i += start_delay; value_ms = crm_itoa(value_i); g_hash_table_replace(action->meta, strdup(field), value_ms); } static xmlNode * find_rsc_op_entry_helper(resource_t * rsc, const char *key, gboolean include_disabled) { int number = 0; gboolean do_retry = TRUE; char *local_key = NULL; const char *name = NULL; const char *value = NULL; const char *interval = NULL; char *match_key = NULL; xmlNode *op = NULL; xmlNode *operation = NULL; retry: for (operation = __xml_first_child(rsc->ops_xml); operation != NULL; operation = __xml_next(operation)) { if (crm_str_eq((const char *)operation->name, "op", TRUE)) { name = crm_element_value(operation, "name"); interval = crm_element_value(operation, XML_LRM_ATTR_INTERVAL); value = crm_element_value(operation, "enabled"); if (!include_disabled && value && crm_is_true(value) == FALSE) { continue; } number = crm_get_interval(interval); if (number < 0) { continue; } match_key = generate_op_key(rsc->id, name, number); if (safe_str_eq(key, match_key)) { op = operation; } free(match_key); if(rsc->clone_name) { match_key = generate_op_key(rsc->clone_name, name, number); if (safe_str_eq(key, match_key)) { op = operation; } free(match_key); } if (op != NULL) { free(local_key); return op; } } } free(local_key); if (do_retry == FALSE) { return NULL; } do_retry = FALSE; if (strstr(key, CRMD_ACTION_MIGRATE) || strstr(key, CRMD_ACTION_MIGRATED)) { local_key = generate_op_key(rsc->id, "migrate", 0); key = local_key; goto retry; } else if (strstr(key, "_notify_")) { local_key = generate_op_key(rsc->id, "notify", 0); key = local_key; goto retry; } return NULL; } xmlNode * find_rsc_op_entry(resource_t * rsc, const char *key) { return find_rsc_op_entry_helper( rsc, key, FALSE); } void print_node(const char *pre_text, node_t * node, gboolean details) { if (node == NULL) { crm_trace("%s%s: ", pre_text == NULL ? "" : pre_text, pre_text == NULL ? "" : ": "); return; } crm_trace("%s%s%sNode %s: (weight=%d, fixed=%s)", pre_text == NULL ? "" : pre_text, pre_text == NULL ? "" : ": ", node->details == NULL ? "error " : node->details->online ? "" : "Unavailable/Unclean ", node->details->uname, node->weight, node->fixed ? "True" : "False"); if (details && node != NULL && node->details != NULL) { char *pe_mutable = strdup("\t\t"); GListPtr gIter = node->details->running_rsc; crm_trace("\t\t===Node Attributes"); g_hash_table_foreach(node->details->attrs, print_str_str, pe_mutable); free(pe_mutable); crm_trace("\t\t=== Resources"); for (; gIter != NULL; gIter = gIter->next) { resource_t *rsc = (resource_t *) gIter->data; print_resource(LOG_DEBUG_4, "\t\t", rsc, FALSE); } } } /* * Used by the HashTable for-loop */ void print_str_str(gpointer key, gpointer value, gpointer user_data) { crm_trace("%s%s %s ==> %s", user_data == NULL ? "" : (char *)user_data, user_data == NULL ? "" : ": ", (char *)key, (char *)value); } void print_resource(int log_level, const char *pre_text, resource_t * rsc, gboolean details) { long options = pe_print_log; if (rsc == NULL) { do_crm_log(log_level - 1, "%s%s: ", pre_text == NULL ? "" : pre_text, pre_text == NULL ? "" : ": "); return; } if (details) { options |= pe_print_details; } rsc->fns->print(rsc, pre_text, options, &log_level); } void pe_free_action(action_t * action) { if (action == NULL) { return; } g_list_free_full(action->actions_before, free); /* action_warpper_t* */ g_list_free_full(action->actions_after, free); /* action_warpper_t* */ if (action->extra) { g_hash_table_destroy(action->extra); } if (action->meta) { g_hash_table_destroy(action->meta); } free(action->task); free(action->uuid); free(action->node); free(action); } GListPtr find_recurring_actions(GListPtr input, node_t * not_on_node) { const char *value = NULL; GListPtr result = NULL; GListPtr gIter = input; CRM_CHECK(input != NULL, return NULL); for (; gIter != NULL; gIter = gIter->next) { action_t *action = (action_t *) gIter->data; value = g_hash_table_lookup(action->meta, XML_LRM_ATTR_INTERVAL); if (value == NULL) { /* skip */ } else if (safe_str_eq(value, "0")) { /* skip */ } else if (safe_str_eq(CRMD_ACTION_CANCEL, action->task)) { /* skip */ } else if (not_on_node == NULL) { crm_trace("(null) Found: %s", action->uuid); result = g_list_prepend(result, action); } else if (action->node == NULL) { /* skip */ } else if (action->node->details != not_on_node->details) { crm_trace("Found: %s", action->uuid); result = g_list_prepend(result, action); } } return result; } enum action_tasks get_complex_task(resource_t * rsc, const char *name, gboolean allow_non_atomic) { enum action_tasks task = text2task(name); if (rsc == NULL) { return task; } else if (allow_non_atomic == FALSE || rsc->variant == pe_native) { switch (task) { case stopped_rsc: case started_rsc: case action_demoted: case action_promoted: crm_trace("Folding %s back into its atomic counterpart for %s", name, rsc->id); return task - 1; break; default: break; } } return task; } action_t * find_first_action(GListPtr input, const char *uuid, const char *task, node_t * on_node) { GListPtr gIter = NULL; CRM_CHECK(uuid || task, return NULL); for (gIter = input; gIter != NULL; gIter = gIter->next) { action_t *action = (action_t *) gIter->data; if (uuid != NULL && safe_str_neq(uuid, action->uuid)) { continue; } else if (task != NULL && safe_str_neq(task, action->task)) { continue; } else if (on_node == NULL) { return action; } else if (action->node == NULL) { continue; } else if (on_node->details == action->node->details) { return action; } } return NULL; } GListPtr find_actions(GListPtr input, const char *key, node_t * on_node) { GListPtr gIter = input; GListPtr result = NULL; CRM_CHECK(key != NULL, return NULL); for (; gIter != NULL; gIter = gIter->next) { action_t *action = (action_t *) gIter->data; crm_trace("Matching %s against %s", key, action->uuid); if (safe_str_neq(key, action->uuid)) { continue; } else if (on_node == NULL) { result = g_list_prepend(result, action); } else if (action->node == NULL) { /* skip */ crm_trace("While looking for %s action on %s, " "found an unallocated one. Assigning" " it to the requested node...", key, on_node->details->uname); action->node = node_copy(on_node); result = g_list_prepend(result, action); } else if (on_node->details == action->node->details) { result = g_list_prepend(result, action); } } return result; } GListPtr find_actions_exact(GListPtr input, const char *key, node_t * on_node) { GListPtr gIter = input; GListPtr result = NULL; CRM_CHECK(key != NULL, return NULL); for (; gIter != NULL; gIter = gIter->next) { action_t *action = (action_t *) gIter->data; crm_trace("Matching %s against %s", key, action->uuid); if (safe_str_neq(key, action->uuid)) { crm_trace("Key mismatch: %s vs. %s", key, action->uuid); continue; } else if (on_node == NULL || action->node == NULL) { crm_trace("on_node=%p, action->node=%p", on_node, action->node); continue; } else if (safe_str_eq(on_node->details->id, action->node->details->id)) { result = g_list_prepend(result, action); } crm_trace("Node mismatch: %s vs. %s", on_node->details->id, action->node->details->id); } return result; } static void resource_node_score(resource_t * rsc, node_t * node, int score, const char *tag) { node_t *match = NULL; if (rsc->children) { GListPtr gIter = rsc->children; for (; gIter != NULL; gIter = gIter->next) { resource_t *child_rsc = (resource_t *) gIter->data; resource_node_score(child_rsc, node, score, tag); } } pe_rsc_trace(rsc, "Setting %s for %s on %s: %d", tag, rsc->id, node->details->uname, score); match = pe_hash_table_lookup(rsc->allowed_nodes, node->details->id); if (match == NULL) { match = node_copy(node); match->weight = merge_weights(score, node->weight); g_hash_table_insert(rsc->allowed_nodes, (gpointer) match->details->id, match); } match->weight = merge_weights(match->weight, score); } void resource_location(resource_t * rsc, node_t * node, int score, const char *tag, pe_working_set_t * data_set) { if (node != NULL) { resource_node_score(rsc, node, score, tag); } else if (data_set != NULL) { GListPtr gIter = data_set->nodes; for (; gIter != NULL; gIter = gIter->next) { node_t *node = (node_t *) gIter->data; resource_node_score(rsc, node, score, tag); } } else { GHashTableIter iter; node_t *node = NULL; g_hash_table_iter_init(&iter, rsc->allowed_nodes); while (g_hash_table_iter_next(&iter, NULL, (void **)&node)) { resource_node_score(rsc, node, score, tag); } } if (node == NULL && score == -INFINITY) { if (rsc->allocated_to) { crm_info("Deallocating %s from %s", rsc->id, rsc->allocated_to->details->uname); free(rsc->allocated_to); rsc->allocated_to = NULL; } } } #define sort_return(an_int, why) do { \ free(a_uuid); \ free(b_uuid); \ crm_trace("%s (%d) %c %s (%d) : %s", \ a_xml_id, a_call_id, an_int>0?'>':an_int<0?'<':'=', \ b_xml_id, b_call_id, why); \ return an_int; \ } while(0) gint sort_op_by_callid(gconstpointer a, gconstpointer b) { int a_call_id = -1; int b_call_id = -1; char *a_uuid = NULL; char *b_uuid = NULL; const xmlNode *xml_a = a; const xmlNode *xml_b = b; const char *a_xml_id = crm_element_value_const(xml_a, XML_ATTR_ID); const char *b_xml_id = crm_element_value_const(xml_b, XML_ATTR_ID); if (safe_str_eq(a_xml_id, b_xml_id)) { /* We have duplicate lrm_rsc_op entries in the status * section which is unliklely to be a good thing * - we can handle it easily enough, but we need to get * to the bottom of why its happening. */ pe_err("Duplicate lrm_rsc_op entries named %s", a_xml_id); sort_return(0, "duplicate"); } crm_element_value_const_int(xml_a, XML_LRM_ATTR_CALLID, &a_call_id); crm_element_value_const_int(xml_b, XML_LRM_ATTR_CALLID, &b_call_id); if (a_call_id == -1 && b_call_id == -1) { /* both are pending ops so it doesnt matter since * stops are never pending */ sort_return(0, "pending"); } else if (a_call_id >= 0 && a_call_id < b_call_id) { sort_return(-1, "call id"); } else if (b_call_id >= 0 && a_call_id > b_call_id) { sort_return(1, "call id"); } else if (b_call_id >= 0 && a_call_id == b_call_id) { /* * The op and last_failed_op are the same * Order on last-rc-change */ int last_a = -1; int last_b = -1; crm_element_value_const_int(xml_a, "last-rc-change", &last_a); crm_element_value_const_int(xml_b, "last-rc-change", &last_b); if (last_a >= 0 && last_a < last_b) { sort_return(-1, "rc-change"); } else if (last_b >= 0 && last_a > last_b) { sort_return(1, "rc-change"); } sort_return(0, "rc-change"); } else { /* One of the inputs is a pending operation * Attempt to use XML_ATTR_TRANSITION_MAGIC to determine its age relative to the other */ int a_id = -1; int b_id = -1; int dummy = -1; const char *a_magic = crm_element_value_const(xml_a, XML_ATTR_TRANSITION_MAGIC); const char *b_magic = crm_element_value_const(xml_b, XML_ATTR_TRANSITION_MAGIC); CRM_CHECK(a_magic != NULL && b_magic != NULL, sort_return(0, "No magic")); CRM_CHECK(decode_transition_magic(a_magic, &a_uuid, &a_id, &dummy, &dummy, &dummy, &dummy), sort_return(0, "bad magic a")); CRM_CHECK(decode_transition_magic(b_magic, &b_uuid, &b_id, &dummy, &dummy, &dummy, &dummy), sort_return(0, "bad magic b")); /* try and determin the relative age of the operation... * some pending operations (ie. a start) may have been supuerceeded * by a subsequent stop * * [a|b]_id == -1 means its a shutdown operation and _always_ comes last */ if (safe_str_neq(a_uuid, b_uuid) || a_id == b_id) { /* * some of the logic in here may be redundant... * * if the UUID from the TE doesnt match then one better * be a pending operation. * pending operations dont survive between elections and joins * because we query the LRM directly */ if (b_call_id == -1) { sort_return(-1, "transition + call"); } else if (a_call_id == -1) { sort_return(1, "transition + call"); } } else if ((a_id >= 0 && a_id < b_id) || b_id == -1) { sort_return(-1, "transition"); } else if ((b_id >= 0 && a_id > b_id) || a_id == -1) { sort_return(1, "transition"); } } /* we should never end up here */ CRM_CHECK(FALSE, sort_return(0, "default")); } time_t get_timet_now(pe_working_set_t * data_set) { time_t now = 0; /* if (data_set && data_set->now) { */ /* now = data_set->now->tm_now; */ /* } */ if (now == 0) { /* eventually we should convert data_set->now into time_tm * for now, its only triggered by PE regression tests */ now = time(NULL); crm_crit("Defaulting to 'now'"); /* if (data_set && data_set->now) { */ /* data_set->now->tm_now = now; */ /* } */ } return now; } struct fail_search { resource_t *rsc; int count; long long last; char *key; }; static void get_failcount_by_prefix(gpointer key_p, gpointer value, gpointer user_data) { struct fail_search *search = user_data; const char *key = key_p; const char *match = strstr(key, search->key); if (match) { if (strstr(key, "last-failure-") == key && (key + 13) == match) { search->last = crm_int_helper(value, NULL); } else if (strstr(key, "fail-count-") == key && (key + 11) == match) { search->count += char2score(value); } } } int get_failcount(node_t * node, resource_t * rsc, int *last_failure, pe_working_set_t * data_set) { char *key = NULL; const char *value = NULL; struct fail_search search = { rsc, 0, 0, NULL }; /* Optimize the "normal" case */ key = crm_concat("fail-count", rsc->clone_name?rsc->clone_name:rsc->id, '-'); value = g_hash_table_lookup(node->details->attrs, key); search.count = char2score(value); crm_trace("%s = %s", key, value); free(key); if(value) { key = crm_concat("last-failure", rsc->clone_name?rsc->clone_name:rsc->id, '-'); value = g_hash_table_lookup(node->details->attrs, key); search.last = crm_int_helper(value, NULL); free(key); /* This block is still relevant once we omit anonymous instance numbers * because stopped clones wont have clone_name set */ } else if (is_not_set(rsc->flags, pe_rsc_unique)) { search.rsc = uber_parent(rsc); search.key = clone_strip(rsc->id); g_hash_table_foreach(node->details->attrs, get_failcount_by_prefix, &search); free(search.key); } if (search.count != 0 && search.last != 0 && last_failure) { *last_failure = search.last; } if (search.count != 0 && search.last != 0 && rsc->failure_timeout) { if (search.last > 0) { time_t now = get_timet_now(data_set); if (now > (search.last + rsc->failure_timeout)) { crm_debug("Failcount for %s on %s has expired (limit was %ds)", search.rsc->id, node->details->uname, rsc->failure_timeout); search.count = 0; } } } if (search.count != 0) { char *score = score2char(search.count); crm_info("%s has failed %s times on %s", search.rsc->id, score, node->details->uname); free(score); } return search.count; } gboolean get_target_role(resource_t * rsc, enum rsc_role_e * role) { enum rsc_role_e local_role = RSC_ROLE_UNKNOWN; const char *value = g_hash_table_lookup(rsc->meta, XML_RSC_ATTR_TARGET_ROLE); CRM_CHECK(role != NULL, return FALSE); if (value == NULL || safe_str_eq("started", value) || safe_str_eq("default", value)) { return FALSE; } local_role = text2role(value); if (local_role == RSC_ROLE_UNKNOWN) { crm_config_err("%s: Unknown value for %s: %s", rsc->id, XML_RSC_ATTR_TARGET_ROLE, value); return FALSE; } else if (local_role > RSC_ROLE_STARTED) { if (uber_parent(rsc)->variant == pe_master) { if (local_role > RSC_ROLE_SLAVE) { /* This is what we'd do anyway, just leave the default to avoid messing up the placement algorithm */ return FALSE; } } else { crm_config_err("%s is not part of a master/slave resource, a %s of '%s' makes no sense", rsc->id, XML_RSC_ATTR_TARGET_ROLE, value); return FALSE; } } *role = local_role; return TRUE; } gboolean order_actions(action_t * lh_action, action_t * rh_action, enum pe_ordering order) { GListPtr gIter = NULL; action_wrapper_t *wrapper = NULL; GListPtr list = NULL; if (order == pe_order_none) { return FALSE; } if (lh_action == NULL || rh_action == NULL) { return FALSE; } crm_trace("Ordering Action %s before %s", lh_action->uuid, rh_action->uuid); /* Filter dups, otherwise update_action_states() has too much work to do */ gIter = lh_action->actions_after; for (; gIter != NULL; gIter = gIter->next) { action_wrapper_t *after = (action_wrapper_t *) gIter->data; if (after->action == rh_action && (after->type & order)) { return FALSE; } } wrapper = calloc(1, sizeof(action_wrapper_t)); wrapper->action = rh_action; wrapper->type = order; list = lh_action->actions_after; list = g_list_prepend(list, wrapper); lh_action->actions_after = list; wrapper = NULL; /* order |= pe_order_implies_then; */ /* order ^= pe_order_implies_then; */ wrapper = calloc(1, sizeof(action_wrapper_t)); wrapper->action = lh_action; wrapper->type = order; list = rh_action->actions_before; list = g_list_prepend(list, wrapper); rh_action->actions_before = list; return TRUE; } action_t * get_pseudo_op(const char *name, pe_working_set_t * data_set) { action_t *op = NULL; const char *op_s = name; GListPtr possible_matches = NULL; possible_matches = find_actions(data_set->actions, name, NULL); if (possible_matches != NULL) { if (g_list_length(possible_matches) > 1) { pe_warn("Action %s exists %d times", name, g_list_length(possible_matches)); } op = g_list_nth_data(possible_matches, 0); g_list_free(possible_matches); } else { op = custom_action(NULL, strdup(op_s), op_s, NULL, TRUE, TRUE, data_set); set_bit(op->flags, pe_action_pseudo); set_bit(op->flags, pe_action_runnable); } return op; } void destroy_ticket(gpointer data) { ticket_t *ticket = data; if (ticket->state) { g_hash_table_destroy(ticket->state); } free(ticket->id); free(ticket); } ticket_t * ticket_new(const char *ticket_id, pe_working_set_t * data_set) { ticket_t *ticket = NULL; if (ticket_id == NULL || strlen(ticket_id) == 0) { return NULL; } if (data_set->tickets == NULL) { data_set->tickets = g_hash_table_new_full(crm_str_hash, g_str_equal, g_hash_destroy_str, destroy_ticket); } ticket = g_hash_table_lookup(data_set->tickets, ticket_id); if (ticket == NULL) { ticket = calloc(1, sizeof(ticket_t)); if (ticket == NULL) { crm_err("Cannot allocate ticket '%s'", ticket_id); return NULL; } crm_trace("Creaing ticket entry for %s", ticket_id); ticket->id = strdup(ticket_id); ticket->granted = FALSE; ticket->last_granted = -1; ticket->standby = FALSE; ticket->state = g_hash_table_new_full(crm_str_hash, g_str_equal, g_hash_destroy_str, g_hash_destroy_str); g_hash_table_insert(data_set->tickets, strdup(ticket->id), ticket); } return ticket; } diff --git a/pengine/test10/bug-lf-2508.dot b/pengine/test10/bug-lf-2508.dot index 3726778eda..31c8ec4a38 100644 --- a/pengine/test10/bug-lf-2508.dot +++ b/pengine/test10/bug-lf-2508.dot @@ -1,101 +1,100 @@ digraph "g" { "Dummy01_monitor_10000 srv01" [ style=bold color="green" fontcolor="black" ] "Dummy01_start_0 srv01" -> "Dummy01_monitor_10000 srv01" [ style = bold] "Dummy01_start_0 srv01" -> "Group01_running_0" [ style = bold] "Dummy01_start_0 srv01" [ style=bold color="green" fontcolor="black" ] "Dummy02_monitor_10000 srv04" [ style=bold color="green" fontcolor="black" ] "Dummy02_start_0 srv04" -> "Dummy02_monitor_10000 srv04" [ style = bold] "Dummy02_start_0 srv04" -> "Group02_running_0" [ style = bold] "Dummy02_start_0 srv04" [ style=bold color="green" fontcolor="black" ] "Dummy02_stop_0 srv02" -> "Dummy02_start_0 srv04" [ style = bold] "Dummy02_stop_0 srv02" -> "Group02_stopped_0" [ style = bold] "Dummy02_stop_0 srv02" -> "all_stopped" [ style = bold] "Dummy02_stop_0 srv02" [ style=bold color="green" fontcolor="orange" ] "Group01_running_0" [ style=bold color="green" fontcolor="orange" ] "Group01_start_0" -> "Dummy01_start_0 srv01" [ style = bold] "Group01_start_0" -> "Group01_running_0" [ style = bold] "Group01_start_0" [ style=bold color="green" fontcolor="orange" ] "Group02_running_0" [ style=bold color="green" fontcolor="orange" ] "Group02_start_0" -> "Dummy02_start_0 srv04" [ style = bold] "Group02_start_0" -> "Group02_running_0" [ style = bold] "Group02_start_0" [ style=bold color="green" fontcolor="orange" ] "Group02_stop_0" -> "Dummy02_stop_0 srv02" [ style = bold] "Group02_stop_0" -> "Group02_stopped_0" [ style = bold] "Group02_stop_0" [ style=bold color="green" fontcolor="orange" ] "Group02_stopped_0" -> "Group02_start_0" [ style = bold] "Group02_stopped_0" [ style=bold color="green" fontcolor="orange" ] "all_stopped" [ style=bold color="green" fontcolor="orange" ] "clnStonith1_stop_0" -> "clnStonith1_stopped_0" [ style = bold] "clnStonith1_stop_0" -> "grpStonith1:2_stop_0" [ style = bold] "clnStonith1_stop_0" [ style=bold color="green" fontcolor="orange" ] "clnStonith1_stopped_0" [ style=bold color="green" fontcolor="orange" ] "clnStonith3_running_0" [ style=bold color="green" fontcolor="orange" ] "clnStonith3_start_0" -> "clnStonith3_running_0" [ style = bold] "clnStonith3_start_0" -> "grpStonith3:0_start_0" [ style = bold] "clnStonith3_start_0" [ style=bold color="green" fontcolor="orange" ] "clnStonith3_stop_0" -> "clnStonith3_stopped_0" [ style = bold] "clnStonith3_stop_0" -> "grpStonith3:2_stop_0" [ style = bold] "clnStonith3_stop_0" [ style=bold color="green" fontcolor="orange" ] "clnStonith3_stopped_0" -> "clnStonith3_start_0" [ style = bold] "clnStonith3_stopped_0" [ style=bold color="green" fontcolor="orange" ] "clnStonith4_stop_0" -> "clnStonith4_stopped_0" [ style = bold] "clnStonith4_stop_0" -> "grpStonith4:2_stop_0" [ style = bold] "clnStonith4_stop_0" [ style=bold color="green" fontcolor="orange" ] "clnStonith4_stopped_0" [ style=bold color="green" fontcolor="orange" ] "grpStonith1:2_stop_0" -> "grpStonith1:2_stopped_0" [ style = bold] "grpStonith1:2_stop_0" -> "prmStonith1-1:1_stop_0 srv02" [ style = bold] "grpStonith1:2_stop_0" -> "prmStonith1-3:1_stop_0 srv02" [ style = bold] "grpStonith1:2_stop_0" [ style=bold color="green" fontcolor="orange"] "grpStonith1:2_stopped_0" -> "clnStonith1_stopped_0" [ style = bold] "grpStonith1:2_stopped_0" [ style=bold color="green" fontcolor="orange"] "grpStonith3:0_running_0" -> "clnStonith3_running_0" [ style = bold] "grpStonith3:0_running_0" [ style=bold color="green" fontcolor="orange"] "grpStonith3:0_start_0" -> "grpStonith3:0_running_0" [ style = bold] "grpStonith3:0_start_0" -> "prmStonith3-3:0_start_0 srv01" [ style = bold] "grpStonith3:0_start_0" [ style=bold color="green" fontcolor="orange"] "grpStonith3:2_stop_0" -> "grpStonith3:2_stopped_0" [ style = bold] "grpStonith3:2_stop_0" -> "prmStonith3-1:1_stop_0 srv02" [ style = bold] "grpStonith3:2_stop_0" -> "prmStonith3-3:1_stop_0 srv02" [ style = bold] "grpStonith3:2_stop_0" [ style=bold color="green" fontcolor="orange"] "grpStonith3:2_stopped_0" -> "clnStonith3_stopped_0" [ style = bold] "grpStonith3:2_stopped_0" [ style=bold color="green" fontcolor="orange"] "grpStonith4:2_stop_0" -> "grpStonith4:2_stopped_0" [ style = bold] "grpStonith4:2_stop_0" -> "prmStonith4-1:1_stop_0 srv02" [ style = bold] "grpStonith4:2_stop_0" -> "prmStonith4-3:1_stop_0 srv02" [ style = bold] "grpStonith4:2_stop_0" [ style=bold color="green" fontcolor="orange"] "grpStonith4:2_stopped_0" -> "clnStonith4_stopped_0" [ style = bold] "grpStonith4:2_stopped_0" [ style=bold color="green" fontcolor="orange"] "prmStonith1-1:1_stop_0 srv02" -> "grpStonith1:2_stopped_0" [ style = bold] "prmStonith1-1:1_stop_0 srv02" [ style=bold color="green" fontcolor="orange" ] "prmStonith1-3:1_stop_0 srv02" -> "grpStonith1:2_stopped_0" [ style = bold] "prmStonith1-3:1_stop_0 srv02" -> "prmStonith1-1:1_stop_0 srv02" [ style = bold] "prmStonith1-3:1_stop_0 srv02" [ style=bold color="green" fontcolor="orange" ] "prmStonith3-1:1_monitor_3600000 srv01" [ style=bold color="green" fontcolor="black" ] "prmStonith3-1:1_stop_0 srv02" -> "grpStonith3:2_stopped_0" [ style = bold] "prmStonith3-1:1_stop_0 srv02" [ style=bold color="green" fontcolor="orange"] "prmStonith3-3:0_monitor_3600000 srv01" [ style=bold color="green" fontcolor="black"] "prmStonith3-3:0_start_0 srv01" -> "grpStonith3:0_running_0" [ style = bold] "prmStonith3-3:0_start_0 srv01" -> "prmStonith3-3:0_monitor_3600000 srv01" [ style = bold] "prmStonith3-3:0_start_0 srv01" -> "stonith_up" [ style = bold] "prmStonith3-3:0_start_0 srv01" [ style=bold color="green" fontcolor="black"] "prmStonith3-3:1_stop_0 srv02" -> "grpStonith3:2_stopped_0" [ style = bold] "prmStonith3-3:1_stop_0 srv02" -> "prmStonith3-1:1_stop_0 srv02" [ style = bold] "prmStonith3-3:1_stop_0 srv02" [ style=bold color="green" fontcolor="orange"] "prmStonith4-1:1_stop_0 srv02" -> "grpStonith4:2_stopped_0" [ style = bold] "prmStonith4-1:1_stop_0 srv02" [ style=bold color="green" fontcolor="orange"] "prmStonith4-3:1_stop_0 srv02" -> "grpStonith4:2_stopped_0" [ style = bold] "prmStonith4-3:1_stop_0 srv02" -> "prmStonith4-1:1_stop_0 srv02" [ style = bold] "prmStonith4-3:1_stop_0 srv02" [ style=bold color="green" fontcolor="orange"] "stonith srv02" -> "Dummy02_stop_0 srv02" [ style = bold] "stonith srv02" -> "Group02_stop_0" [ style = bold] "stonith srv02" -> "all_stopped" [ style = bold] "stonith srv02" -> "stonith_complete" [ style = bold] "stonith srv02" [ style=bold color="green" fontcolor="black" ] "stonith_complete" -> "Dummy01_start_0 srv01" [ style = bold] "stonith_complete" -> "Dummy02_start_0 srv04" [ style = bold] -"stonith_complete" -> "Dummy02_stop_0 srv02" [ style = bold] "stonith_complete" [ style=bold color="green" fontcolor="orange" ] "stonith_up" -> "stonith srv02" [ style = bold] "stonith_up" -> "stonith_complete" [ style = bold] "stonith_up" [ style=bold color="green" fontcolor="orange" ] } diff --git a/pengine/test10/bug-lf-2508.exp b/pengine/test10/bug-lf-2508.exp index b4db2121dd..7f16cfa614 100644 --- a/pengine/test10/bug-lf-2508.exp +++ b/pengine/test10/bug-lf-2508.exp @@ -1,542 +1,539 @@ - - - diff --git a/pengine/test10/bug-lf-2551.dot b/pengine/test10/bug-lf-2551.dot index 9d6904a7c6..4a1c85915d 100644 --- a/pengine/test10/bug-lf-2551.dot +++ b/pengine/test10/bug-lf-2551.dot @@ -1,177 +1,154 @@ digraph "g" { "all_stopped" [ style=bold color="green" fontcolor="orange" ] "base-clone_stop_0" -> "base-clone_stopped_0" [ style = bold] "base-clone_stop_0" -> "base-group:3_stop_0" [ style = bold] "base-clone_stop_0" [ style=bold color="green" fontcolor="orange" ] "base-clone_stopped_0" [ style=bold color="green" fontcolor="orange" ] "base-group:3_stop_0" -> "base-group:3_stopped_0" [ style = bold] "base-group:3_stop_0" -> "clvm:3_stop_0 hex-9" [ style = bold] "base-group:3_stop_0" -> "cmirrord:3_stop_0 hex-9" [ style = bold] "base-group:3_stop_0" -> "dlm:3_stop_0 hex-9" [ style = bold] "base-group:3_stop_0" -> "o2cb:3_stop_0 hex-9" [ style = bold] "base-group:3_stop_0" -> "ocfs2-1:3_stop_0 hex-9" [ style = bold] "base-group:3_stop_0" -> "vg1:3_stop_0 hex-9" [ style = bold] "base-group:3_stop_0" [ style=bold color="green" fontcolor="orange" ] "base-group:3_stopped_0" -> "base-clone_stopped_0" [ style = bold] "base-group:3_stopped_0" [ style=bold color="green" fontcolor="orange" ] "clvm:3_stop_0 hex-9" -> "all_stopped" [ style = bold] "clvm:3_stop_0 hex-9" -> "base-group:3_stopped_0" [ style = bold] "clvm:3_stop_0 hex-9" -> "o2cb:3_stop_0 hex-9" [ style = bold] "clvm:3_stop_0 hex-9" [ style=bold color="green" fontcolor="orange" ] "cmirrord:3_stop_0 hex-9" -> "all_stopped" [ style = bold] "cmirrord:3_stop_0 hex-9" -> "base-group:3_stopped_0" [ style = bold] "cmirrord:3_stop_0 hex-9" -> "clvm:3_stop_0 hex-9" [ style = bold] "cmirrord:3_stop_0 hex-9" [ style=bold color="green" fontcolor="orange" ] "dlm:3_stop_0 hex-9" -> "all_stopped" [ style = bold] "dlm:3_stop_0 hex-9" -> "base-group:3_stopped_0" [ style = bold] "dlm:3_stop_0 hex-9" [ style=bold color="green" fontcolor="orange" ] "dummy1_monitor_30000 hex-0" [ style=bold color="green" fontcolor="black" ] "dummy1_monitor_300000 hex-7" [ style=bold color="green" fontcolor="black" ] "dummy1_monitor_300000 hex-8" [ style=bold color="green" fontcolor="black" ] "dummy1_monitor_300000 hex-9" [ style=dashed color="red" fontcolor="black" ] "dummy1_start_0 hex-0" -> "dummy1_monitor_30000 hex-0" [ style = bold] "dummy1_start_0 hex-0" [ style=bold color="green" fontcolor="black" ] "dummy1_stop_0 hex-9" -> "all_stopped" [ style = bold] "dummy1_stop_0 hex-9" -> "dummy1_monitor_300000 hex-9" [ style = dashed] "dummy1_stop_0 hex-9" -> "dummy1_start_0 hex-0" [ style = bold] "dummy1_stop_0 hex-9" [ style=bold color="green" fontcolor="orange" ] "fencing-sbd_start_0 hex-0" -> "stonith_up" [ style = bold] "fencing-sbd_start_0 hex-0" [ style=bold color="green" fontcolor="black" ] "fencing-sbd_stop_0 hex-9" -> "fencing-sbd_start_0 hex-0" [ style = bold] "fencing-sbd_stop_0 hex-9" [ style=bold color="green" fontcolor="orange" ] "load_stopped_hex-0 hex-0" [ style=bold color="green" fontcolor="orange" ] "load_stopped_hex-7 hex-7" [ style=bold color="green" fontcolor="orange" ] "load_stopped_hex-8 hex-8" [ style=bold color="green" fontcolor="orange" ] "load_stopped_hex-9 hex-9" [ style=bold color="green" fontcolor="orange" ] "o2cb:3_stop_0 hex-9" -> "all_stopped" [ style = bold] "o2cb:3_stop_0 hex-9" -> "base-group:3_stopped_0" [ style = bold] "o2cb:3_stop_0 hex-9" -> "dlm:3_stop_0 hex-9" [ style = bold] "o2cb:3_stop_0 hex-9" [ style=bold color="green" fontcolor="orange" ] "ocfs2-1:3_stop_0 hex-9" -> "all_stopped" [ style = bold] "ocfs2-1:3_stop_0 hex-9" -> "base-group:3_stopped_0" [ style = bold] "ocfs2-1:3_stop_0 hex-9" -> "vg1:3_stop_0 hex-9" [ style = bold] "ocfs2-1:3_stop_0 hex-9" [ style=bold color="green" fontcolor="orange" ] "stonith hex-9" -> "all_stopped" [ style = bold] "stonith hex-9" -> "base-clone_stop_0" [ style = bold] "stonith hex-9" -> "clvm:3_stop_0 hex-9" [ style = bold] "stonith hex-9" -> "cmirrord:3_stop_0 hex-9" [ style = bold] "stonith hex-9" -> "dlm:3_stop_0 hex-9" [ style = bold] "stonith hex-9" -> "dummy1_stop_0 hex-9" [ style = bold] "stonith hex-9" -> "o2cb:3_stop_0 hex-9" [ style = bold] "stonith hex-9" -> "ocfs2-1:3_stop_0 hex-9" [ style = bold] "stonith hex-9" -> "stonith_complete" [ style = bold] "stonith hex-9" -> "vg1:3_stop_0 hex-9" [ style = bold] "stonith hex-9" -> "vm-03_stop_0 hex-9" [ style = bold] "stonith hex-9" -> "vm-06_stop_0 hex-9" [ style = bold] "stonith hex-9" -> "vm-09_stop_0 hex-9" [ style = bold] "stonith hex-9" -> "vm-13_stop_0 hex-9" [ style = bold] "stonith hex-9" -> "vm-17_stop_0 hex-9" [ style = bold] "stonith hex-9" -> "vm-21_stop_0 hex-9" [ style = bold] "stonith hex-9" -> "vm-25_stop_0 hex-9" [ style = bold] "stonith hex-9" -> "vm-29_stop_0 hex-9" [ style = bold] "stonith hex-9" -> "vm-33_stop_0 hex-9" [ style = bold] "stonith hex-9" -> "vm-37_stop_0 hex-9" [ style = bold] "stonith hex-9" -> "vm-41_stop_0 hex-9" [ style = bold] "stonith hex-9" -> "vm-45_stop_0 hex-9" [ style = bold] "stonith hex-9" -> "vm-49_stop_0 hex-9" [ style = bold] "stonith hex-9" -> "vm-53_stop_0 hex-9" [ style = bold] "stonith hex-9" -> "vm-57_stop_0 hex-9" [ style = bold] "stonith hex-9" -> "vm-61_stop_0 hex-9" [ style = bold] "stonith hex-9" [ style=bold color="green" fontcolor="black" ] -"stonith_complete" -> "clvm:3_stop_0 hex-9" [ style = bold] -"stonith_complete" -> "cmirrord:3_stop_0 hex-9" [ style = bold] -"stonith_complete" -> "dlm:3_stop_0 hex-9" [ style = bold] "stonith_complete" -> "dummy1_start_0 hex-0" [ style = bold] -"stonith_complete" -> "dummy1_stop_0 hex-9" [ style = bold] -"stonith_complete" -> "o2cb:3_stop_0 hex-9" [ style = bold] -"stonith_complete" -> "ocfs2-1:3_stop_0 hex-9" [ style = bold] -"stonith_complete" -> "vg1:3_stop_0 hex-9" [ style = bold] -"stonith_complete" -> "vm-03_stop_0 hex-9" [ style = bold] -"stonith_complete" -> "vm-06_stop_0 hex-9" [ style = bold] -"stonith_complete" -> "vm-09_stop_0 hex-9" [ style = bold] -"stonith_complete" -> "vm-13_stop_0 hex-9" [ style = bold] -"stonith_complete" -> "vm-17_stop_0 hex-9" [ style = bold] -"stonith_complete" -> "vm-21_stop_0 hex-9" [ style = bold] -"stonith_complete" -> "vm-25_stop_0 hex-9" [ style = bold] -"stonith_complete" -> "vm-29_stop_0 hex-9" [ style = bold] -"stonith_complete" -> "vm-33_stop_0 hex-9" [ style = bold] -"stonith_complete" -> "vm-37_stop_0 hex-9" [ style = bold] -"stonith_complete" -> "vm-41_stop_0 hex-9" [ style = bold] -"stonith_complete" -> "vm-45_stop_0 hex-9" [ style = bold] -"stonith_complete" -> "vm-49_stop_0 hex-9" [ style = bold] -"stonith_complete" -> "vm-53_stop_0 hex-9" [ style = bold] -"stonith_complete" -> "vm-57_stop_0 hex-9" [ style = bold] -"stonith_complete" -> "vm-61_stop_0 hex-9" [ style = bold] "stonith_complete" [ style=bold color="green" fontcolor="orange" ] "stonith_up" -> "stonith hex-9" [ style = bold] "stonith_up" -> "stonith_complete" [ style = bold] "stonith_up" [ style=bold color="green" fontcolor="orange" ] "vg1:3_stop_0 hex-9" -> "all_stopped" [ style = bold] "vg1:3_stop_0 hex-9" -> "base-group:3_stopped_0" [ style = bold] "vg1:3_stop_0 hex-9" -> "cmirrord:3_stop_0 hex-9" [ style = bold] "vg1:3_stop_0 hex-9" [ style=bold color="green" fontcolor="orange" ] "vm-03_stop_0 hex-9" -> "all_stopped" [ style = bold] "vm-03_stop_0 hex-9" -> "base-clone_stop_0" [ style = bold] "vm-03_stop_0 hex-9" -> "load_stopped_hex-9 hex-9" [ style = bold] "vm-03_stop_0 hex-9" [ style=bold color="green" fontcolor="orange" ] "vm-06_stop_0 hex-9" -> "all_stopped" [ style = bold] "vm-06_stop_0 hex-9" -> "base-clone_stop_0" [ style = bold] "vm-06_stop_0 hex-9" -> "load_stopped_hex-9 hex-9" [ style = bold] "vm-06_stop_0 hex-9" [ style=bold color="green" fontcolor="orange" ] "vm-09_stop_0 hex-9" -> "all_stopped" [ style = bold] "vm-09_stop_0 hex-9" -> "base-clone_stop_0" [ style = bold] "vm-09_stop_0 hex-9" -> "load_stopped_hex-9 hex-9" [ style = bold] "vm-09_stop_0 hex-9" [ style=bold color="green" fontcolor="orange" ] "vm-13_stop_0 hex-9" -> "all_stopped" [ style = bold] "vm-13_stop_0 hex-9" -> "base-clone_stop_0" [ style = bold] "vm-13_stop_0 hex-9" -> "load_stopped_hex-9 hex-9" [ style = bold] "vm-13_stop_0 hex-9" [ style=bold color="green" fontcolor="orange" ] "vm-17_stop_0 hex-9" -> "all_stopped" [ style = bold] "vm-17_stop_0 hex-9" -> "base-clone_stop_0" [ style = bold] "vm-17_stop_0 hex-9" -> "load_stopped_hex-9 hex-9" [ style = bold] "vm-17_stop_0 hex-9" [ style=bold color="green" fontcolor="orange" ] "vm-21_stop_0 hex-9" -> "all_stopped" [ style = bold] "vm-21_stop_0 hex-9" -> "base-clone_stop_0" [ style = bold] "vm-21_stop_0 hex-9" -> "load_stopped_hex-9 hex-9" [ style = bold] "vm-21_stop_0 hex-9" [ style=bold color="green" fontcolor="orange" ] "vm-25_stop_0 hex-9" -> "all_stopped" [ style = bold] "vm-25_stop_0 hex-9" -> "base-clone_stop_0" [ style = bold] "vm-25_stop_0 hex-9" -> "load_stopped_hex-9 hex-9" [ style = bold] "vm-25_stop_0 hex-9" [ style=bold color="green" fontcolor="orange" ] "vm-29_stop_0 hex-9" -> "all_stopped" [ style = bold] "vm-29_stop_0 hex-9" -> "base-clone_stop_0" [ style = bold] "vm-29_stop_0 hex-9" -> "load_stopped_hex-9 hex-9" [ style = bold] "vm-29_stop_0 hex-9" [ style=bold color="green" fontcolor="orange" ] "vm-33_stop_0 hex-9" -> "all_stopped" [ style = bold] "vm-33_stop_0 hex-9" -> "base-clone_stop_0" [ style = bold] "vm-33_stop_0 hex-9" -> "load_stopped_hex-9 hex-9" [ style = bold] "vm-33_stop_0 hex-9" [ style=bold color="green" fontcolor="orange" ] "vm-37_stop_0 hex-9" -> "all_stopped" [ style = bold] "vm-37_stop_0 hex-9" -> "base-clone_stop_0" [ style = bold] "vm-37_stop_0 hex-9" -> "load_stopped_hex-9 hex-9" [ style = bold] "vm-37_stop_0 hex-9" [ style=bold color="green" fontcolor="orange" ] "vm-41_stop_0 hex-9" -> "all_stopped" [ style = bold] "vm-41_stop_0 hex-9" -> "base-clone_stop_0" [ style = bold] "vm-41_stop_0 hex-9" -> "load_stopped_hex-9 hex-9" [ style = bold] "vm-41_stop_0 hex-9" [ style=bold color="green" fontcolor="orange" ] "vm-45_stop_0 hex-9" -> "all_stopped" [ style = bold] "vm-45_stop_0 hex-9" -> "base-clone_stop_0" [ style = bold] "vm-45_stop_0 hex-9" -> "load_stopped_hex-9 hex-9" [ style = bold] "vm-45_stop_0 hex-9" [ style=bold color="green" fontcolor="orange" ] "vm-49_stop_0 hex-9" -> "all_stopped" [ style = bold] "vm-49_stop_0 hex-9" -> "base-clone_stop_0" [ style = bold] "vm-49_stop_0 hex-9" -> "load_stopped_hex-9 hex-9" [ style = bold] "vm-49_stop_0 hex-9" [ style=bold color="green" fontcolor="orange" ] "vm-53_stop_0 hex-9" -> "all_stopped" [ style = bold] "vm-53_stop_0 hex-9" -> "base-clone_stop_0" [ style = bold] "vm-53_stop_0 hex-9" -> "load_stopped_hex-9 hex-9" [ style = bold] "vm-53_stop_0 hex-9" [ style=bold color="green" fontcolor="orange" ] "vm-57_stop_0 hex-9" -> "all_stopped" [ style = bold] "vm-57_stop_0 hex-9" -> "base-clone_stop_0" [ style = bold] "vm-57_stop_0 hex-9" -> "load_stopped_hex-9 hex-9" [ style = bold] "vm-57_stop_0 hex-9" [ style=bold color="green" fontcolor="orange" ] "vm-61_stop_0 hex-9" -> "all_stopped" [ style = bold] "vm-61_stop_0 hex-9" -> "base-clone_stop_0" [ style = bold] "vm-61_stop_0 hex-9" -> "load_stopped_hex-9 hex-9" [ style = bold] "vm-61_stop_0 hex-9" [ style=bold color="green" fontcolor="orange" ] } diff --git a/pengine/test10/bug-lf-2551.exp b/pengine/test10/bug-lf-2551.exp index f253c46917..6f2eef171f 100644 --- a/pengine/test10/bug-lf-2551.exp +++ b/pengine/test10/bug-lf-2551.exp @@ -1,767 +1,698 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pengine/test10/bug-lf-2606.dot b/pengine/test10/bug-lf-2606.dot index 72e3e18a7a..e8aa67a6dd 100644 --- a/pengine/test10/bug-lf-2606.dot +++ b/pengine/test10/bug-lf-2606.dot @@ -1,44 +1,40 @@ digraph "g" { "all_stopped" [ style=bold color="green" fontcolor="orange"] "ms3_demote_0" -> "ms3_demoted_0" [ style = bold] "ms3_demote_0" -> "rsc3:1_demote_0 node2" [ style = bold] "ms3_demote_0" [ style=bold color="green" fontcolor="orange"] "ms3_demoted_0" -> "ms3_stop_0" [ style = bold] "ms3_demoted_0" [ style=bold color="green" fontcolor="orange"] "ms3_stop_0" -> "ms3_stopped_0" [ style = bold] "ms3_stop_0" -> "rsc3:1_stop_0 node2" [ style = bold] "ms3_stop_0" [ style=bold color="green" fontcolor="orange"] "ms3_stopped_0" [ style=bold color="green" fontcolor="orange"] "probe_complete node1" [ style=bold color="green" fontcolor="black"] "rsc1_stop_0 node2" -> "all_stopped" [ style = bold] "rsc1_stop_0 node2" [ style=bold color="green" fontcolor="orange"] "rsc2_monitor_10000 node1" [ style=bold color="green" fontcolor="black"] "rsc2_start_0 node1" -> "rsc2_monitor_10000 node1" [ style = bold] "rsc2_start_0 node1" [ style=bold color="green" fontcolor="black"] "rsc2_stop_0 node2" -> "all_stopped" [ style = bold] "rsc2_stop_0 node2" -> "rsc2_start_0 node1" [ style = bold] "rsc2_stop_0 node2" [ style=bold color="green" fontcolor="orange"] "rsc3:1_demote_0 node2" -> "ms3_demoted_0" [ style = bold] "rsc3:1_demote_0 node2" -> "rsc3:1_stop_0 node2" [ style = bold] "rsc3:1_demote_0 node2" [ style=bold color="green" fontcolor="orange"] "rsc3:1_stop_0 node2" -> "all_stopped" [ style = bold] "rsc3:1_stop_0 node2" -> "ms3_stopped_0" [ style = bold] "rsc3:1_stop_0 node2" [ style=bold color="green" fontcolor="orange"] "stonith node2" -> "all_stopped" [ style = bold] "stonith node2" -> "ms3_stop_0" [ style = bold] "stonith node2" -> "rsc1_stop_0 node2" [ style = bold] "stonith node2" -> "rsc2_stop_0 node2" [ style = bold] "stonith node2" -> "rsc3:1_demote_0 node2" [ style = bold] "stonith node2" -> "rsc3:1_stop_0 node2" [ style = bold] "stonith node2" -> "stonith_complete" [ style = bold] "stonith node2" [ style=bold color="green" fontcolor="black"] -"stonith_complete" -> "rsc1_stop_0 node2" [ style = bold] "stonith_complete" -> "rsc2_start_0 node1" [ style = bold] -"stonith_complete" -> "rsc2_stop_0 node2" [ style = bold] -"stonith_complete" -> "rsc3:1_demote_0 node2" [ style = bold] -"stonith_complete" -> "rsc3:1_stop_0 node2" [ style = bold] "stonith_complete" [ style=bold color="green" fontcolor="orange"] "stonith_up" -> "stonith node2" [ style = bold] "stonith_up" -> "stonith_complete" [ style = bold] "stonith_up" [ style=bold color="green" fontcolor="orange"] } diff --git a/pengine/test10/bug-lf-2606.exp b/pengine/test10/bug-lf-2606.exp index 52e1d2bea7..ecc214ac21 100644 --- a/pengine/test10/bug-lf-2606.exp +++ b/pengine/test10/bug-lf-2606.exp @@ -1,218 +1,206 @@ - - - - - - - - - - - - diff --git a/pengine/test10/rec-node-11.dot b/pengine/test10/rec-node-11.dot index ee6126e806..24f043e85e 100644 --- a/pengine/test10/rec-node-11.dot +++ b/pengine/test10/rec-node-11.dot @@ -1,67 +1,64 @@ digraph "g" { "all_stopped" [ style=bold color="green" fontcolor="orange" ] "group1_running_0" [ style=bold color="green" fontcolor="orange" ] "group1_start_0" -> "group1_running_0" [ style = bold] "group1_start_0" -> "rsc1_start_0 node2" [ style = bold] "group1_start_0" -> "rsc2_start_0 node2" [ style = bold] "group1_start_0" [ style=bold color="green" fontcolor="orange" ] "group1_stop_0" -> "group1_stopped_0" [ style = bold] "group1_stop_0" -> "rsc1_stop_0 node1" [ style = bold] "group1_stop_0" -> "rsc2_stop_0 node1" [ style = bold] "group1_stop_0" [ style=bold color="green" fontcolor="orange" ] "group1_stopped_0" -> "group1_start_0" [ style = bold] "group1_stopped_0" -> "rsc3_stop_0 node2" [ style = bold] "group1_stopped_0" [ style=bold color="green" fontcolor="orange" ] "probe_complete node2" -> "probe_complete" [ style = bold] "probe_complete node2" [ style=bold color="green" fontcolor="black" ] "probe_complete" -> "rsc1_start_0 node2" [ style = bold] "probe_complete" -> "rsc1_stop_0 node1" [ style = bold] "probe_complete" -> "rsc2_start_0 node2" [ style = bold] "probe_complete" -> "rsc2_stop_0 node1" [ style = bold] "probe_complete" -> "rsc3_stop_0 node2" [ style = bold] "probe_complete" -> "stonith-1_start_0 node2" [ style = bold] "probe_complete" [ style=bold color="green" fontcolor="orange" ] "rsc1_monitor_0 node2" -> "probe_complete node2" [ style = bold] "rsc1_monitor_0 node2" [ style=bold color="green" fontcolor="black" ] "rsc1_start_0 node2" -> "group1_running_0" [ style = bold] "rsc1_start_0 node2" -> "rsc2_start_0 node2" [ style = bold] "rsc1_start_0 node2" [ style=bold color="green" fontcolor="black" ] "rsc1_stop_0 node1" -> "all_stopped" [ style = bold] "rsc1_stop_0 node1" -> "group1_stopped_0" [ style = bold] "rsc1_stop_0 node1" -> "rsc1_start_0 node2" [ style = bold] "rsc1_stop_0 node1" [ style=bold color="green" fontcolor="orange" ] "rsc2_monitor_0 node2" -> "probe_complete node2" [ style = bold] "rsc2_monitor_0 node2" [ style=bold color="green" fontcolor="black" ] "rsc2_start_0 node2" -> "group1_running_0" [ style = bold] "rsc2_start_0 node2" [ style=bold color="green" fontcolor="black" ] "rsc2_stop_0 node1" -> "all_stopped" [ style = bold] "rsc2_stop_0 node1" -> "group1_stopped_0" [ style = bold] "rsc2_stop_0 node1" -> "rsc1_stop_0 node1" [ style = bold] "rsc2_stop_0 node1" -> "rsc2_start_0 node2" [ style = bold] "rsc2_stop_0 node1" [ style=bold color="green" fontcolor="orange" ] "rsc3_start_0 node2" -> "group1_start_0" [ style = bold] "rsc3_start_0 node2" [ style=bold color="green" fontcolor="black" ] "rsc3_stop_0 node2" -> "all_stopped" [ style = bold] "rsc3_stop_0 node2" -> "rsc3_start_0 node2" [ style = bold] "rsc3_stop_0 node2" [ style=bold color="green" fontcolor="black" ] "stonith node1" -> "all_stopped" [ style = bold] "stonith node1" -> "group1_stop_0" [ style = bold] "stonith node1" -> "rsc1_stop_0 node1" [ style = bold] "stonith node1" -> "rsc2_stop_0 node1" [ style = bold] "stonith node1" -> "stonith_complete" [ style = bold] "stonith node1" [ style=bold color="green" fontcolor="black" ] "stonith-1_monitor_0 node2" -> "probe_complete node2" [ style = bold] "stonith-1_monitor_0 node2" [ style=bold color="green" fontcolor="black" ] "stonith-1_start_0 node2" -> "stonith_up" [ style = bold] "stonith-1_start_0 node2" [ style=bold color="green" fontcolor="black" ] "stonith_complete" -> "rsc1_start_0 node2" [ style = bold] -"stonith_complete" -> "rsc1_stop_0 node1" [ style = bold] "stonith_complete" -> "rsc2_start_0 node2" [ style = bold] -"stonith_complete" -> "rsc2_stop_0 node1" [ style = bold] "stonith_complete" -> "rsc3_start_0 node2" [ style = bold] -"stonith_complete" -> "rsc3_stop_0 node2" [ style = bold] "stonith_complete" [ style=bold color="green" fontcolor="orange" ] "stonith_up" -> "stonith node1" [ style = bold] "stonith_up" -> "stonith_complete" [ style = bold] "stonith_up" [ style=bold color="green" fontcolor="orange" ] } diff --git a/pengine/test10/rec-node-11.exp b/pengine/test10/rec-node-11.exp index b34815439f..5122873212 100644 --- a/pengine/test10/rec-node-11.exp +++ b/pengine/test10/rec-node-11.exp @@ -1,323 +1,314 @@ - - - - - - - - - diff --git a/pengine/test10/rec-node-4.dot b/pengine/test10/rec-node-4.dot index 13e3252685..298a297260 100644 --- a/pengine/test10/rec-node-4.dot +++ b/pengine/test10/rec-node-4.dot @@ -1,40 +1,38 @@ digraph "g" { "all_stopped" [ style=bold color="green" fontcolor="orange" ] "probe_complete node2" -> "probe_complete" [ style = bold] "probe_complete node2" [ style=bold color="green" fontcolor="black" ] "probe_complete" -> "rsc1_start_0 node2" [ style = bold] "probe_complete" -> "rsc1_stop_0 node1" [ style = bold] "probe_complete" -> "rsc2_start_0 node2" [ style = bold] "probe_complete" -> "rsc2_stop_0 node1" [ style = bold] "probe_complete" -> "stonith-1_start_0 node2" [ style = bold] "probe_complete" [ style=bold color="green" fontcolor="orange" ] "rsc1_monitor_0 node2" -> "probe_complete node2" [ style = bold] "rsc1_monitor_0 node2" [ style=bold color="green" fontcolor="black" ] "rsc1_start_0 node2" [ style=bold color="green" fontcolor="black" ] "rsc1_stop_0 node1" -> "all_stopped" [ style = bold] "rsc1_stop_0 node1" -> "rsc1_start_0 node2" [ style = bold] "rsc1_stop_0 node1" [ style=bold color="green" fontcolor="orange" ] "rsc2_monitor_0 node2" -> "probe_complete node2" [ style = bold] "rsc2_monitor_0 node2" [ style=bold color="green" fontcolor="black" ] "rsc2_start_0 node2" [ style=bold color="green" fontcolor="black" ] "rsc2_stop_0 node1" -> "all_stopped" [ style = bold] "rsc2_stop_0 node1" -> "rsc2_start_0 node2" [ style = bold] "rsc2_stop_0 node1" [ style=bold color="green" fontcolor="orange" ] "stonith node1" -> "all_stopped" [ style = bold] "stonith node1" -> "rsc1_stop_0 node1" [ style = bold] "stonith node1" -> "rsc2_stop_0 node1" [ style = bold] "stonith node1" -> "stonith_complete" [ style = bold] "stonith node1" [ style=bold color="green" fontcolor="black" ] "stonith-1_monitor_0 node2" -> "probe_complete node2" [ style = bold] "stonith-1_monitor_0 node2" [ style=bold color="green" fontcolor="black" ] "stonith-1_start_0 node2" -> "stonith_up" [ style = bold] "stonith-1_start_0 node2" [ style=bold color="green" fontcolor="black" ] "stonith_complete" -> "rsc1_start_0 node2" [ style = bold] -"stonith_complete" -> "rsc1_stop_0 node1" [ style = bold] "stonith_complete" -> "rsc2_start_0 node2" [ style = bold] -"stonith_complete" -> "rsc2_stop_0 node1" [ style = bold] "stonith_complete" [ style=bold color="green" fontcolor="orange" ] "stonith_up" -> "stonith node1" [ style = bold] "stonith_up" -> "stonith_complete" [ style = bold] "stonith_up" [ style=bold color="green" fontcolor="orange" ] } diff --git a/pengine/test10/rec-node-4.exp b/pengine/test10/rec-node-4.exp index df75f9c5ab..5614c6dcc5 100644 --- a/pengine/test10/rec-node-4.exp +++ b/pengine/test10/rec-node-4.exp @@ -1,204 +1,198 @@ - - - - - - diff --git a/pengine/test10/rec-node-6.dot b/pengine/test10/rec-node-6.dot index 13e3252685..298a297260 100644 --- a/pengine/test10/rec-node-6.dot +++ b/pengine/test10/rec-node-6.dot @@ -1,40 +1,38 @@ digraph "g" { "all_stopped" [ style=bold color="green" fontcolor="orange" ] "probe_complete node2" -> "probe_complete" [ style = bold] "probe_complete node2" [ style=bold color="green" fontcolor="black" ] "probe_complete" -> "rsc1_start_0 node2" [ style = bold] "probe_complete" -> "rsc1_stop_0 node1" [ style = bold] "probe_complete" -> "rsc2_start_0 node2" [ style = bold] "probe_complete" -> "rsc2_stop_0 node1" [ style = bold] "probe_complete" -> "stonith-1_start_0 node2" [ style = bold] "probe_complete" [ style=bold color="green" fontcolor="orange" ] "rsc1_monitor_0 node2" -> "probe_complete node2" [ style = bold] "rsc1_monitor_0 node2" [ style=bold color="green" fontcolor="black" ] "rsc1_start_0 node2" [ style=bold color="green" fontcolor="black" ] "rsc1_stop_0 node1" -> "all_stopped" [ style = bold] "rsc1_stop_0 node1" -> "rsc1_start_0 node2" [ style = bold] "rsc1_stop_0 node1" [ style=bold color="green" fontcolor="orange" ] "rsc2_monitor_0 node2" -> "probe_complete node2" [ style = bold] "rsc2_monitor_0 node2" [ style=bold color="green" fontcolor="black" ] "rsc2_start_0 node2" [ style=bold color="green" fontcolor="black" ] "rsc2_stop_0 node1" -> "all_stopped" [ style = bold] "rsc2_stop_0 node1" -> "rsc2_start_0 node2" [ style = bold] "rsc2_stop_0 node1" [ style=bold color="green" fontcolor="orange" ] "stonith node1" -> "all_stopped" [ style = bold] "stonith node1" -> "rsc1_stop_0 node1" [ style = bold] "stonith node1" -> "rsc2_stop_0 node1" [ style = bold] "stonith node1" -> "stonith_complete" [ style = bold] "stonith node1" [ style=bold color="green" fontcolor="black" ] "stonith-1_monitor_0 node2" -> "probe_complete node2" [ style = bold] "stonith-1_monitor_0 node2" [ style=bold color="green" fontcolor="black" ] "stonith-1_start_0 node2" -> "stonith_up" [ style = bold] "stonith-1_start_0 node2" [ style=bold color="green" fontcolor="black" ] "stonith_complete" -> "rsc1_start_0 node2" [ style = bold] -"stonith_complete" -> "rsc1_stop_0 node1" [ style = bold] "stonith_complete" -> "rsc2_start_0 node2" [ style = bold] -"stonith_complete" -> "rsc2_stop_0 node1" [ style = bold] "stonith_complete" [ style=bold color="green" fontcolor="orange" ] "stonith_up" -> "stonith node1" [ style = bold] "stonith_up" -> "stonith_complete" [ style = bold] "stonith_up" [ style=bold color="green" fontcolor="orange" ] } diff --git a/pengine/test10/rec-node-6.exp b/pengine/test10/rec-node-6.exp index df75f9c5ab..5614c6dcc5 100644 --- a/pengine/test10/rec-node-6.exp +++ b/pengine/test10/rec-node-6.exp @@ -1,204 +1,198 @@ - - - - - - diff --git a/pengine/test10/rec-node-7.dot b/pengine/test10/rec-node-7.dot index 13e3252685..298a297260 100644 --- a/pengine/test10/rec-node-7.dot +++ b/pengine/test10/rec-node-7.dot @@ -1,40 +1,38 @@ digraph "g" { "all_stopped" [ style=bold color="green" fontcolor="orange" ] "probe_complete node2" -> "probe_complete" [ style = bold] "probe_complete node2" [ style=bold color="green" fontcolor="black" ] "probe_complete" -> "rsc1_start_0 node2" [ style = bold] "probe_complete" -> "rsc1_stop_0 node1" [ style = bold] "probe_complete" -> "rsc2_start_0 node2" [ style = bold] "probe_complete" -> "rsc2_stop_0 node1" [ style = bold] "probe_complete" -> "stonith-1_start_0 node2" [ style = bold] "probe_complete" [ style=bold color="green" fontcolor="orange" ] "rsc1_monitor_0 node2" -> "probe_complete node2" [ style = bold] "rsc1_monitor_0 node2" [ style=bold color="green" fontcolor="black" ] "rsc1_start_0 node2" [ style=bold color="green" fontcolor="black" ] "rsc1_stop_0 node1" -> "all_stopped" [ style = bold] "rsc1_stop_0 node1" -> "rsc1_start_0 node2" [ style = bold] "rsc1_stop_0 node1" [ style=bold color="green" fontcolor="orange" ] "rsc2_monitor_0 node2" -> "probe_complete node2" [ style = bold] "rsc2_monitor_0 node2" [ style=bold color="green" fontcolor="black" ] "rsc2_start_0 node2" [ style=bold color="green" fontcolor="black" ] "rsc2_stop_0 node1" -> "all_stopped" [ style = bold] "rsc2_stop_0 node1" -> "rsc2_start_0 node2" [ style = bold] "rsc2_stop_0 node1" [ style=bold color="green" fontcolor="orange" ] "stonith node1" -> "all_stopped" [ style = bold] "stonith node1" -> "rsc1_stop_0 node1" [ style = bold] "stonith node1" -> "rsc2_stop_0 node1" [ style = bold] "stonith node1" -> "stonith_complete" [ style = bold] "stonith node1" [ style=bold color="green" fontcolor="black" ] "stonith-1_monitor_0 node2" -> "probe_complete node2" [ style = bold] "stonith-1_monitor_0 node2" [ style=bold color="green" fontcolor="black" ] "stonith-1_start_0 node2" -> "stonith_up" [ style = bold] "stonith-1_start_0 node2" [ style=bold color="green" fontcolor="black" ] "stonith_complete" -> "rsc1_start_0 node2" [ style = bold] -"stonith_complete" -> "rsc1_stop_0 node1" [ style = bold] "stonith_complete" -> "rsc2_start_0 node2" [ style = bold] -"stonith_complete" -> "rsc2_stop_0 node1" [ style = bold] "stonith_complete" [ style=bold color="green" fontcolor="orange" ] "stonith_up" -> "stonith node1" [ style = bold] "stonith_up" -> "stonith_complete" [ style = bold] "stonith_up" [ style=bold color="green" fontcolor="orange" ] } diff --git a/pengine/test10/rec-node-7.exp b/pengine/test10/rec-node-7.exp index df75f9c5ab..5614c6dcc5 100644 --- a/pengine/test10/rec-node-7.exp +++ b/pengine/test10/rec-node-7.exp @@ -1,204 +1,198 @@ - - - - - - diff --git a/pengine/test10/rec-rsc-5.dot b/pengine/test10/rec-rsc-5.dot index 40e3db383c..dc10dec800 100644 --- a/pengine/test10/rec-rsc-5.dot +++ b/pengine/test10/rec-rsc-5.dot @@ -1,40 +1,38 @@ digraph "g" { "all_stopped" [ style=bold color="green" fontcolor="orange" ] "probe_complete node1" -> "probe_complete" [ style = bold] "probe_complete node1" [ style=bold color="green" fontcolor="black" ] "probe_complete" -> "rsc1_start_0 node1" [ style = bold] "probe_complete" -> "rsc1_stop_0 node2" [ style = bold] "probe_complete" -> "rsc2_start_0 node1" [ style = bold] "probe_complete" -> "rsc2_stop_0 node2" [ style = bold] "probe_complete" -> "stonith-1_start_0 node1" [ style = bold] "probe_complete" [ style=bold color="green" fontcolor="orange" ] "rsc1_monitor_0 node1" -> "probe_complete node1" [ style = bold] "rsc1_monitor_0 node1" [ style=bold color="green" fontcolor="black" ] "rsc1_start_0 node1" [ style=bold color="green" fontcolor="black" ] "rsc1_stop_0 node2" -> "all_stopped" [ style = bold] "rsc1_stop_0 node2" -> "rsc1_start_0 node1" [ style = bold] "rsc1_stop_0 node2" [ style=bold color="green" fontcolor="orange" ] "rsc2_monitor_0 node1" -> "probe_complete node1" [ style = bold] "rsc2_monitor_0 node1" [ style=bold color="green" fontcolor="black" ] "rsc2_start_0 node1" [ style=bold color="green" fontcolor="black" ] "rsc2_stop_0 node2" -> "all_stopped" [ style = bold] "rsc2_stop_0 node2" -> "rsc2_start_0 node1" [ style = bold] "rsc2_stop_0 node2" [ style=bold color="green" fontcolor="orange" ] "stonith node2" -> "all_stopped" [ style = bold] "stonith node2" -> "rsc1_stop_0 node2" [ style = bold] "stonith node2" -> "rsc2_stop_0 node2" [ style = bold] "stonith node2" -> "stonith_complete" [ style = bold] "stonith node2" [ style=bold color="green" fontcolor="black" ] "stonith-1_monitor_0 node1" -> "probe_complete node1" [ style = bold] "stonith-1_monitor_0 node1" [ style=bold color="green" fontcolor="black" ] "stonith-1_start_0 node1" -> "stonith_up" [ style = bold] "stonith-1_start_0 node1" [ style=bold color="green" fontcolor="black" ] "stonith_complete" -> "rsc1_start_0 node1" [ style = bold] -"stonith_complete" -> "rsc1_stop_0 node2" [ style = bold] "stonith_complete" -> "rsc2_start_0 node1" [ style = bold] -"stonith_complete" -> "rsc2_stop_0 node2" [ style = bold] "stonith_complete" [ style=bold color="green" fontcolor="orange" ] "stonith_up" -> "stonith node2" [ style = bold] "stonith_up" -> "stonith_complete" [ style = bold] "stonith_up" [ style=bold color="green" fontcolor="orange" ] } diff --git a/pengine/test10/rec-rsc-5.exp b/pengine/test10/rec-rsc-5.exp index 3010b46052..e10a577b8a 100644 --- a/pengine/test10/rec-rsc-5.exp +++ b/pengine/test10/rec-rsc-5.exp @@ -1,204 +1,198 @@ - - - - - - diff --git a/pengine/test10/ticket-clone-21.dot b/pengine/test10/ticket-clone-21.dot index d47eaeba4a..4eb731294a 100644 --- a/pengine/test10/ticket-clone-21.dot +++ b/pengine/test10/ticket-clone-21.dot @@ -1,31 +1,29 @@ digraph "g" { "all_stopped" [ style=bold color="green" fontcolor="orange"] "clone1_stop_0" -> "clone1_stopped_0" [ style = bold] "clone1_stop_0" -> "rsc1:0_stop_0 node2" [ style = bold] "clone1_stop_0" -> "rsc1:1_stop_0 node1" [ style = bold] "clone1_stop_0" [ style=bold color="green" fontcolor="orange"] "clone1_stopped_0" [ style=bold color="green" fontcolor="orange"] "rsc1:0_stop_0 node2" -> "all_stopped" [ style = bold] "rsc1:0_stop_0 node2" -> "clone1_stopped_0" [ style = bold] "rsc1:0_stop_0 node2" [ style=bold color="green" fontcolor="orange"] "rsc1:1_stop_0 node1" -> "all_stopped" [ style = bold] "rsc1:1_stop_0 node1" -> "clone1_stopped_0" [ style = bold] "rsc1:1_stop_0 node1" [ style=bold color="green" fontcolor="orange"] "stonith node1" -> "all_stopped" [ style = bold] "stonith node1" -> "clone1_stop_0" [ style = bold] "stonith node1" -> "rsc1:1_stop_0 node1" [ style = bold] "stonith node1" -> "stonith node2" [ style = bold] "stonith node1" [ style=bold color="green" fontcolor="black"] "stonith node2" -> "all_stopped" [ style = bold] "stonith node2" -> "clone1_stop_0" [ style = bold] "stonith node2" -> "rsc1:0_stop_0 node2" [ style = bold] "stonith node2" -> "stonith_complete" [ style = bold] "stonith node2" [ style=bold color="green" fontcolor="black"] -"stonith_complete" -> "rsc1:0_stop_0 node2" [ style = bold] -"stonith_complete" -> "rsc1:1_stop_0 node1" [ style = bold] "stonith_complete" [ style=bold color="green" fontcolor="orange"] "stonith_up" -> "stonith node1" [ style = bold] "stonith_up" -> "stonith node2" [ style = bold] "stonith_up" -> "stonith_complete" [ style = bold] "stonith_up" [ style=bold color="green" fontcolor="orange"] } diff --git a/pengine/test10/ticket-clone-21.exp b/pengine/test10/ticket-clone-21.exp index 7e96c3620b..599bbb7478 100644 --- a/pengine/test10/ticket-clone-21.exp +++ b/pengine/test10/ticket-clone-21.exp @@ -1,143 +1,137 @@ - - - - - - diff --git a/pengine/test10/ticket-clone-9.dot b/pengine/test10/ticket-clone-9.dot index 6aafce077e..689cd48cbf 100644 --- a/pengine/test10/ticket-clone-9.dot +++ b/pengine/test10/ticket-clone-9.dot @@ -1,31 +1,29 @@ digraph "g" { "all_stopped" [ style=bold color="green" fontcolor="orange" ] "clone1_stop_0" -> "clone1_stopped_0" [ style = bold] "clone1_stop_0" -> "rsc1:0_stop_0 node2" [ style = bold] "clone1_stop_0" -> "rsc1:1_stop_0 node1" [ style = bold] "clone1_stop_0" [ style=bold color="green" fontcolor="orange" ] "clone1_stopped_0" [ style=bold color="green" fontcolor="orange" ] "rsc1:0_stop_0 node2" -> "all_stopped" [ style = bold] "rsc1:0_stop_0 node2" -> "clone1_stopped_0" [ style = bold] "rsc1:0_stop_0 node2" [ style=bold color="green" fontcolor="orange" ] "rsc1:1_stop_0 node1" -> "all_stopped" [ style = bold] "rsc1:1_stop_0 node1" -> "clone1_stopped_0" [ style = bold] "rsc1:1_stop_0 node1" [ style=bold color="green" fontcolor="orange" ] "stonith node1" -> "all_stopped" [ style = bold] "stonith node1" -> "clone1_stop_0" [ style = bold] "stonith node1" -> "rsc1:1_stop_0 node1" [ style = bold] "stonith node1" -> "stonith node2" [ style = bold] "stonith node1" [ style=bold color="green" fontcolor="black" ] "stonith node2" -> "all_stopped" [ style = bold] "stonith node2" -> "clone1_stop_0" [ style = bold] "stonith node2" -> "rsc1:0_stop_0 node2" [ style = bold] "stonith node2" -> "stonith_complete" [ style = bold] "stonith node2" [ style=bold color="green" fontcolor="black" ] -"stonith_complete" -> "rsc1:0_stop_0 node2" [ style = bold] -"stonith_complete" -> "rsc1:1_stop_0 node1" [ style = bold] "stonith_complete" [ style=bold color="green" fontcolor="orange" ] "stonith_up" -> "stonith node1" [ style = bold] "stonith_up" -> "stonith node2" [ style = bold] "stonith_up" -> "stonith_complete" [ style = bold] "stonith_up" [ style=bold color="green" fontcolor="orange" ] } diff --git a/pengine/test10/ticket-clone-9.exp b/pengine/test10/ticket-clone-9.exp index 7e96c3620b..599bbb7478 100644 --- a/pengine/test10/ticket-clone-9.exp +++ b/pengine/test10/ticket-clone-9.exp @@ -1,143 +1,137 @@ - - - - - - diff --git a/pengine/test10/ticket-group-21.dot b/pengine/test10/ticket-group-21.dot index 9ebd732168..9ee3fc875f 100644 --- a/pengine/test10/ticket-group-21.dot +++ b/pengine/test10/ticket-group-21.dot @@ -1,28 +1,26 @@ digraph "g" { "all_stopped" [ style=bold color="green" fontcolor="orange"] "group1_stop_0" -> "group1_stopped_0" [ style = bold] "group1_stop_0" -> "rsc1_stop_0 node2" [ style = bold] "group1_stop_0" -> "rsc2_stop_0 node2" [ style = bold] "group1_stop_0" [ style=bold color="green" fontcolor="orange"] "group1_stopped_0" [ style=bold color="green" fontcolor="orange"] "probe_complete node1" [ style=bold color="green" fontcolor="black"] "rsc1_stop_0 node2" -> "all_stopped" [ style = bold] "rsc1_stop_0 node2" -> "group1_stopped_0" [ style = bold] "rsc1_stop_0 node2" [ style=bold color="green" fontcolor="orange"] "rsc2_stop_0 node2" -> "all_stopped" [ style = bold] "rsc2_stop_0 node2" -> "group1_stopped_0" [ style = bold] "rsc2_stop_0 node2" -> "rsc1_stop_0 node2" [ style = bold] "rsc2_stop_0 node2" [ style=bold color="green" fontcolor="orange"] "stonith node2" -> "all_stopped" [ style = bold] "stonith node2" -> "group1_stop_0" [ style = bold] "stonith node2" -> "rsc1_stop_0 node2" [ style = bold] "stonith node2" -> "rsc2_stop_0 node2" [ style = bold] "stonith node2" -> "stonith_complete" [ style = bold] "stonith node2" [ style=bold color="green" fontcolor="black"] -"stonith_complete" -> "rsc1_stop_0 node2" [ style = bold] -"stonith_complete" -> "rsc2_stop_0 node2" [ style = bold] "stonith_complete" [ style=bold color="green" fontcolor="orange"] "stonith_up" -> "stonith node2" [ style = bold] "stonith_up" -> "stonith_complete" [ style = bold] "stonith_up" [ style=bold color="green" fontcolor="orange"] } diff --git a/pengine/test10/ticket-group-21.exp b/pengine/test10/ticket-group-21.exp index dd729dd2d9..e484bc75fc 100644 --- a/pengine/test10/ticket-group-21.exp +++ b/pengine/test10/ticket-group-21.exp @@ -1,133 +1,127 @@ - - - - - - diff --git a/pengine/test10/ticket-group-9.dot b/pengine/test10/ticket-group-9.dot index 090a149968..3641a38cfe 100644 --- a/pengine/test10/ticket-group-9.dot +++ b/pengine/test10/ticket-group-9.dot @@ -1,28 +1,26 @@ digraph "g" { "all_stopped" [ style=bold color="green" fontcolor="orange" ] "group1_stop_0" -> "group1_stopped_0" [ style = bold] "group1_stop_0" -> "rsc1_stop_0 node2" [ style = bold] "group1_stop_0" -> "rsc2_stop_0 node2" [ style = bold] "group1_stop_0" [ style=bold color="green" fontcolor="orange" ] "group1_stopped_0" [ style=bold color="green" fontcolor="orange" ] "probe_complete node1" [ style=bold color="green" fontcolor="black" ] "rsc1_stop_0 node2" -> "all_stopped" [ style = bold] "rsc1_stop_0 node2" -> "group1_stopped_0" [ style = bold] "rsc1_stop_0 node2" [ style=bold color="green" fontcolor="orange" ] "rsc2_stop_0 node2" -> "all_stopped" [ style = bold] "rsc2_stop_0 node2" -> "group1_stopped_0" [ style = bold] "rsc2_stop_0 node2" -> "rsc1_stop_0 node2" [ style = bold] "rsc2_stop_0 node2" [ style=bold color="green" fontcolor="orange" ] "stonith node2" -> "all_stopped" [ style = bold] "stonith node2" -> "group1_stop_0" [ style = bold] "stonith node2" -> "rsc1_stop_0 node2" [ style = bold] "stonith node2" -> "rsc2_stop_0 node2" [ style = bold] "stonith node2" -> "stonith_complete" [ style = bold] "stonith node2" [ style=bold color="green" fontcolor="black" ] -"stonith_complete" -> "rsc1_stop_0 node2" [ style = bold] -"stonith_complete" -> "rsc2_stop_0 node2" [ style = bold] "stonith_complete" [ style=bold color="green" fontcolor="orange" ] "stonith_up" -> "stonith node2" [ style = bold] "stonith_up" -> "stonith_complete" [ style = bold] "stonith_up" [ style=bold color="green" fontcolor="orange" ] } diff --git a/pengine/test10/ticket-group-9.exp b/pengine/test10/ticket-group-9.exp index dd729dd2d9..e484bc75fc 100644 --- a/pengine/test10/ticket-group-9.exp +++ b/pengine/test10/ticket-group-9.exp @@ -1,133 +1,127 @@ - - - - - - diff --git a/pengine/test10/ticket-master-21.dot b/pengine/test10/ticket-master-21.dot index 587b2201fb..584603d028 100644 --- a/pengine/test10/ticket-master-21.dot +++ b/pengine/test10/ticket-master-21.dot @@ -1,31 +1,29 @@ digraph "g" { "all_stopped" [ style=bold color="green" fontcolor="orange"] "ms1_demote_0" -> "ms1_demoted_0" [ style = bold] "ms1_demote_0" -> "rsc1:1_demote_0 node1" [ style = bold] "ms1_demote_0" [ style=bold color="green" fontcolor="orange"] "ms1_demoted_0" -> "ms1_stop_0" [ style = bold] "ms1_demoted_0" [ style=bold color="green" fontcolor="orange"] "ms1_stop_0" -> "ms1_stopped_0" [ style = bold] "ms1_stop_0" -> "rsc1:1_stop_0 node1" [ style = bold] "ms1_stop_0" [ style=bold color="green" fontcolor="orange"] "ms1_stopped_0" [ style=bold color="green" fontcolor="orange"] "probe_complete node2" [ style=bold color="green" fontcolor="black"] "rsc1:1_demote_0 node1" -> "ms1_demoted_0" [ style = bold] "rsc1:1_demote_0 node1" -> "rsc1:1_stop_0 node1" [ style = bold] "rsc1:1_demote_0 node1" [ style=bold color="green" fontcolor="orange"] "rsc1:1_stop_0 node1" -> "all_stopped" [ style = bold] "rsc1:1_stop_0 node1" -> "ms1_stopped_0" [ style = bold] "rsc1:1_stop_0 node1" [ style=bold color="green" fontcolor="orange"] "stonith node1" -> "all_stopped" [ style = bold] "stonith node1" -> "ms1_stop_0" [ style = bold] "stonith node1" -> "rsc1:1_demote_0 node1" [ style = bold] "stonith node1" -> "rsc1:1_stop_0 node1" [ style = bold] "stonith node1" -> "stonith_complete" [ style = bold] "stonith node1" [ style=bold color="green" fontcolor="black"] -"stonith_complete" -> "rsc1:1_demote_0 node1" [ style = bold] -"stonith_complete" -> "rsc1:1_stop_0 node1" [ style = bold] "stonith_complete" [ style=bold color="green" fontcolor="orange"] "stonith_up" -> "stonith node1" [ style = bold] "stonith_up" -> "stonith_complete" [ style = bold] "stonith_up" [ style=bold color="green" fontcolor="orange"] } diff --git a/pengine/test10/ticket-master-21.exp b/pengine/test10/ticket-master-21.exp index 986fb6a147..9e9f741d3a 100644 --- a/pengine/test10/ticket-master-21.exp +++ b/pengine/test10/ticket-master-21.exp @@ -1,153 +1,147 @@ - - - - - - diff --git a/pengine/test10/ticket-master-9.dot b/pengine/test10/ticket-master-9.dot index 7d432d6cc8..4644a08f76 100644 --- a/pengine/test10/ticket-master-9.dot +++ b/pengine/test10/ticket-master-9.dot @@ -1,31 +1,29 @@ digraph "g" { "all_stopped" [ style=bold color="green" fontcolor="orange" ] "ms1_demote_0" -> "ms1_demoted_0" [ style = bold] "ms1_demote_0" -> "rsc1:1_demote_0 node1" [ style = bold] "ms1_demote_0" [ style=bold color="green" fontcolor="orange" ] "ms1_demoted_0" -> "ms1_stop_0" [ style = bold] "ms1_demoted_0" [ style=bold color="green" fontcolor="orange" ] "ms1_stop_0" -> "ms1_stopped_0" [ style = bold] "ms1_stop_0" -> "rsc1:1_stop_0 node1" [ style = bold] "ms1_stop_0" [ style=bold color="green" fontcolor="orange" ] "ms1_stopped_0" [ style=bold color="green" fontcolor="orange" ] "probe_complete node2" [ style=bold color="green" fontcolor="black" ] "rsc1:1_demote_0 node1" -> "ms1_demoted_0" [ style = bold] "rsc1:1_demote_0 node1" -> "rsc1:1_stop_0 node1" [ style = bold] "rsc1:1_demote_0 node1" [ style=bold color="green" fontcolor="orange"] "rsc1:1_stop_0 node1" -> "all_stopped" [ style = bold] "rsc1:1_stop_0 node1" -> "ms1_stopped_0" [ style = bold] "rsc1:1_stop_0 node1" [ style=bold color="green" fontcolor="orange" ] "stonith node1" -> "all_stopped" [ style = bold] "stonith node1" -> "ms1_stop_0" [ style = bold] "stonith node1" -> "rsc1:1_demote_0 node1" [ style = bold] "stonith node1" -> "rsc1:1_stop_0 node1" [ style = bold] "stonith node1" -> "stonith_complete" [ style = bold] "stonith node1" [ style=bold color="green" fontcolor="black" ] -"stonith_complete" -> "rsc1:1_demote_0 node1" [ style = bold] -"stonith_complete" -> "rsc1:1_stop_0 node1" [ style = bold] "stonith_complete" [ style=bold color="green" fontcolor="orange" ] "stonith_up" -> "stonith node1" [ style = bold] "stonith_up" -> "stonith_complete" [ style = bold] "stonith_up" [ style=bold color="green" fontcolor="orange" ] } diff --git a/pengine/test10/ticket-master-9.exp b/pengine/test10/ticket-master-9.exp index 986fb6a147..9e9f741d3a 100644 --- a/pengine/test10/ticket-master-9.exp +++ b/pengine/test10/ticket-master-9.exp @@ -1,153 +1,147 @@ - - - - - - diff --git a/pengine/test10/ticket-primitive-21.dot b/pengine/test10/ticket-primitive-21.dot index 430f75fe49..3c5215ae0b 100644 --- a/pengine/test10/ticket-primitive-21.dot +++ b/pengine/test10/ticket-primitive-21.dot @@ -1,15 +1,14 @@ digraph "g" { "all_stopped" [ style=bold color="green" fontcolor="orange"] "probe_complete node1" [ style=bold color="green" fontcolor="black"] "rsc1_stop_0 node2" -> "all_stopped" [ style = bold] "rsc1_stop_0 node2" [ style=bold color="green" fontcolor="orange"] "stonith node2" -> "all_stopped" [ style = bold] "stonith node2" -> "rsc1_stop_0 node2" [ style = bold] "stonith node2" -> "stonith_complete" [ style = bold] "stonith node2" [ style=bold color="green" fontcolor="black"] -"stonith_complete" -> "rsc1_stop_0 node2" [ style = bold] "stonith_complete" [ style=bold color="green" fontcolor="orange"] "stonith_up" -> "stonith node2" [ style = bold] "stonith_up" -> "stonith_complete" [ style = bold] "stonith_up" [ style=bold color="green" fontcolor="orange"] } diff --git a/pengine/test10/ticket-primitive-21.exp b/pengine/test10/ticket-primitive-21.exp index 43ae8b5134..cf4e16e719 100644 --- a/pengine/test10/ticket-primitive-21.exp +++ b/pengine/test10/ticket-primitive-21.exp @@ -1,76 +1,73 @@ - - - diff --git a/pengine/test10/ticket-primitive-9.dot b/pengine/test10/ticket-primitive-9.dot index ff183c8d96..a6c60010d5 100644 --- a/pengine/test10/ticket-primitive-9.dot +++ b/pengine/test10/ticket-primitive-9.dot @@ -1,15 +1,14 @@ digraph "g" { "all_stopped" [ style=bold color="green" fontcolor="orange" ] "probe_complete node1" [ style=bold color="green" fontcolor="black" ] "rsc1_stop_0 node2" -> "all_stopped" [ style = bold] "rsc1_stop_0 node2" [ style=bold color="green" fontcolor="orange" ] "stonith node2" -> "all_stopped" [ style = bold] "stonith node2" -> "rsc1_stop_0 node2" [ style = bold] "stonith node2" -> "stonith_complete" [ style = bold] "stonith node2" [ style=bold color="green" fontcolor="black" ] -"stonith_complete" -> "rsc1_stop_0 node2" [ style = bold] "stonith_complete" [ style=bold color="green" fontcolor="orange" ] "stonith_up" -> "stonith node2" [ style = bold] "stonith_up" -> "stonith_complete" [ style = bold] "stonith_up" [ style=bold color="green" fontcolor="orange" ] } diff --git a/pengine/test10/ticket-primitive-9.exp b/pengine/test10/ticket-primitive-9.exp index 43ae8b5134..cf4e16e719 100644 --- a/pengine/test10/ticket-primitive-9.exp +++ b/pengine/test10/ticket-primitive-9.exp @@ -1,76 +1,73 @@ - - -