7 #ifndef CRM_COMPATIBILITY__H 8 # define CRM_COMPATIBILITY__H 20 #define ACTIVESTATUS "active" 21 #define DEADSTATUS "dead" 22 #define PINGSTATUS "ping" 23 #define JOINSTATUS "join" 24 #define LEAVESTATUS "leave" 25 #define NORMALNODE "normal" 26 #define CRM_NODE_EVICTED "evicted" 27 #define CRM_LEGACY_CONFIG_DIR "/var/lib/heartbeat/crm" 28 #define HA_VARLIBHBDIR "/var/lib/heartbeat" 29 #define pcmk_cluster_heartbeat 0x0004 36 #define PCMK_SERVICE_ID 9 37 #define CRM_SERVICE PCMK_SERVICE_ID 38 #define XML_ATTR_EXPECTED_VOTES "expected-quorum-votes" 39 #define crm_class_members 1 40 #define crm_class_notify 2 41 #define crm_class_nodeid 3 42 #define crm_class_rmpeer 4 43 #define crm_class_quorum 5 44 #define pcmk_cluster_classic_ais 0x0010 45 #define pcmk_cluster_cman 0x0040 46 static int ais_fd_sync = -1;
49 #define CS_USES_LIBQB 1 51 #define SUPPORT_CS_QUORUM 1 53 #define AIS_COROSYNC 1 57 #define SUPPORT_CMAN 0 58 #define SUPPORT_PLUGIN 0 59 #define SUPPORT_STONITH_CONFIG 0 60 #define is_classic_ais_cluster() 0 61 #define is_cman_cluster() 0 64 #define is_openais_cluster() is_corosync_cluster() 73 #define XML_RSC_ATTR_ISOLATION_INSTANCE "isolation-instance" 74 #define XML_RSC_ATTR_ISOLATION_WRAPPER "isolation-wrapper" 75 #define XML_RSC_ATTR_ISOLATION_HOST "isolation-host" 76 #define XML_RSC_ATTR_ISOLATION "isolation" 81 #define CRM_DTD_DIRECTORY CRM_SCHEMA_DIRECTORY 85 #define DAEMON_RESPAWN_STOP CRM_EX_FATAL 86 #define pcmk_err_panic CRM_EX_PANIC 89 #define APPNAME_LEN 256 90 #define CRM_NODE_ACTIVE CRM_NODE_MEMBER 91 #define CRM_OP_DIE "die_no_respawn" 92 #define CRM_OP_RETRIVE_CIB "retrieve_cib" 93 #define CRM_OP_HBEAT "dc_beat" 94 #define CRM_OP_ABORT "abort" 95 #define CRM_OP_DEBUG_UP "debug_inc" 96 #define CRM_OP_DEBUG_DOWN "debug_dec" 97 #define CRM_OP_EVENTCC "event_cc" 98 #define CRM_OP_TEABORT "te_abort" 99 #define CRM_OP_TEABORTED "te_abort_confirmed" 100 #define CRM_OP_TE_HALT "te_halt" 101 #define CRM_OP_TECOMPLETE "te_complete" 102 #define CRM_OP_TETIMEOUT "te_timeout" 103 #define CRM_OP_TRANSITION "transition" 104 #define CRM_OP_NODES_PROBED "probe_nodes_complete" 105 #define DOT_ALL_FSA_INPUTS 1 106 #define DOT_FSA_ACTIONS 1 107 #define F_LRMD_CANCEL_CALLID "lrmd_cancel_callid" 108 #define F_LRMD_RSC_METADATA "lrmd_rsc_metadata_res" 109 #define F_LRMD_IPC_PROXY_NODE "lrmd_ipc_proxy_node" 110 #define INSTANCE(x) crm_element_value(x, XML_CIB_ATTR_INSTANCE) 111 #define LOG_DEBUG_2 LOG_TRACE 112 #define LOG_DEBUG_3 LOG_TRACE 113 #define LOG_DEBUG_4 LOG_TRACE 114 #define LOG_DEBUG_5 LOG_TRACE 115 #define LOG_DEBUG_6 LOG_TRACE 116 #define LRMD_OP_RSC_CHK_REG "lrmd_rsc_check_register" 117 #define MAX_IPC_FAIL 5 118 #define NAME(x) crm_element_value(x, XML_NVPAIR_ATTR_NAME) 120 #define PE_OBJ_T_NATIVE "native" 121 #define PE_OBJ_T_GROUP "group" 122 #define PE_OBJ_T_INCARNATION "clone" 123 #define PE_OBJ_T_MASTER "master" 124 #define SERVICE_SCRIPT "/sbin/service" 125 #define SOCKET_LEN 1024 126 #define TSTAMP(x) crm_element_value(x, XML_ATTR_TSTAMP) 127 #define XML_ATTR_TAGNAME F_XML_TAGNAME 128 #define XML_ATTR_FILTER_TYPE "type-filter" 129 #define XML_ATTR_FILTER_ID "id-filter" 130 #define XML_ATTR_FILTER_PRIORITY "priority-filter" 131 #define XML_ATTR_DC "is_dc" 132 #define XML_MSG_TAG "crm_message" 133 #define XML_MSG_TAG_DATA "msg_data" 134 #define XML_FAIL_TAG_RESOURCE "failed_resource" 135 #define XML_FAILRES_ATTR_RESID "resource_id" 136 #define XML_FAILRES_ATTR_REASON "reason" 137 #define XML_FAILRES_ATTR_RESSTATUS "resource_status" 138 #define XML_ATTR_RESULT "result" 139 #define XML_ATTR_SECTION "section" 140 #define XML_CIB_TAG_DOMAIN "domain" 141 #define XML_CIB_TAG_CONSTRAINT "constraint" 142 #define XML_RSC_ATTR_STATE "clone-state" 143 #define XML_RSC_ATTR_PRIORITY "priority" 144 #define XML_OP_ATTR_DEPENDENT "dependent-on" 145 #define XML_LRM_TAG_AGENTS "lrm_agents" 146 #define XML_LRM_TAG_AGENT "lrm_agent" 147 #define XML_LRM_TAG_ATTRIBUTES "attributes" 148 #define XML_CIB_ATTR_HEALTH "health" 149 #define XML_CIB_ATTR_WEIGHT "weight" 150 #define XML_CIB_ATTR_CLEAR "clear_on" 151 #define XML_CIB_ATTR_STONITH "stonith" 152 #define XML_CIB_ATTR_STANDBY "standby" 153 #define XML_RULE_ATTR_SCORE_MANGLED "score-attribute-mangled" 154 #define XML_RULE_ATTR_RESULT "result" 155 #define XML_NODE_ATTR_STATE "state" 156 #define XML_ATTR_LRM_PROBE "lrm-is-probe" 157 #define XML_ATTR_TE_ALLOWFAIL "op_allow_fail" 158 #define VALUE(x) crm_element_value(x, XML_NVPAIR_ATTR_VALUE) 159 #define action_wrapper_s pe_action_wrapper_s 160 #define add_cib_op_callback(cib, id, flag, data, fn) do { \ 161 cib->cmds->register_callback(cib, id, 120, flag, data, #fn, fn); \ 163 #define cib_default_options = cib_none 164 #define crm_remote_baremetal 0x0004 165 #define crm_remote_container 0x0002 166 #define crm_element_value_const crm_element_value 167 #define crm_element_value_const_int crm_element_value_int 168 #define n_object_classes 3 169 #define no_quorum_policy_e pe_quorum_policy 170 #define node_s pe_node_s 171 #define node_shared_s pe_node_shared_s 172 #define pe_action_failure_is_fatal 0x00020 173 #define pe_rsc_munging 0x00000800ULL 174 #define pe_rsc_try_reload 0x00001000ULL 175 #define pe_rsc_shutdown 0x00020000ULL 176 #define pe_rsc_migrating 0x00400000ULL 177 #define pe_rsc_unexpectedly_running 0x02000000ULL 178 #define pe_rsc_have_unfencing 0x80000000ULL 179 #define resource_s pe_resource_s 180 #define ticket_s pe_ticket_s 182 static int node_score_infinity = 1000000;
187 #define pe_master pe_clone 190 get_resource_type(
const char *name)
209 static inline const char *
#define XML_CIB_TAG_CONTAINER
#define XML_CIB_TAG_RESOURCE
#define XML_CIB_TAG_INCARNATION
#define XML_CIB_TAG_MASTER
#define XML_CIB_TAG_GROUP
#define safe_str_eq(a, b)
enum crm_ais_msg_types type