pacemaker  2.0.3-4b1f869f0f
Scalable High-Availability cluster resource manager
common.c
Go to the documentation of this file.
1 /*
2  * Copyright 2004-2018 Andrew Beekhof <andrew@beekhof.net>
3  *
4  * This source code is licensed under the GNU Lesser General Public License
5  * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
6  */
7 
8 #include <crm_internal.h>
9 #include <crm/crm.h>
10 #include <crm/msg_xml.h>
11 #include <crm/common/xml.h>
12 #include <crm/common/util.h>
13 
14 #include <glib.h>
15 
16 #include <crm/pengine/internal.h>
17 
18 gboolean was_processing_error = FALSE;
19 gboolean was_processing_warning = FALSE;
20 
21 static gboolean
22 check_health(const char *value)
23 {
24  if (safe_str_eq(value, "none")) {
25  return TRUE;
26 
27  } else if (safe_str_eq(value, "custom")) {
28  return TRUE;
29 
30  } else if (safe_str_eq(value, "only-green")) {
31  return TRUE;
32 
33  } else if (safe_str_eq(value, "progressive")) {
34  return TRUE;
35 
36  } else if (safe_str_eq(value, "migrate-on-red")) {
37  return TRUE;
38  }
39  return FALSE;
40 }
41 
42 static gboolean
43 check_stonith_action(const char *value)
44 {
45  if (safe_str_eq(value, "reboot")) {
46  return TRUE;
47 
48  } else if (safe_str_eq(value, "poweroff")) {
49  return TRUE;
50 
51  } else if (safe_str_eq(value, "off")) {
52  return TRUE;
53  }
54  return FALSE;
55 }
56 
57 static gboolean
58 check_placement_strategy(const char *value)
59 {
60  if (safe_str_eq(value, "default")) {
61  return TRUE;
62 
63  } else if (safe_str_eq(value, "utilization")) {
64  return TRUE;
65 
66  } else if (safe_str_eq(value, "minimal")) {
67  return TRUE;
68 
69  } else if (safe_str_eq(value, "balanced")) {
70  return TRUE;
71  }
72  return FALSE;
73 }
74 
75 /* *INDENT-OFF* */
76 static pe_cluster_option pe_opts[] = {
77  /* name, old-name, validate, default, description */
78  { "no-quorum-policy", NULL, "enum", "stop, freeze, ignore, demote, suicide", "stop", &check_quorum,
79  "What to do when the cluster does not have quorum", NULL },
80  { "symmetric-cluster", NULL, "boolean", NULL, "true", &check_boolean,
81  "All resources can run anywhere by default", NULL },
82  { "maintenance-mode", NULL, "boolean", NULL, "false", &check_boolean,
83  "Should the cluster monitor resources and start/stop them as required", NULL },
84  { "start-failure-is-fatal", NULL, "boolean", NULL, "true", &check_boolean, "Always treat start failures as fatal",
85  "When set to TRUE, the cluster will immediately ban a resource from a node if it fails to start there. When FALSE, the cluster will instead check the resource's fail count against its migration-threshold." },
86  { "enable-startup-probes", NULL, "boolean", NULL, "true", &check_boolean,
87  "Should the cluster check for active resources during startup", NULL },
88 
89  /* Stonith Options */
90  { "stonith-enabled", NULL, "boolean", NULL, "true", &check_boolean,
91  "Failed nodes are STONITH'd", NULL },
92  { "stonith-action", NULL, "enum", "reboot, off, poweroff", "reboot", &check_stonith_action,
93  "Action to send to STONITH device ('poweroff' is a deprecated alias for 'off')", NULL },
94  { "stonith-timeout", NULL, "time", NULL, "60s", &check_timer,
95  "How long to wait for the STONITH action (reboot,on,off) to complete", NULL },
96  { XML_ATTR_HAVE_WATCHDOG, NULL, "boolean", NULL, "false", &check_boolean,
97  "Enable watchdog integration", "Set automatically by the cluster if SBD is detected. User configured values are ignored." },
98  { "concurrent-fencing", NULL, "boolean", NULL,
99 #ifdef DEFAULT_CONCURRENT_FENCING_TRUE
100  "true",
101 #else
102  "false",
103 #endif
104  &check_boolean,
105  "Allow performing fencing operations in parallel", NULL },
106  { "startup-fencing", NULL, "boolean", NULL, "true", &check_boolean,
107  "STONITH unseen nodes", "Advanced Use Only! Not using the default is very unsafe!" },
108 
109  /* Timeouts etc */
110  { "cluster-delay", NULL, "time", NULL, "60s", &check_time,
111  "Round trip delay over the network (excluding action execution)",
112  "The \"correct\" value will depend on the speed and load of your network and cluster nodes." },
113  { "batch-limit", NULL, "integer", NULL, "0", &check_number,
114  "The number of jobs that the TE is allowed to execute in parallel",
115  "The \"correct\" value will depend on the speed and load of your network and cluster nodes." },
116  { "migration-limit", NULL, "integer", NULL, "-1", &check_number,
117  "The number of migration jobs that the TE is allowed to execute in parallel on a node"},
118 
119  /* Orphans and stopping */
120  { "stop-all-resources", NULL, "boolean", NULL, "false", &check_boolean,
121  "Should the cluster stop all active resources", NULL },
122  { "stop-orphan-resources", NULL, "boolean", NULL, "true", &check_boolean,
123  "Should deleted resources be stopped", NULL },
124  { "stop-orphan-actions", NULL, "boolean", NULL, "true", &check_boolean,
125  "Should deleted actions be cancelled", NULL },
126  { "remove-after-stop", NULL, "boolean", NULL, "false", &check_boolean,
127  "Remove resources from the executor after they are stopped",
128  "Always set this to false. Other values are, at best, poorly tested and potentially dangerous." },
129 /* { "", "", , "0", "", NULL }, */
130 
131  /* Storing inputs */
132  {
133  "pe-error-series-max", NULL, "integer", NULL, "-1", &check_number,
134  "The number of scheduler inputs resulting in ERRORs to save",
135  "Zero to disable, -1 to store unlimited"
136  },
137  {
138  "pe-warn-series-max", NULL, "integer", NULL, "5000", &check_number,
139  "The number of scheduler inputs resulting in WARNINGs to save",
140  "Zero to disable, -1 to store unlimited"
141  },
142  {
143  "pe-input-series-max", NULL, "integer", NULL, "4000", &check_number,
144  "The number of other scheduler inputs to save",
145  "Zero to disable, -1 to store unlimited"
146  },
147 
148  /* Node health */
149  { "node-health-strategy", NULL, "enum", "none, migrate-on-red, only-green, progressive, custom", "none", &check_health,
150  "The strategy combining node attributes to determine overall node health.",
151  "Requires external entities to create node attributes (named with the prefix '#health') with values: 'red', 'yellow' or 'green'."},
152  { "node-health-base", NULL, "integer", NULL, "0", &check_number,
153  "The base score assigned to a node",
154  "Only used when node-health-strategy is set to progressive." },
155  { "node-health-green", NULL, "integer", NULL, "0", &check_number,
156  "The score 'green' translates to in rsc_location constraints",
157  "Only used when node-health-strategy is set to custom or progressive." },
158  { "node-health-yellow", NULL, "integer", NULL, "0", &check_number,
159  "The score 'yellow' translates to in rsc_location constraints",
160  "Only used when node-health-strategy is set to custom or progressive." },
161  { "node-health-red", NULL, "integer", NULL, "-INFINITY", &check_number,
162  "The score 'red' translates to in rsc_location constraints",
163  "Only used when node-health-strategy is set to custom or progressive." },
164 
165  /*Placement Strategy*/
166  { "placement-strategy", NULL, "enum", "default, utilization, minimal, balanced", "default", &check_placement_strategy,
167  "The strategy to determine resource placement", NULL},
168 };
169 /* *INDENT-ON* */
170 
171 void
173 {
174  config_metadata("pacemaker-schedulerd", "1.0", "scheduler properties",
175  "Cluster properties used by Pacemaker's scheduler,"
176  " formerly known as pengine",
177  pe_opts, DIMOF(pe_opts));
178 }
179 
180 void
181 verify_pe_options(GHashTable * options)
182 {
183  verify_all_options(options, pe_opts, DIMOF(pe_opts));
184 }
185 
186 const char *
187 pe_pref(GHashTable * options, const char *name)
188 {
189  return get_cluster_pref(options, pe_opts, DIMOF(pe_opts), name);
190 }
191 
192 const char *
194 {
195  const char *result = "<unknown>";
196 
197  switch (fail) {
198  case action_fail_ignore:
199  result = "ignore";
200  break;
201  case action_fail_demote:
202  result = "demote";
203  break;
204  case action_fail_block:
205  result = "block";
206  break;
207  case action_fail_recover:
208  result = "recover";
209  break;
210  case action_fail_migrate:
211  result = "migrate";
212  break;
213  case action_fail_stop:
214  result = "stop";
215  break;
216  case action_fail_fence:
217  result = "fence";
218  break;
219  case action_fail_standby:
220  result = "standby";
221  break;
223  result = "restart-container";
224  break;
226  result = "reset-remote";
227  break;
228  }
229  return result;
230 }
231 
232 enum action_tasks
233 text2task(const char *task)
234 {
235  if (safe_str_eq(task, CRMD_ACTION_STOP)) {
236  return stop_rsc;
237  } else if (safe_str_eq(task, CRMD_ACTION_STOPPED)) {
238  return stopped_rsc;
239  } else if (safe_str_eq(task, CRMD_ACTION_START)) {
240  return start_rsc;
241  } else if (safe_str_eq(task, CRMD_ACTION_STARTED)) {
242  return started_rsc;
243  } else if (safe_str_eq(task, CRM_OP_SHUTDOWN)) {
244  return shutdown_crm;
245  } else if (safe_str_eq(task, CRM_OP_FENCE)) {
246  return stonith_node;
247  } else if (safe_str_eq(task, CRMD_ACTION_STATUS)) {
248  return monitor_rsc;
249  } else if (safe_str_eq(task, CRMD_ACTION_NOTIFY)) {
250  return action_notify;
251  } else if (safe_str_eq(task, CRMD_ACTION_NOTIFIED)) {
252  return action_notified;
253  } else if (safe_str_eq(task, CRMD_ACTION_PROMOTE)) {
254  return action_promote;
255  } else if (safe_str_eq(task, CRMD_ACTION_DEMOTE)) {
256  return action_demote;
257  } else if (safe_str_eq(task, CRMD_ACTION_PROMOTED)) {
258  return action_promoted;
259  } else if (safe_str_eq(task, CRMD_ACTION_DEMOTED)) {
260  return action_demoted;
261  }
262 #if SUPPORT_TRACING
263  if (safe_str_eq(task, CRMD_ACTION_CANCEL)) {
264  return no_action;
265  } else if (safe_str_eq(task, CRMD_ACTION_DELETE)) {
266  return no_action;
267  } else if (safe_str_eq(task, CRMD_ACTION_STATUS)) {
268  return no_action;
269  } else if (safe_str_eq(task, CRM_OP_PROBED)) {
270  return no_action;
271  } else if (safe_str_eq(task, CRM_OP_LRM_REFRESH)) {
272  return no_action;
273  } else if (safe_str_eq(task, CRMD_ACTION_MIGRATE)) {
274  return no_action;
275  } else if (safe_str_eq(task, CRMD_ACTION_MIGRATED)) {
276  return no_action;
277  }
278  crm_trace("Unsupported action: %s", task);
279 #endif
280 
281  return no_action;
282 }
283 
284 const char *
286 {
287  const char *result = "<unknown>";
288 
289  switch (task) {
290  case no_action:
291  result = "no_action";
292  break;
293  case stop_rsc:
294  result = CRMD_ACTION_STOP;
295  break;
296  case stopped_rsc:
297  result = CRMD_ACTION_STOPPED;
298  break;
299  case start_rsc:
300  result = CRMD_ACTION_START;
301  break;
302  case started_rsc:
303  result = CRMD_ACTION_STARTED;
304  break;
305  case shutdown_crm:
306  result = CRM_OP_SHUTDOWN;
307  break;
308  case stonith_node:
309  result = CRM_OP_FENCE;
310  break;
311  case monitor_rsc:
312  result = CRMD_ACTION_STATUS;
313  break;
314  case action_notify:
315  result = CRMD_ACTION_NOTIFY;
316  break;
317  case action_notified:
318  result = CRMD_ACTION_NOTIFIED;
319  break;
320  case action_promote:
321  result = CRMD_ACTION_PROMOTE;
322  break;
323  case action_promoted:
324  result = CRMD_ACTION_PROMOTED;
325  break;
326  case action_demote:
327  result = CRMD_ACTION_DEMOTE;
328  break;
329  case action_demoted:
330  result = CRMD_ACTION_DEMOTED;
331  break;
332  }
333 
334  return result;
335 }
336 
337 const char *
339 {
340  switch (role) {
341  case RSC_ROLE_UNKNOWN:
342  return RSC_ROLE_UNKNOWN_S;
343  case RSC_ROLE_STOPPED:
344  return RSC_ROLE_STOPPED_S;
345  case RSC_ROLE_STARTED:
346  return RSC_ROLE_STARTED_S;
347  case RSC_ROLE_SLAVE:
348  return RSC_ROLE_SLAVE_S;
349  case RSC_ROLE_MASTER:
350  return RSC_ROLE_MASTER_S;
351  }
353  CRM_CHECK(role < RSC_ROLE_MAX, return RSC_ROLE_UNKNOWN_S);
354  // coverity[dead_error_line]
355  return RSC_ROLE_UNKNOWN_S;
356 }
357 
358 enum rsc_role_e
359 text2role(const char *role)
360 {
361  CRM_ASSERT(role != NULL);
362  if (safe_str_eq(role, RSC_ROLE_STOPPED_S)) {
363  return RSC_ROLE_STOPPED;
364  } else if (safe_str_eq(role, RSC_ROLE_STARTED_S)) {
365  return RSC_ROLE_STARTED;
366  } else if (safe_str_eq(role, RSC_ROLE_SLAVE_S)) {
367  return RSC_ROLE_SLAVE;
368  } else if (safe_str_eq(role, RSC_ROLE_MASTER_S)) {
369  return RSC_ROLE_MASTER;
370  } else if (safe_str_eq(role, RSC_ROLE_UNKNOWN_S)) {
371  return RSC_ROLE_UNKNOWN;
372  }
373  crm_err("Unknown role: %s", role);
374  return RSC_ROLE_UNKNOWN;
375 }
376 
377 int
378 merge_weights(int w1, int w2)
379 {
380  int result = w1 + w2;
381 
382  if (w1 <= -INFINITY || w2 <= -INFINITY) {
383  if (w1 >= INFINITY || w2 >= INFINITY) {
384  crm_trace("-INFINITY + INFINITY == -INFINITY");
385  }
386  return -INFINITY;
387 
388  } else if (w1 >= INFINITY || w2 >= INFINITY) {
389  return INFINITY;
390  }
391 
392  /* detect wrap-around */
393  if (result > 0) {
394  if (w1 <= 0 && w2 < 0) {
395  result = -INFINITY;
396  }
397 
398  } else if (w1 > 0 && w2 > 0) {
399  result = INFINITY;
400  }
401 
402  /* detect +/- INFINITY */
403  if (result >= INFINITY) {
404  result = INFINITY;
405 
406  } else if (result <= -INFINITY) {
407  result = -INFINITY;
408  }
409 
410  crm_trace("%d + %d = %d", w1, w2, result);
411  return result;
412 }
413 
414 void
415 add_hash_param(GHashTable * hash, const char *name, const char *value)
416 {
417  CRM_CHECK(hash != NULL, return);
418 
419  crm_trace("adding: name=%s value=%s", crm_str(name), crm_str(value));
420  if (name == NULL || value == NULL) {
421  return;
422 
423  } else if (safe_str_eq(value, "#default")) {
424  return;
425 
426  } else if (g_hash_table_lookup(hash, name) == NULL) {
427  g_hash_table_insert(hash, strdup(name), strdup(value));
428  }
429 }
430 
431 const char *
432 pe_node_attribute_calculated(const pe_node_t *node, const char *name,
433  const resource_t *rsc)
434 {
435  const char *source;
436 
437  if(node == NULL) {
438  return NULL;
439 
440  } else if(rsc == NULL) {
441  return g_hash_table_lookup(node->details->attrs, name);
442  }
443 
444  source = g_hash_table_lookup(rsc->meta, XML_RSC_ATTR_TARGET);
445  if(source == NULL || safe_str_eq("host", source) == FALSE) {
446  return g_hash_table_lookup(node->details->attrs, name);
447  }
448 
449  /* Use attributes set for the containers location
450  * instead of for the container itself
451  *
452  * Useful when the container is using the host's local
453  * storage
454  */
455 
456  CRM_ASSERT(node->details->remote_rsc);
458 
459  if(node->details->remote_rsc->container->running_on) {
461  pe_rsc_trace(rsc, "%s: Looking for %s on the container host %s", rsc->id, name, host->details->uname);
462  return g_hash_table_lookup(host->details->attrs, name);
463  }
464 
465  pe_rsc_trace(rsc, "%s: Not looking for %s on the container host: %s is inactive",
466  rsc->id, name, node->details->remote_rsc->container->id);
467  return NULL;
468 }
469 
470 const char *
471 pe_node_attribute_raw(pe_node_t *node, const char *name)
472 {
473  if(node == NULL) {
474  return NULL;
475  }
476  return g_hash_table_lookup(node->details->attrs, name);
477 }
RSC_ROLE_STARTED_S
#define RSC_ROLE_STARTED_S
Definition: common.h:110
INFINITY
#define INFINITY
Definition: crm.h:96
action_fail_response
action_fail_response
Definition: common.h:41
merge_weights
int merge_weights(int w1, int w2)
Definition: common.c:378
CRMD_ACTION_DEMOTED
#define CRMD_ACTION_DEMOTED
Definition: crm.h:181
CRMD_ACTION_PROMOTED
#define CRMD_ACTION_PROMOTED
Definition: crm.h:179
action_fail_standby
@ action_fail_standby
Definition: common.h:50
pe_node_attribute_raw
const char * pe_node_attribute_raw(pe_node_t *node, const char *name)
Definition: common.c:471
msg_xml.h
RSC_ROLE_STOPPED
@ RSC_ROLE_STOPPED
Definition: common.h:100
CRMD_ACTION_STARTED
#define CRMD_ACTION_STARTED
Definition: crm.h:173
action_demote
@ action_demote
Definition: common.h:80
action_fail_stop
@ action_fail_stop
Definition: common.h:49
pe_node_shared_s::remote_rsc
pe_resource_t * remote_rsc
Definition: pe_types.h:208
RSC_ROLE_MASTER
@ RSC_ROLE_MASTER
Definition: common.h:103
CRMD_ACTION_NOTIFY
#define CRMD_ACTION_NOTIFY
Definition: crm.h:183
started_rsc
@ started_rsc
Definition: common.h:75
action_fail_demote
@ action_fail_demote
Definition: common.h:65
CRMD_ACTION_DELETE
#define CRMD_ACTION_DELETE
Definition: crm.h:165
pe_resource_s::id
char * id
Definition: pe_types.h:294
rsc_role_e
rsc_role_e
Definition: common.h:98
stop_rsc
@ stop_rsc
Definition: common.h:72
CRMD_ACTION_STOPPED
#define CRMD_ACTION_STOPPED
Definition: crm.h:176
fail2text
const char * fail2text(enum action_fail_response fail)
Definition: common.c:193
CRM_CHECK
#define CRM_CHECK(expr, failure_action)
Definition: logging.h:157
task2text
const char * task2text(enum action_tasks task)
Definition: common.c:285
pe_node_s::details
struct pe_node_shared_s * details
Definition: pe_types.h:221
stopped_rsc
@ stopped_rsc
Definition: common.h:73
action_fail_recover
@ action_fail_recover
Definition: common.h:44
crm_err
#define crm_err(fmt, args...)
Definition: logging.h:241
internal.h
crm_trace
#define crm_trace(fmt, args...)
Definition: logging.h:247
pe_resource_s::meta
GHashTable * meta
Definition: pe_types.h:346
CRM_OP_PROBED
#define CRM_OP_PROBED
Definition: crm.h:150
safe_str_eq
#define safe_str_eq(a, b)
Definition: util.h:61
action_notify
@ action_notify
Definition: common.h:76
was_processing_error
gboolean was_processing_error
Definition: common.c:18
pe_resource_s::running_on
GListPtr running_on
Definition: pe_types.h:339
xml.h
Wrappers for and extensions to libxml2.
CRMD_ACTION_CANCEL
#define CRMD_ACTION_CANCEL
Definition: crm.h:166
CRM_OP_SHUTDOWN
#define CRM_OP_SHUTDOWN
Definition: crm.h:141
add_hash_param
void add_hash_param(GHashTable *hash, const char *name, const char *value)
Definition: common.c:415
text2role
enum rsc_role_e text2role(const char *role)
Definition: common.c:359
action_fail_block
@ action_fail_block
Definition: common.h:48
RSC_ROLE_SLAVE
@ RSC_ROLE_SLAVE
Definition: common.h:102
CRM_OP_LRM_REFRESH
#define CRM_OP_LRM_REFRESH
Definition: crm.h:146
action_notified
@ action_notified
Definition: common.h:77
action_fail_fence
@ action_fail_fence
Definition: common.h:51
check_number
gboolean check_number(const char *value)
Definition: utils.c:102
CRMD_ACTION_MIGRATED
#define CRMD_ACTION_MIGRATED
Definition: crm.h:170
action_fail_migrate
@ action_fail_migrate
Definition: common.h:47
action_fail_reset_remote
@ action_fail_reset_remote
Definition: common.h:63
CRMD_ACTION_START
#define CRMD_ACTION_START
Definition: crm.h:172
RSC_ROLE_UNKNOWN
@ RSC_ROLE_UNKNOWN
Definition: common.h:99
DIMOF
#define DIMOF(a)
Definition: crm.h:58
CRMD_ACTION_MIGRATE
#define CRMD_ACTION_MIGRATE
Definition: crm.h:169
action_demoted
@ action_demoted
Definition: common.h:81
RSC_ROLE_MASTER_S
#define RSC_ROLE_MASTER_S
Definition: common.h:112
CRMD_ACTION_STOP
#define CRMD_ACTION_STOP
Definition: crm.h:175
role2text
const char * role2text(enum rsc_role_e role)
Definition: common.c:338
config_metadata
void config_metadata(const char *name, const char *version, const char *desc_short, const char *desc_long, pe_cluster_option *option_list, int len)
Definition: utils.c:347
shutdown_crm
@ shutdown_crm
Definition: common.h:82
action_fail_restart_container
@ action_fail_restart_container
Definition: common.h:55
crm_ais_host_s::uname
char uname[MAX_NAME]
Definition: internal.h:24
action_promoted
@ action_promoted
Definition: common.h:79
check_time
gboolean check_time(const char *value)
Definition: utils.c:73
was_processing_warning
gboolean was_processing_warning
Definition: common.c:19
RSC_ROLE_MAX
#define RSC_ROLE_MAX
Definition: common.h:106
check_quorum
gboolean check_quorum(const char *value)
Definition: utils.c:132
pe_pref
const char * pe_pref(GHashTable *options, const char *name)
Definition: common.c:187
check_boolean
gboolean check_boolean(const char *value)
Definition: utils.c:91
verify_pe_options
void verify_pe_options(GHashTable *options)
Definition: common.c:181
CRMD_ACTION_NOTIFIED
#define CRMD_ACTION_NOTIFIED
Definition: crm.h:184
pe_cluster_option_s
Definition: crm_internal.h:87
pe_resource_s::container
pe_resource_t * container
Definition: pe_types.h:353
CRM_OP_FENCE
#define CRM_OP_FENCE
Definition: crm.h:142
pe_node_attribute_calculated
const char * pe_node_attribute_calculated(const pe_node_t *node, const char *name, const resource_t *rsc)
Definition: common.c:432
RSC_ROLE_SLAVE_S
#define RSC_ROLE_SLAVE_S
Definition: common.h:111
RSC_ROLE_STOPPED_S
#define RSC_ROLE_STOPPED_S
Definition: common.h:109
host
AIS_Host host
Definition: internal.h:6
crm_str
#define crm_str(x)
Definition: logging.h:267
action_promote
@ action_promote
Definition: common.h:78
RSC_ROLE_UNKNOWN_S
#define RSC_ROLE_UNKNOWN_S
Definition: common.h:108
get_cluster_pref
const char * get_cluster_pref(GHashTable *options, pe_cluster_option *option_list, int len, const char *name)
Definition: utils.c:328
pe_rsc_trace
#define pe_rsc_trace(rsc, fmt, args...)
Definition: internal.h:19
CRM_ASSERT
#define CRM_ASSERT(expr)
Definition: results.h:42
start_rsc
@ start_rsc
Definition: common.h:74
CRMD_ACTION_DEMOTE
#define CRMD_ACTION_DEMOTE
Definition: crm.h:180
check_timer
gboolean check_timer(const char *value)
Definition: utils.c:82
action_fail_ignore
@ action_fail_ignore
Definition: common.h:42
CRMD_ACTION_STATUS
#define CRMD_ACTION_STATUS
Definition: crm.h:186
pe_metadata
void pe_metadata(void)
Definition: common.c:172
text2task
enum action_tasks text2task(const char *task)
Definition: common.c:233
pe_resource_s
Definition: pe_types.h:293
XML_ATTR_HAVE_WATCHDOG
#define XML_ATTR_HAVE_WATCHDOG
Definition: msg_xml.h:86
RSC_ROLE_STARTED
@ RSC_ROLE_STARTED
Definition: common.h:101
stonith_node
@ stonith_node
Definition: common.h:83
crm_internal.h
action_tasks
action_tasks
Definition: common.h:69
util.h
Utility functions.
pe_node_s
Definition: pe_types.h:217
monitor_rsc
@ monitor_rsc
Definition: common.h:71
crm.h
A dumping ground.
verify_all_options
void verify_all_options(GHashTable *options, pe_cluster_option *option_list, int len)
Definition: utils.c:382
CRMD_ACTION_PROMOTE
#define CRMD_ACTION_PROMOTE
Definition: crm.h:178
no_action
@ no_action
Definition: common.h:70
pe_node_shared_s::attrs
GHashTable * attrs
Definition: pe_types.h:212
XML_RSC_ATTR_TARGET
#define XML_RSC_ATTR_TARGET
Definition: msg_xml.h:182