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