34 # include <libxml/tree.h>
36 # define CRM_FEATURE_SET "3.0.14"
39 # define DIMOF(a) ((int) (sizeof(a)/sizeof(a[0])) )
46 # define __builtin_expect(expr, result) (expr)
50 # define __likely(expr) __builtin_expect(expr, 1)
51 # define __unlikely(expr) __builtin_expect(expr, 0)
53 # define CRM_META "CRM_meta"
60 # define SOCKET_LEN 1024
61 # define APPNAME_LEN 256
62 # define MAX_IPC_FAIL 5
63 # define MAX_IPC_DELAY 120
65 # define DAEMON_RESPAWN_STOP 100
68 # define DOT_FSA_ACTIONS 1
69 # define DOT_ALL_FSA_INPUTS 1
80 # define INFINITY_S "INFINITY"
81 # define MINUS_INFINITY_S "-INFINITY"
83 # define INFINITY 1000000
86 # define CRM_SYSTEM_DC "dc"
87 # define CRM_SYSTEM_DCIB "dcib"
89 # define CRM_SYSTEM_CIB "cib"
90 # define CRM_SYSTEM_CRMD "crmd"
91 # define CRM_SYSTEM_LRMD "lrmd"
92 # define CRM_SYSTEM_PENGINE "pengine"
93 # define CRM_SYSTEM_TENGINE "tengine"
94 # define CRM_SYSTEM_STONITHD "stonithd"
95 # define CRM_SYSTEM_MCP "pacemakerd"
98 # define CRM_ATTR_UNAME "#uname"
99 # define CRM_ATTR_ID "#id"
100 # define CRM_ATTR_KIND "#kind"
101 # define CRM_ATTR_ROLE "#role"
102 # define CRM_ATTR_IS_DC "#is_dc"
103 # define CRM_ATTR_CLUSTER_NAME "#cluster-name"
104 # define CRM_ATTR_SITE_NAME "#site-name"
105 # define CRM_ATTR_UNFENCED "#node-unfenced"
106 # define CRM_ATTR_DIGESTS_ALL "#digests-all"
107 # define CRM_ATTR_DIGESTS_SECURE "#digests-secure"
108 # define CRM_ATTR_RA_VERSION "#ra-version"
111 # define CRM_OP_NOOP "noop"
112 # define CRM_OP_JOIN_ANNOUNCE "join_announce"
113 # define CRM_OP_JOIN_OFFER "join_offer"
114 # define CRM_OP_JOIN_REQUEST "join_request"
115 # define CRM_OP_JOIN_ACKNAK "join_ack_nack"
116 # define CRM_OP_JOIN_CONFIRM "join_confirm"
117 # define CRM_OP_PING "ping"
118 # define CRM_OP_THROTTLE "throttle"
119 # define CRM_OP_VOTE "vote"
120 # define CRM_OP_NOVOTE "no-vote"
121 # define CRM_OP_HELLO "hello"
122 # define CRM_OP_PECALC "pe_calc"
123 # define CRM_OP_QUIT "quit"
124 # define CRM_OP_LOCAL_SHUTDOWN "start_shutdown"
125 # define CRM_OP_SHUTDOWN_REQ "req_shutdown"
126 # define CRM_OP_SHUTDOWN "do_shutdown"
127 # define CRM_OP_FENCE "stonith"
128 # define CRM_OP_REGISTER "register"
129 # define CRM_OP_IPC_FWD "ipc_fwd"
130 # define CRM_OP_INVOKE_LRM "lrm_invoke"
131 # define CRM_OP_LRM_REFRESH "lrm_refresh"
132 # define CRM_OP_LRM_QUERY "lrm_query"
133 # define CRM_OP_LRM_DELETE "lrm_delete"
134 # define CRM_OP_LRM_FAIL "lrm_fail"
135 # define CRM_OP_PROBED "probe_complete"
136 # define CRM_OP_REPROBE "probe_again"
137 # define CRM_OP_CLEAR_FAILCOUNT "clear_failcount"
138 # define CRM_OP_REMOTE_STATE "remote_state"
139 # define CRM_OP_RELAXED_SET "one-or-more"
140 # define CRM_OP_RELAXED_CLONE "clone-one-or-more"
141 # define CRM_OP_RM_NODE_CACHE "rm_node_cache"
142 # define CRM_OP_MAINTENANCE_NODES "maintenance_nodes"
147 # define CRM_OP_DIE "die_no_respawn"
148 # define CRM_OP_RETRIVE_CIB "retrieve_cib"
149 # define CRM_OP_HBEAT "dc_beat"
150 # define CRM_OP_ABORT "abort"
151 # define CRM_OP_EVENTCC "event_cc"
152 # define CRM_OP_TEABORT "te_abort"
153 # define CRM_OP_TEABORTED "te_abort_confirmed"
154 # define CRM_OP_TE_HALT "te_halt"
155 # define CRM_OP_TECOMPLETE "te_complete"
156 # define CRM_OP_TETIMEOUT "te_timeout"
157 # define CRM_OP_TRANSITION "transition"
158 # define CRM_OP_DEBUG_UP "debug_inc"
159 # define CRM_OP_DEBUG_DOWN "debug_dec"
160 # define CRM_OP_NODES_PROBED "probe_nodes_complete"
163 # define CRMD_JOINSTATE_DOWN "down"
164 # define CRMD_JOINSTATE_PENDING "pending"
165 # define CRMD_JOINSTATE_MEMBER "member"
166 # define CRMD_JOINSTATE_NACK "banned"
168 # define CRMD_ACTION_DELETE "delete"
169 # define CRMD_ACTION_CANCEL "cancel"
171 # define CRMD_ACTION_RELOAD "reload"
172 # define CRMD_ACTION_MIGRATE "migrate_to"
173 # define CRMD_ACTION_MIGRATED "migrate_from"
175 # define CRMD_ACTION_START "start"
176 # define CRMD_ACTION_STARTED "running"
178 # define CRMD_ACTION_STOP "stop"
179 # define CRMD_ACTION_STOPPED "stopped"
181 # define CRMD_ACTION_PROMOTE "promote"
182 # define CRMD_ACTION_PROMOTED "promoted"
183 # define CRMD_ACTION_DEMOTE "demote"
184 # define CRMD_ACTION_DEMOTED "demoted"
186 # define CRMD_ACTION_NOTIFY "notify"
187 # define CRMD_ACTION_NOTIFIED "notified"
189 # define CRMD_ACTION_STATUS "monitor"
190 # define CRMD_ACTION_METADATA "meta-data"
191 # define CRMD_METADATA_CALL_TIMEOUT 30000
194 # define RSC_DELETE CRMD_ACTION_DELETE
195 # define RSC_CANCEL CRMD_ACTION_CANCEL
197 # define RSC_MIGRATE CRMD_ACTION_MIGRATE
198 # define RSC_MIGRATED CRMD_ACTION_MIGRATED
200 # define RSC_START CRMD_ACTION_START
201 # define RSC_STARTED CRMD_ACTION_STARTED
203 # define RSC_STOP CRMD_ACTION_STOP
204 # define RSC_STOPPED CRMD_ACTION_STOPPED
206 # define RSC_PROMOTE CRMD_ACTION_PROMOTE
207 # define RSC_PROMOTED CRMD_ACTION_PROMOTED
208 # define RSC_DEMOTE CRMD_ACTION_DEMOTE
209 # define RSC_DEMOTED CRMD_ACTION_DEMOTED
211 # define RSC_NOTIFY CRMD_ACTION_NOTIFY
212 # define RSC_NOTIFIED CRMD_ACTION_NOTIFIED
214 # define RSC_STATUS CRMD_ACTION_STATUS
215 # define RSC_METADATA CRMD_ACTION_METADATA
224 static inline const char *crm_action_str(
const char *task,
int interval) {
Wrappers for and extensions to libqb logging.
#define safe_str_eq(a, b)