This source file includes following definitions.
- crm_action_str
1
2
3
4
5
6
7
8
9
10 #ifndef CRM__H
11 # define CRM__H
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16
17
18
19
20
21
22
23 # include <crm_config.h>
24 # include <stdlib.h>
25 # include <glib.h>
26 # include <stdbool.h>
27
28 # include <string.h>
29
30 # include <libxml/tree.h>
31
32 #ifndef PCMK_ALLOW_DEPRECATED
33
34
35
36
37
38
39
40
41
42
43
44 #define PCMK_ALLOW_DEPRECATED 1
45 #endif
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69 # define CRM_FEATURE_SET "3.10.2"
70
71
72
73
74
75
76 #define MAX_NAME 256
77
78 # define CRM_META "CRM_meta"
79
80 extern char *crm_system_name;
81
82
83
84
85 # define CRM_SCORE_INFINITY 1000000
86 # define CRM_INFINITY_S "INFINITY"
87 # define CRM_PLUS_INFINITY_S "+" CRM_INFINITY_S
88 # define CRM_MINUS_INFINITY_S "-" CRM_INFINITY_S
89
90
91
92
93
94
95
96 # undef INFINITY
97 # define INFINITY_S "INFINITY"
98 # define MINUS_INFINITY_S "-INFINITY"
99 # define INFINITY 1000000
100
101
102 # define CRM_SYSTEM_DC "dc"
103 # define CRM_SYSTEM_DCIB "dcib"
104
105 # define CRM_SYSTEM_CIB "cib"
106 # define CRM_SYSTEM_CRMD "crmd"
107 # define CRM_SYSTEM_LRMD "lrmd"
108 # define CRM_SYSTEM_PENGINE "pengine"
109 # define CRM_SYSTEM_TENGINE "tengine"
110 # define CRM_SYSTEM_STONITHD "stonithd"
111 # define CRM_SYSTEM_MCP "pacemakerd"
112
113
114 # define CRM_ATTR_UNAME "#uname"
115 # define CRM_ATTR_ID "#id"
116 # define CRM_ATTR_KIND "#kind"
117 # define CRM_ATTR_ROLE "#role"
118 # define CRM_ATTR_IS_DC "#is_dc"
119 # define CRM_ATTR_CLUSTER_NAME "#cluster-name"
120 # define CRM_ATTR_SITE_NAME "#site-name"
121 # define CRM_ATTR_UNFENCED "#node-unfenced"
122 # define CRM_ATTR_DIGESTS_ALL "#digests-all"
123 # define CRM_ATTR_DIGESTS_SECURE "#digests-secure"
124 # define CRM_ATTR_RA_VERSION "#ra-version"
125 # define CRM_ATTR_PROTOCOL "#attrd-protocol"
126
127
128 # define CRM_OP_NOOP "noop"
129 # define CRM_OP_JOIN_ANNOUNCE "join_announce"
130 # define CRM_OP_JOIN_OFFER "join_offer"
131 # define CRM_OP_JOIN_REQUEST "join_request"
132 # define CRM_OP_JOIN_ACKNAK "join_ack_nack"
133 # define CRM_OP_JOIN_CONFIRM "join_confirm"
134 # define CRM_OP_PING "ping"
135 # define CRM_OP_NODE_INFO "node-info"
136 # define CRM_OP_THROTTLE "throttle"
137 # define CRM_OP_VOTE "vote"
138 # define CRM_OP_NOVOTE "no-vote"
139 # define CRM_OP_HELLO "hello"
140 # define CRM_OP_PECALC "pe_calc"
141 # define CRM_OP_QUIT "quit"
142 # define CRM_OP_LOCAL_SHUTDOWN "start_shutdown"
143 # define CRM_OP_SHUTDOWN_REQ "req_shutdown"
144 # define CRM_OP_SHUTDOWN "do_shutdown"
145 # define CRM_OP_FENCE "stonith"
146 # define CRM_OP_REGISTER "register"
147 # define CRM_OP_IPC_FWD "ipc_fwd"
148 # define CRM_OP_INVOKE_LRM "lrm_invoke"
149 # define CRM_OP_LRM_REFRESH "lrm_refresh"
150 # define CRM_OP_LRM_QUERY "lrm_query"
151 # define CRM_OP_LRM_DELETE "lrm_delete"
152 # define CRM_OP_LRM_FAIL "lrm_fail"
153 # define CRM_OP_PROBED "probe_complete"
154 # define CRM_OP_REPROBE "probe_again"
155 # define CRM_OP_CLEAR_FAILCOUNT "clear_failcount"
156 # define CRM_OP_REMOTE_STATE "remote_state"
157 # define CRM_OP_RELAXED_SET "one-or-more"
158 # define CRM_OP_RELAXED_CLONE "clone-one-or-more"
159 # define CRM_OP_RM_NODE_CACHE "rm_node_cache"
160 # define CRM_OP_MAINTENANCE_NODES "maintenance_nodes"
161
162
163 # define CRMD_JOINSTATE_DOWN "down"
164 # define CRMD_JOINSTATE_PENDING "pending"
165 # define CRMD_JOINSTATE_MEMBER "member"
166 # define CRMD_JOINSTATE_NACK "banned"
167
168 # define CRMD_ACTION_DELETE "delete"
169 # define CRMD_ACTION_CANCEL "cancel"
170
171 # define CRMD_ACTION_RELOAD "reload"
172 # define CRMD_ACTION_RELOAD_AGENT "reload-agent"
173 # define CRMD_ACTION_MIGRATE "migrate_to"
174 # define CRMD_ACTION_MIGRATED "migrate_from"
175
176 # define CRMD_ACTION_START "start"
177 # define CRMD_ACTION_STARTED "running"
178
179 # define CRMD_ACTION_STOP "stop"
180 # define CRMD_ACTION_STOPPED "stopped"
181
182 # define CRMD_ACTION_PROMOTE "promote"
183 # define CRMD_ACTION_PROMOTED "promoted"
184 # define CRMD_ACTION_DEMOTE "demote"
185 # define CRMD_ACTION_DEMOTED "demoted"
186
187 # define CRMD_ACTION_NOTIFY "notify"
188 # define CRMD_ACTION_NOTIFIED "notified"
189
190 # define CRMD_ACTION_STATUS "monitor"
191 # define CRMD_ACTION_METADATA "meta-data"
192 # define CRMD_METADATA_CALL_TIMEOUT 30000
193
194
195 # define RSC_DELETE CRMD_ACTION_DELETE
196 # define RSC_CANCEL CRMD_ACTION_CANCEL
197
198 # define RSC_MIGRATE CRMD_ACTION_MIGRATE
199 # define RSC_MIGRATED CRMD_ACTION_MIGRATED
200
201 # define RSC_START CRMD_ACTION_START
202 # define RSC_STARTED CRMD_ACTION_STARTED
203
204 # define RSC_STOP CRMD_ACTION_STOP
205 # define RSC_STOPPED CRMD_ACTION_STOPPED
206
207 # define RSC_PROMOTE CRMD_ACTION_PROMOTE
208 # define RSC_PROMOTED CRMD_ACTION_PROMOTED
209 # define RSC_DEMOTE CRMD_ACTION_DEMOTE
210 # define RSC_DEMOTED CRMD_ACTION_DEMOTED
211
212 # define RSC_NOTIFY CRMD_ACTION_NOTIFY
213 # define RSC_NOTIFIED CRMD_ACTION_NOTIFIED
214
215 # define RSC_STATUS CRMD_ACTION_STATUS
216 # define RSC_METADATA CRMD_ACTION_METADATA
217
218
219 # include <crm/common/logging.h>
220 # include <crm/common/util.h>
221
222 static inline const char *
223 crm_action_str(const char *task, guint interval_ms) {
224 if ((task != NULL) && (interval_ms == 0)
225 && (strcasecmp(task, RSC_STATUS) == 0)) {
226 return "probe";
227 }
228 return task;
229 }
230
231 #if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1)
232 #include <crm/crm_compat.h>
233 #endif
234
235 #ifdef __cplusplus
236 }
237 #endif
238
239 #endif