pacemaker  2.1.6-802a72226b
Scalable High-Availability cluster resource manager
common.c
Go to the documentation of this file.
1 /*
2  * Copyright 2004-2022 the Pacemaker project contributors
3  *
4  * The version control history for this file may have further details.
5  *
6  * This source code is licensed under the GNU Lesser General Public License
7  * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
8  */
9 
10 #include <crm_internal.h>
11 #include <crm/crm.h>
12 #include <crm/msg_xml.h>
13 #include <crm/common/xml.h>
14 #include <crm/common/util.h>
15 
16 #include <glib.h>
17 
18 #include <crm/pengine/internal.h>
19 
20 gboolean was_processing_error = FALSE;
21 gboolean was_processing_warning = FALSE;
22 
23 static bool
24 check_placement_strategy(const char *value)
25 {
26  return pcmk__strcase_any_of(value, "default", "utilization", "minimal",
27  "balanced", NULL);
28 }
29 
30 static pcmk__cluster_option_t pe_opts[] = {
31  /* name, old name, type, allowed values,
32  * default value, validator,
33  * short description,
34  * long description
35  */
36  {
37  "no-quorum-policy", NULL, "select", "stop, freeze, ignore, demote, suicide",
38  "stop", pcmk__valid_quorum,
39  N_("What to do when the cluster does not have quorum"),
40  NULL
41  },
42  {
43  "symmetric-cluster", NULL, "boolean", NULL,
44  "true", pcmk__valid_boolean,
45  N_("Whether resources can run on any node by default"),
46  NULL
47  },
48  {
49  "maintenance-mode", NULL, "boolean", NULL,
50  "false", pcmk__valid_boolean,
51  N_("Whether the cluster should refrain from monitoring, starting, "
52  "and stopping resources"),
53  NULL
54  },
55  {
56  "start-failure-is-fatal", NULL, "boolean", NULL,
57  "true", pcmk__valid_boolean,
58  N_("Whether a start failure should prevent a resource from being "
59  "recovered on the same node"),
60  N_("When true, the cluster will immediately ban a resource from a node "
61  "if it fails to start there. When false, the cluster will instead "
62  "check the resource's fail count against its migration-threshold.")
63  },
64  {
65  "enable-startup-probes", NULL, "boolean", NULL,
66  "true", pcmk__valid_boolean,
67  N_("Whether the cluster should check for active resources during start-up"),
68  NULL
69  },
70  {
71  XML_CONFIG_ATTR_SHUTDOWN_LOCK, NULL, "boolean", NULL,
72  "false", pcmk__valid_boolean,
73  N_("Whether to lock resources to a cleanly shut down node"),
74  N_("When true, resources active on a node when it is cleanly shut down "
75  "are kept \"locked\" to that node (not allowed to run elsewhere) "
76  "until they start again on that node after it rejoins (or for at "
77  "most shutdown-lock-limit, if set). Stonith resources and "
78  "Pacemaker Remote connections are never locked. Clone and bundle "
79  "instances and the promoted role of promotable clones are "
80  "currently never locked, though support could be added in a future "
81  "release.")
82  },
83  {
84  XML_CONFIG_ATTR_SHUTDOWN_LOCK_LIMIT, NULL, "time", NULL,
86  N_("Do not lock resources to a cleanly shut down node longer than "
87  "this"),
88  N_("If shutdown-lock is true and this is set to a nonzero time "
89  "duration, shutdown locks will expire after this much time has "
90  "passed since the shutdown was initiated, even if the node has not "
91  "rejoined.")
92  },
93 
94  // Fencing-related options
95  {
96  "stonith-enabled", NULL, "boolean", NULL,
97  "true", pcmk__valid_boolean,
98  N_("*** Advanced Use Only *** "
99  "Whether nodes may be fenced as part of recovery"),
100  N_("If false, unresponsive nodes are immediately assumed to be harmless, "
101  "and resources that were active on them may be recovered "
102  "elsewhere. This can result in a \"split-brain\" situation, "
103  "potentially leading to data loss and/or service unavailability.")
104  },
105  {
106  "stonith-action", NULL, "select", "reboot, off, poweroff",
107  "reboot", pcmk__is_fencing_action,
108  N_("Action to send to fence device when a node needs to be fenced "
109  "(\"poweroff\" is a deprecated alias for \"off\")"),
110  NULL
111  },
112  {
113  "stonith-timeout", NULL, "time", NULL,
115  N_("*** Advanced Use Only *** Unused by Pacemaker"),
116  N_("This value is not used by Pacemaker, but is kept for backward "
117  "compatibility, and certain legacy fence agents might use it.")
118  },
119  {
120  XML_ATTR_HAVE_WATCHDOG, NULL, "boolean", NULL,
121  "false", pcmk__valid_boolean,
122  N_("Whether watchdog integration is enabled"),
123  N_("This is set automatically by the cluster according to whether SBD "
124  "is detected to be in use. User-configured values are ignored. "
125  "The value `true` is meaningful if diskless SBD is used and "
126  "`stonith-watchdog-timeout` is nonzero. In that case, if fencing "
127  "is required, watchdog-based self-fencing will be performed via "
128  "SBD without requiring a fencing resource explicitly configured.")
129  },
130  {
131  "concurrent-fencing", NULL, "boolean", NULL,
133  N_("Allow performing fencing operations in parallel"),
134  NULL
135  },
136  {
137  "startup-fencing", NULL, "boolean", NULL,
138  "true", pcmk__valid_boolean,
139  N_("*** Advanced Use Only *** Whether to fence unseen nodes at start-up"),
140  N_("Setting this to false may lead to a \"split-brain\" situation,"
141  "potentially leading to data loss and/or service unavailability.")
142  },
143  {
144  XML_CONFIG_ATTR_PRIORITY_FENCING_DELAY, NULL, "time", NULL,
146  N_("Apply fencing delay targeting the lost nodes with the highest total resource priority"),
147  N_("Apply specified delay for the fencings that are targeting the lost "
148  "nodes with the highest total resource priority in case we don't "
149  "have the majority of the nodes in our cluster partition, so that "
150  "the more significant nodes potentially win any fencing match, "
151  "which is especially meaningful under split-brain of 2-node "
152  "cluster. A promoted resource instance takes the base priority + 1 "
153  "on calculation if the base priority is not 0. Any static/random "
154  "delays that are introduced by `pcmk_delay_base/max` configured "
155  "for the corresponding fencing resources will be added to this "
156  "delay. This delay should be significantly greater than, safely "
157  "twice, the maximum `pcmk_delay_base/max`. By default, priority "
158  "fencing delay is disabled.")
159  },
160 
161  {
162  "cluster-delay", NULL, "time", NULL,
164  N_("Maximum time for node-to-node communication"),
165  N_("The node elected Designated Controller (DC) will consider an action "
166  "failed if it does not get a response from the node executing the "
167  "action within this time (after considering the action's own "
168  "timeout). The \"correct\" value will depend on the speed and "
169  "load of your network and cluster nodes.")
170  },
171  {
172  "batch-limit", NULL, "integer", NULL,
173  "0", pcmk__valid_number,
174  N_("Maximum number of jobs that the cluster may execute in parallel "
175  "across all nodes"),
176  N_("The \"correct\" value will depend on the speed and load of your "
177  "network and cluster nodes. If set to 0, the cluster will "
178  "impose a dynamically calculated limit when any node has a "
179  "high load.")
180  },
181  {
182  "migration-limit", NULL, "integer", NULL,
183  "-1", pcmk__valid_number,
184  N_("The number of live migration actions that the cluster is allowed "
185  "to execute in parallel on a node (-1 means no limit)")
186  },
187 
188  /* Orphans and stopping */
189  {
190  "stop-all-resources", NULL, "boolean", NULL,
191  "false", pcmk__valid_boolean,
192  N_("Whether the cluster should stop all active resources"),
193  NULL
194  },
195  {
196  "stop-orphan-resources", NULL, "boolean", NULL,
197  "true", pcmk__valid_boolean,
198  N_("Whether to stop resources that were removed from the configuration"),
199  NULL
200  },
201  {
202  "stop-orphan-actions", NULL, "boolean", NULL,
203  "true", pcmk__valid_boolean,
204  N_("Whether to cancel recurring actions removed from the configuration"),
205  NULL
206  },
207  {
208  "remove-after-stop", NULL, "boolean", NULL,
209  "false", pcmk__valid_boolean,
210  N_("*** Deprecated *** Whether to remove stopped resources from "
211  "the executor"),
212  N_("Values other than default are poorly tested and potentially dangerous."
213  " This option will be removed in a future release.")
214  },
215 
216  /* Storing inputs */
217  {
218  "pe-error-series-max", NULL, "integer", NULL,
219  "-1", pcmk__valid_number,
220  N_("The number of scheduler inputs resulting in errors to save"),
221  N_("Zero to disable, -1 to store unlimited.")
222  },
223  {
224  "pe-warn-series-max", NULL, "integer", NULL,
225  "5000", pcmk__valid_number,
226  N_("The number of scheduler inputs resulting in warnings to save"),
227  N_("Zero to disable, -1 to store unlimited.")
228  },
229  {
230  "pe-input-series-max", NULL, "integer", NULL,
231  "4000", pcmk__valid_number,
232  N_("The number of scheduler inputs without errors or warnings to save"),
233  N_("Zero to disable, -1 to store unlimited.")
234  },
235 
236  /* Node health */
237  {
238  PCMK__OPT_NODE_HEALTH_STRATEGY, NULL, "select",
243  N_("How cluster should react to node health attributes"),
244  N_("Requires external entities to create node attributes (named with "
245  "the prefix \"#health\") with values \"red\", "
246  "\"yellow\", or \"green\".")
247  },
248  {
249  PCMK__OPT_NODE_HEALTH_BASE, NULL, "integer", NULL,
250  "0", pcmk__valid_number,
251  N_("Base health score assigned to a node"),
252  N_("Only used when \"node-health-strategy\" is set to \"progressive\".")
253  },
254  {
255  PCMK__OPT_NODE_HEALTH_GREEN, NULL, "integer", NULL,
256  "0", pcmk__valid_number,
257  N_("The score to use for a node health attribute whose value is \"green\""),
258  N_("Only used when \"node-health-strategy\" is set to \"custom\" or \"progressive\".")
259  },
260  {
261  PCMK__OPT_NODE_HEALTH_YELLOW, NULL, "integer", NULL,
262  "0", pcmk__valid_number,
263  N_("The score to use for a node health attribute whose value is \"yellow\""),
264  N_("Only used when \"node-health-strategy\" is set to \"custom\" or \"progressive\".")
265  },
266  {
267  PCMK__OPT_NODE_HEALTH_RED, NULL, "integer", NULL,
268  "-INFINITY", pcmk__valid_number,
269  N_("The score to use for a node health attribute whose value is \"red\""),
270  N_("Only used when \"node-health-strategy\" is set to \"custom\" or \"progressive\".")
271  },
272 
273  /*Placement Strategy*/
274  {
275  "placement-strategy", NULL, "select",
276  "default, utilization, minimal, balanced",
277  "default", check_placement_strategy,
278  N_("How the cluster should allocate resources to nodes"),
279  NULL
280  },
281 };
282 
283 void
285 {
286  const char *desc_short = "Pacemaker scheduler options";
287  const char *desc_long = "Cluster options used by Pacemaker's scheduler";
288 
289  gchar *s = pcmk__format_option_metadata("pacemaker-schedulerd", desc_short,
290  desc_long, pe_opts,
291  PCMK__NELEM(pe_opts));
292  out->output_xml(out, "metadata", s);
293  g_free(s);
294 }
295 
296 void
297 verify_pe_options(GHashTable * options)
298 {
299  pcmk__validate_cluster_options(options, pe_opts, PCMK__NELEM(pe_opts));
300 }
301 
302 const char *
303 pe_pref(GHashTable * options, const char *name)
304 {
305  return pcmk__cluster_option(options, pe_opts, PCMK__NELEM(pe_opts), name);
306 }
307 
308 const char *
310 {
311  const char *result = "<unknown>";
312 
313  switch (fail) {
314  case action_fail_ignore:
315  result = "ignore";
316  break;
317  case action_fail_demote:
318  result = "demote";
319  break;
320  case action_fail_block:
321  result = "block";
322  break;
323  case action_fail_recover:
324  result = "recover";
325  break;
326  case action_fail_migrate:
327  result = "migrate";
328  break;
329  case action_fail_stop:
330  result = "stop";
331  break;
332  case action_fail_fence:
333  result = "fence";
334  break;
335  case action_fail_standby:
336  result = "standby";
337  break;
339  result = "restart-container";
340  break;
342  result = "reset-remote";
343  break;
344  }
345  return result;
346 }
347 
348 enum action_tasks
349 text2task(const char *task)
350 {
351  if (pcmk__str_eq(task, CRMD_ACTION_STOP, pcmk__str_casei)) {
352  return stop_rsc;
353  } else if (pcmk__str_eq(task, CRMD_ACTION_STOPPED, pcmk__str_casei)) {
354  return stopped_rsc;
355  } else if (pcmk__str_eq(task, CRMD_ACTION_START, pcmk__str_casei)) {
356  return start_rsc;
357  } else if (pcmk__str_eq(task, CRMD_ACTION_STARTED, pcmk__str_casei)) {
358  return started_rsc;
359  } else if (pcmk__str_eq(task, CRM_OP_SHUTDOWN, pcmk__str_casei)) {
360  return shutdown_crm;
361  } else if (pcmk__str_eq(task, CRM_OP_FENCE, pcmk__str_casei)) {
362  return stonith_node;
363  } else if (pcmk__str_eq(task, CRMD_ACTION_STATUS, pcmk__str_casei)) {
364  return monitor_rsc;
365  } else if (pcmk__str_eq(task, CRMD_ACTION_NOTIFY, pcmk__str_casei)) {
366  return action_notify;
367  } else if (pcmk__str_eq(task, CRMD_ACTION_NOTIFIED, pcmk__str_casei)) {
368  return action_notified;
369  } else if (pcmk__str_eq(task, CRMD_ACTION_PROMOTE, pcmk__str_casei)) {
370  return action_promote;
371  } else if (pcmk__str_eq(task, CRMD_ACTION_DEMOTE, pcmk__str_casei)) {
372  return action_demote;
373  } else if (pcmk__str_eq(task, CRMD_ACTION_PROMOTED, pcmk__str_casei)) {
374  return action_promoted;
375  } else if (pcmk__str_eq(task, CRMD_ACTION_DEMOTED, pcmk__str_casei)) {
376  return action_demoted;
377  }
378 #if SUPPORT_TRACING
379  if (pcmk__str_eq(task, CRMD_ACTION_CANCEL, pcmk__str_casei)) {
380  return no_action;
381  } else if (pcmk__str_eq(task, CRMD_ACTION_DELETE, pcmk__str_casei)) {
382  return no_action;
383  } else if (pcmk__str_eq(task, CRMD_ACTION_STATUS, pcmk__str_casei)) {
384  return no_action;
385  } else if (pcmk__str_eq(task, CRMD_ACTION_MIGRATE, pcmk__str_casei)) {
386  return no_action;
387  } else if (pcmk__str_eq(task, CRMD_ACTION_MIGRATED, pcmk__str_casei)) {
388  return no_action;
389  }
390  crm_trace("Unsupported action: %s", task);
391 #endif
392 
393  return no_action;
394 }
395 
396 const char *
398 {
399  const char *result = "<unknown>";
400 
401  switch (task) {
402  case no_action:
403  result = "no_action";
404  break;
405  case stop_rsc:
407  break;
408  case stopped_rsc:
410  break;
411  case start_rsc:
413  break;
414  case started_rsc:
416  break;
417  case shutdown_crm:
419  break;
420  case stonith_node:
422  break;
423  case monitor_rsc:
425  break;
426  case action_notify:
428  break;
429  case action_notified:
431  break;
432  case action_promote:
434  break;
435  case action_promoted:
437  break;
438  case action_demote:
440  break;
441  case action_demoted:
443  break;
444  }
445 
446  return result;
447 }
448 
449 const char *
451 {
452  switch (role) {
453  case RSC_ROLE_UNKNOWN:
454  return RSC_ROLE_UNKNOWN_S;
455  case RSC_ROLE_STOPPED:
456  return RSC_ROLE_STOPPED_S;
457  case RSC_ROLE_STARTED:
458  return RSC_ROLE_STARTED_S;
459  case RSC_ROLE_UNPROMOTED:
460 #ifdef PCMK__COMPAT_2_0
462 #else
463  return RSC_ROLE_UNPROMOTED_S;
464 #endif
465  case RSC_ROLE_PROMOTED:
466 #ifdef PCMK__COMPAT_2_0
468 #else
469  return RSC_ROLE_PROMOTED_S;
470 #endif
471  }
473  CRM_CHECK(role < RSC_ROLE_MAX, return RSC_ROLE_UNKNOWN_S);
474  // coverity[dead_error_line]
475  return RSC_ROLE_UNKNOWN_S;
476 }
477 
478 enum rsc_role_e
479 text2role(const char *role)
480 {
481  CRM_ASSERT(role != NULL);
482  if (pcmk__str_eq(role, RSC_ROLE_STOPPED_S, pcmk__str_casei)) {
483  return RSC_ROLE_STOPPED;
484  } else if (pcmk__str_eq(role, RSC_ROLE_STARTED_S, pcmk__str_casei)) {
485  return RSC_ROLE_STARTED;
488  return RSC_ROLE_UNPROMOTED;
489  } else if (pcmk__strcase_any_of(role, RSC_ROLE_PROMOTED_S,
491  return RSC_ROLE_PROMOTED;
492  } else if (pcmk__str_eq(role, RSC_ROLE_UNKNOWN_S, pcmk__str_casei)) {
493  return RSC_ROLE_UNKNOWN;
494  }
495  crm_err("Unknown role: %s", role);
496  return RSC_ROLE_UNKNOWN;
497 }
498 
499 void
500 add_hash_param(GHashTable * hash, const char *name, const char *value)
501 {
502  CRM_CHECK(hash != NULL, return);
503 
504  crm_trace("Adding name='%s' value='%s' to hash table",
505  pcmk__s(name, "<null>"), pcmk__s(value, "<null>"));
506  if (name == NULL || value == NULL) {
507  return;
508 
509  } else if (pcmk__str_eq(value, "#default", pcmk__str_casei)) {
510  return;
511 
512  } else if (g_hash_table_lookup(hash, name) == NULL) {
513  g_hash_table_insert(hash, strdup(name), strdup(value));
514  }
515 }
516 
517 const char *
518 pe_node_attribute_calculated(const pe_node_t *node, const char *name,
519  const pe_resource_t *rsc)
520 {
521  const char *source;
522 
523  if(node == NULL) {
524  return NULL;
525 
526  } else if(rsc == NULL) {
527  return g_hash_table_lookup(node->details->attrs, name);
528  }
529 
530  source = g_hash_table_lookup(rsc->meta, XML_RSC_ATTR_TARGET);
531  if(source == NULL || !pcmk__str_eq("host", source, pcmk__str_casei)) {
532  return g_hash_table_lookup(node->details->attrs, name);
533  }
534 
535  /* Use attributes set for the containers location
536  * instead of for the container itself
537  *
538  * Useful when the container is using the host's local
539  * storage
540  */
541 
542  CRM_ASSERT(node->details->remote_rsc);
544 
545  if(node->details->remote_rsc->container->running_on) {
547  pe_rsc_trace(rsc, "%s: Looking for %s on the container host %s",
548  rsc->id, name, pe__node_name(host));
549  return g_hash_table_lookup(host->details->attrs, name);
550  }
551 
552  pe_rsc_trace(rsc, "%s: Not looking for %s on the container host: %s is inactive",
553  rsc->id, name, node->details->remote_rsc->container->id);
554  return NULL;
555 }
556 
557 const char *
558 pe_node_attribute_raw(const pe_node_t *node, const char *name)
559 {
560  if(node == NULL) {
561  return NULL;
562  }
563  return g_hash_table_lookup(node->details->attrs, name);
564 }
pcmk__cpg_host_t host
Definition: cpg.c:49
#define CRM_CHECK(expr, failure_action)
Definition: logging.h:235
#define RSC_ROLE_UNPROMOTED_S
Definition: common.h:113
void add_hash_param(GHashTable *hash, const char *name, const char *value)
Definition: common.c:500
A dumping ground.
#define CRMD_ACTION_MIGRATED
Definition: crm.h:172
GHashTable * attrs
Definition: pe_types.h:257
#define XML_CONFIG_ATTR_SHUTDOWN_LOCK
Definition: msg_xml.h:413
#define CRM_OP_FENCE
Definition: crm.h:144
#define PCMK__VALUE_MIGRATE_ON_RED
pe_resource_t * container
Definition: pe_types.h:412
const char * name
Definition: cib.c:24
bool pcmk__strcase_any_of(const char *s,...) G_GNUC_NULL_TERMINATED
Definition: strings.c:933
#define XML_CONFIG_ATTR_PRIORITY_FENCING_DELAY
Definition: msg_xml.h:415
#define RSC_ROLE_STARTED_S
Definition: common.h:112
pe_resource_t * remote_rsc
Definition: pe_types.h:253
#define CRMD_ACTION_NOTIFY
Definition: crm.h:185
GHashTable * meta
Definition: pe_types.h:405
#define CRMD_ACTION_PROMOTE
Definition: crm.h:180
#define RSC_ROLE_PROMOTED_LEGACY_S
Definition: common.h:116
const char * task2text(enum action_tasks task)
Definition: common.c:397
#define PCMK__VALUE_NONE
#define XML_RSC_ATTR_TARGET
Definition: msg_xml.h:237
action_fail_response
Definition: common.h:33
gboolean was_processing_error
Definition: common.c:20
#define PCMK__CONCURRENT_FENCING_DEFAULT
Definition: config.h:541
gboolean was_processing_warning
Definition: common.c:21
#define CRMD_ACTION_START
Definition: crm.h:174
enum rsc_role_e text2role(const char *role)
Definition: common.c:479
#define CRMD_ACTION_DEMOTED
Definition: crm.h:183
#define CRMD_ACTION_STOP
Definition: crm.h:177
#define PCMK__VALUE_ONLY_GREEN
bool pcmk__valid_quorum(const char *value)
Definition: options.c:205
#define XML_CONFIG_ATTR_SHUTDOWN_LOCK_LIMIT
Definition: msg_xml.h:414
#define CRMD_ACTION_DEMOTE
Definition: crm.h:182
bool pcmk__valid_interval_spec(const char *value)
Definition: options.c:167
const char * role2text(enum rsc_role_e role)
Definition: common.c:450
Utility functions.
#define PCMK__OPT_NODE_HEALTH_BASE
#define PCMK__OPT_NODE_HEALTH_RED
#define crm_trace(fmt, args...)
Definition: logging.h:383
#define RSC_ROLE_UNPROMOTED_LEGACY_S
Definition: common.h:115
void pe_metadata(pcmk__output_t *out)
Definition: common.c:284
gchar * pcmk__format_option_metadata(const char *name, const char *desc_short, const char *desc_long, pcmk__cluster_option_t *option_list, int len)
Definition: options.c:413
int(*) int(*) void(*) void(* output_xml)(pcmk__output_t *out, const char *name, const char *buf)
struct pe_node_shared_s * details
Definition: pe_types.h:268
const char * pcmk__cluster_option(GHashTable *options, const pcmk__cluster_option_t *option_list, int len, const char *name)
Definition: options.c:337
Wrappers for and extensions to libxml2.
#define PCMK__OPT_NODE_HEALTH_GREEN
bool pcmk__is_fencing_action(const char *action)
Definition: operations.c:489
#define PCMK__NELEM(a)
Definition: internal.h:44
const char * pe_node_attribute_calculated(const pe_node_t *node, const char *name, const pe_resource_t *rsc)
Definition: common.c:518
#define CRMD_ACTION_PROMOTED
Definition: crm.h:181
#define RSC_ROLE_PROMOTED_S
Definition: common.h:114
#define PCMK__OPT_NODE_HEALTH_STRATEGY
void verify_pe_options(GHashTable *options)
Definition: common.c:297
#define CRM_OP_SHUTDOWN
Definition: crm.h:143
const char * pe_pref(GHashTable *options, const char *name)
Definition: common.c:303
#define CRMD_ACTION_STOPPED
Definition: crm.h:178
bool pcmk__valid_boolean(const char *value)
Definition: options.c:174
#define N_(String)
Definition: crm_internal.h:48
#define PCMK__OPT_NODE_HEALTH_YELLOW
pcmk__action_result_t result
Definition: pcmk_fence.c:35
#define PCMK__VALUE_PROGRESSIVE
#define crm_err(fmt, args...)
Definition: logging.h:377
#define CRM_ASSERT(expr)
Definition: results.h:42
#define XML_ATTR_HAVE_WATCHDOG
Definition: msg_xml.h:137
This structure contains everything that makes up a single output formatter.
bool pcmk__valid_number(const char *value)
Definition: options.c:182
#define CRMD_ACTION_MIGRATE
Definition: crm.h:171
#define RSC_ROLE_STOPPED_S
Definition: common.h:111
rsc_role_e
Possible roles that a resource can be in.
Definition: common.h:92
GList * running_on
Definition: pe_types.h:398
const char * pe_node_attribute_raw(const pe_node_t *node, const char *name)
Definition: common.c:558
enum action_tasks text2task(const char *task)
Definition: common.c:349
#define RSC_ROLE_UNKNOWN_S
Definition: common.h:110
void pcmk__validate_cluster_options(GHashTable *options, pcmk__cluster_option_t *option_list, int len)
Definition: options.c:488
#define RSC_ROLE_MAX
Definition: common.h:108
#define CRMD_ACTION_NOTIFIED
Definition: crm.h:186
#define pe_rsc_trace(rsc, fmt, args...)
Definition: internal.h:50
const char * fail2text(enum action_fail_response fail)
Definition: common.c:309
#define PCMK__VALUE_CUSTOM
#define CRMD_ACTION_STARTED
Definition: crm.h:175
#define CRMD_ACTION_CANCEL
Definition: crm.h:167
bool pcmk__validate_health_strategy(const char *value)
Definition: health.c:21
action_tasks
Definition: common.h:61
#define CRMD_ACTION_DELETE
Definition: crm.h:166
char * id
Definition: pe_types.h:347
#define CRMD_ACTION_STATUS
Definition: crm.h:188