pacemaker 3.0.1-16e74fc4da
Scalable High-Availability cluster resource manager
Loading...
Searching...
No Matches
options.c
Go to the documentation of this file.
1/*
2 * Copyright 2004-2025 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
12#include <stdio.h>
13#include <string.h>
14#include <stdlib.h>
15#include <sys/types.h>
16#include <sys/stat.h>
17
18#include <crm/crm.h>
19#include <crm/common/xml.h>
20
21void
23{
24 if (cmd == 'v' || cmd == '$') {
25 printf("Pacemaker %s\n", PACEMAKER_VERSION);
26 printf("Written by Andrew Beekhof and "
27 "the Pacemaker project contributors\n");
28
29 } else if (cmd == '!') {
30 printf("Pacemaker %s (Build: %s): %s\n", PACEMAKER_VERSION, BUILD_VERSION, CRM_FEATURES);
31 }
32
34 while(1); // above does not return
35}
36
37
38/*
39 * Option metadata
40 */
41
42static const pcmk__cluster_option_t cluster_options[] = {
43 /* name, old name, type, allowed values,
44 * default value, validator,
45 * flags,
46 * short description,
47 * long description
48 */
49 {
51 NULL, NULL,
53 N_("Pacemaker version on cluster node elected Designated Controller "
54 "(DC)"),
55 N_("Includes a hash which identifies the exact revision the code was "
56 "built from. Used for diagnostic purposes."),
57 },
58 {
60 NULL, NULL,
62 N_("The messaging layer on which Pacemaker is currently running"),
63 N_("Used for informational and diagnostic purposes."),
64 },
65 {
67 NULL, NULL,
69 N_("An arbitrary name for the cluster"),
70 N_("This optional value is mostly for users' convenience as desired "
71 "in administration, but may also be used in Pacemaker "
72 "configuration rules via the #cluster-name node attribute, and "
73 "by higher-level tools and resource agents."),
74 },
75 {
79 N_("How long to wait for a response from other nodes during start-up"),
80 N_("The optimal value will depend on the speed and load of your "
81 "network and the type of switches used."),
82 },
83 {
87 N_("Polling interval to recheck cluster state and evaluate rules "
88 "with date specifications"),
89 N_("Pacemaker is primarily event-driven, and looks ahead to know when "
90 "to recheck cluster state for failure-timeout settings and most "
91 "time-based rules. However, it will also recheck the cluster after "
92 "this amount of inactivity, to evaluate rules with date "
93 "specifications and serve as a fail-safe for certain types of "
94 "scheduler bugs. A value of 0 disables polling. A positive value "
95 "sets an interval in seconds, unless other units are specified "
96 "(for example, \"5min\")."),
97 },
98 {
101 PCMK_VALUE_STOP, NULL,
103 N_("How a cluster node should react if notified of its own fencing"),
104 N_("A cluster node may receive notification of a \"succeeded\" "
105 "fencing that targeted it if fencing is misconfigured, or if "
106 "fabric fencing is in use that doesn't cut cluster communication. "
107 "Use \"stop\" to attempt to immediately stop Pacemaker and stay "
108 "stopped, or \"panic\" to attempt to immediately reboot the local "
109 "node, falling back to stop on failure."),
110 },
111 {
115 N_("Declare an election failed if it is not decided within this much "
116 "time. If you need to adjust this value, it probably indicates "
117 "the presence of a bug."),
118 NULL,
119 },
120 {
124 N_("Exit immediately if shutdown does not complete within this much "
125 "time. If you need to adjust this value, it probably indicates "
126 "the presence of a bug."),
127 NULL,
128 },
129 {
133 N_("If you need to adjust this value, it probably indicates "
134 "the presence of a bug."),
135 NULL,
136 },
137 {
141 N_("If you need to adjust this value, it probably indicates "
142 "the presence of a bug."),
143 NULL,
144 },
145 {
149 N_("Enabling this option will slow down cluster recovery under all "
150 "conditions"),
151 N_("Delay cluster recovery for this much time to allow for additional "
152 "events to occur. Useful if your configuration is sensitive to "
153 "the order in which ping updates arrive."),
154 },
155 {
162 N_("What to do when the cluster does not have quorum"),
163 NULL,
164 },
165 {
169 N_("Whether to lock resources to a cleanly shut down node"),
170 N_("When true, resources active on a node when it is cleanly shut down "
171 "are kept \"locked\" to that node (not allowed to run elsewhere) "
172 "until they start again on that node after it rejoins (or for at "
173 "most shutdown-lock-limit, if set). Stonith resources and "
174 "Pacemaker Remote connections are never locked. Clone and bundle "
175 "instances and the promoted role of promotable clones are "
176 "currently never locked, though support could be added in a future "
177 "release."),
178 },
179 {
183 N_("Do not lock resources to a cleanly shut down node longer than "
184 "this"),
185 N_("If shutdown-lock is true and this is set to a nonzero time "
186 "duration, shutdown locks will expire after this much time has "
187 "passed since the shutdown was initiated, even if the node has not "
188 "rejoined."),
189 },
190 {
194 N_("Enable Access Control Lists (ACLs) for the CIB"),
195 NULL,
196 },
197 {
201 N_("Whether resources can run on any node by default"),
202 NULL,
203 },
204 {
208 N_("Whether the cluster should refrain from monitoring, starting, and "
209 "stopping resources"),
210 NULL,
211 },
212 {
216 N_("Whether a start failure should prevent a resource from being "
217 "recovered on the same node"),
218 N_("When true, the cluster will immediately ban a resource from a node "
219 "if it fails to start there. When false, the cluster will instead "
220 "check the resource's fail count against its migration-threshold.")
221 },
222 {
226 N_("Whether the cluster should check for active resources during "
227 "start-up"),
228 NULL,
229 },
230
231 // Fencing-related options
232 {
236 N_("Whether remote nodes can be fenced without quorum"),
237 N_("By default, an inquorate node can not fence Pacemaker Remote nodes "
238 "that are part of its partition as long as the cluster thinks they "
239 "can be restarted. If true, inquorate nodes will be able to fence "
240 "remote nodes regardless."),
241 },
242 {
246 N_("Whether nodes may be fenced as part of recovery"),
247 N_("If false, unresponsive nodes are immediately assumed to be "
248 "harmless, and resources that were active on them may be recovered "
249 "elsewhere. This can result in a \"split-brain\" situation, "
250 "potentially leading to data loss and/or service unavailability."),
251 },
252 {
257 N_("Action to send to fence device when a node needs to be fenced"),
258 NULL,
259 },
260 {
264 N_("How long to wait for on, off, and reboot fence actions to complete "
265 "by default"),
266 NULL,
267 },
268 {
272 N_("Whether watchdog integration is enabled"),
273 N_("This is set automatically by the cluster according to whether SBD "
274 "is detected to be in use. User-configured values are ignored. "
275 "The value `true` is meaningful if diskless SBD is used and "
276 "`stonith-watchdog-timeout` is nonzero. In that case, if fencing "
277 "is required, watchdog-based self-fencing will be performed via "
278 "SBD without requiring a fencing resource explicitly configured."),
279 },
280 {
281 /* @COMPAT Currently, unparsable values default to -1 (auto-calculate),
282 * while missing values default to 0 (disable). All values are accepted
283 * (unless the controller finds that the value conflicts with the
284 * SBD_WATCHDOG_TIMEOUT).
285 *
286 * At a compatibility break: properly validate as a timeout, let
287 * either negative values or a particular string like "auto" mean auto-
288 * calculate, and use 0 as the single default for when the option either
289 * is unset or fails to validate.
290 */
292 "0", NULL,
294 N_("How long before nodes can be assumed to be safely down when "
295 "watchdog-based self-fencing via SBD is in use"),
296 N_("If this is set to a positive value, lost nodes are assumed to "
297 "achieve self-fencing using watchdog-based SBD within this much "
298 "time. This does not require a fencing resource to be explicitly "
299 "configured, though a fence_watchdog resource can be configured, to "
300 "limit use to specific nodes. If this is set to 0 (the default), "
301 "the cluster will never assume watchdog-based self-fencing. If this "
302 "is set to a negative value, the cluster will use twice the local "
303 "value of the `SBD_WATCHDOG_TIMEOUT` environment variable if that "
304 "is positive, or otherwise treat this as 0. WARNING: When used, "
305 "this timeout must be larger than `SBD_WATCHDOG_TIMEOUT` on all "
306 "nodes that use watchdog-based SBD, and Pacemaker will refuse to "
307 "start on any of those nodes where this is not true for the local "
308 "value or SBD is not active. When this is set to a negative value, "
309 "`SBD_WATCHDOG_TIMEOUT` must be set to the same value on all nodes "
310 "that use SBD, otherwise data corruption or loss could occur."),
311 },
312 {
316 N_("How many times fencing can fail before it will no longer be "
317 "immediately re-attempted on a target"),
318 NULL,
319 },
320 {
322#if PCMK__CONCURRENT_FENCING_DEFAULT_TRUE
324#else
326#endif
329 N_("Allow performing fencing operations in parallel"),
330 NULL,
331 },
332 {
336 N_("Whether to fence unseen nodes at start-up"),
337 N_("Setting this to false may lead to a \"split-brain\" situation, "
338 "potentially leading to data loss and/or service unavailability."),
339 },
340 {
344 N_("Apply fencing delay targeting the lost nodes with the highest "
345 "total resource priority"),
346 N_("Apply specified delay for the fencings that are targeting the lost "
347 "nodes with the highest total resource priority in case we don't "
348 "have the majority of the nodes in our cluster partition, so that "
349 "the more significant nodes potentially win any fencing match, "
350 "which is especially meaningful under split-brain of 2-node "
351 "cluster. A promoted resource instance takes the base priority + 1 "
352 "on calculation if the base priority is not 0. Any static/random "
353 "delays that are introduced by `pcmk_delay_base/max` configured "
354 "for the corresponding fencing resources will be added to this "
355 "delay. This delay should be significantly greater than, safely "
356 "twice, the maximum `pcmk_delay_base/max`. By default, priority "
357 "fencing delay is disabled."),
358 },
359 {
363 N_("How long to wait for a node that has joined the cluster to join "
364 "the controller process group"),
365 N_("Fence nodes that do not join the controller process group within "
366 "this much time after joining the cluster, to allow the cluster "
367 "to continue managing resources. A value of 0 means never fence "
368 "pending nodes. Setting the value to 2h means fence nodes after "
369 "2 hours."),
370 },
371 {
375 N_("Maximum time for node-to-node communication"),
376 N_("The node elected Designated Controller (DC) will consider an action "
377 "failed if it does not get a response from the node executing the "
378 "action within this time (after considering the action's own "
379 "timeout). The \"correct\" value will depend on the speed and "
380 "load of your network and cluster nodes.")
381 },
382
383 // Limits
384 {
388 N_("Maximum amount of system load that should be used by cluster "
389 "nodes"),
390 N_("The cluster will slow down its recovery process when the amount of "
391 "system resources used (currently CPU) approaches this limit"),
392 },
393 {
395 "0", pcmk__valid_int,
397 N_("Maximum number of jobs that can be scheduled per node (defaults to "
398 "2x cores)"),
399 NULL,
400 },
401 {
403 "0", pcmk__valid_int,
405 N_("Maximum number of jobs that the cluster may execute in parallel "
406 "across all nodes"),
407 N_("The \"correct\" value will depend on the speed and load of your "
408 "network and cluster nodes. If set to 0, the cluster will "
409 "impose a dynamically calculated limit when any node has a "
410 "high load."),
411 },
412 {
414 "-1", pcmk__valid_int,
416 N_("The number of live migration actions that the cluster is allowed "
417 "to execute in parallel on a node (-1 means no limit)"),
418 NULL,
419 },
420 {
421 /* @TODO This is actually ignored if not strictly positive. We should
422 * overhaul value types in Pacemaker Explained. There are lots of
423 * inaccurate ranges (assumptions of 32-bit width, "nonnegative" when
424 * positive is required, etc.).
425 *
426 * Maybe a single integer type with the allowed range specified would be
427 * better.
428 *
429 * Drop the PCMK_VALUE_NONNEGATIVE_INTEGER constant if we do this before
430 * a release.
431 */
435 N_("Maximum IPC message backlog before disconnecting a cluster daemon"),
436 N_("Raise this if log has \"Evicting client\" messages for cluster "
437 "daemon PIDs (a good value is the number of resources in the "
438 "cluster multiplied by the number of nodes)."),
439 },
440
441 // Orphans and stopping
442 {
446 N_("Whether the cluster should stop all active resources"),
447 NULL,
448 },
449 {
453 N_("Whether to stop resources that were removed from the "
454 "configuration"),
455 NULL,
456 },
457 {
461 N_("Whether to cancel recurring actions removed from the "
462 "configuration"),
463 NULL,
464 },
465
466 // Storing inputs
467 {
469 "-1", pcmk__valid_int,
471 N_("The number of scheduler inputs resulting in errors to save"),
472 N_("Zero to disable, -1 to store unlimited."),
473 },
474 {
476 "5000", pcmk__valid_int,
478 N_("The number of scheduler inputs resulting in warnings to save"),
479 N_("Zero to disable, -1 to store unlimited."),
480 },
481 {
483 "4000", pcmk__valid_int,
485 N_("The number of scheduler inputs without errors or warnings to save"),
486 N_("Zero to disable, -1 to store unlimited."),
487 },
488
489 // Node health
490 {
497 N_("How cluster should react to node health attributes"),
498 N_("Requires external entities to create node attributes (named with "
499 "the prefix \"#health\") with values \"red\", \"yellow\", or "
500 "\"green\".")
501 },
502 {
504 "0", pcmk__valid_int,
506 N_("Base health score assigned to a node"),
507 N_("Only used when \"node-health-strategy\" is set to "
508 "\"progressive\"."),
509 },
510 {
512 "0", pcmk__valid_int,
514 N_("The score to use for a node health attribute whose value is "
515 "\"green\""),
516 N_("Only used when \"node-health-strategy\" is set to \"custom\" or "
517 "\"progressive\"."),
518 },
519 {
521 "0", pcmk__valid_int,
523 N_("The score to use for a node health attribute whose value is "
524 "\"yellow\""),
525 N_("Only used when \"node-health-strategy\" is set to \"custom\" or "
526 "\"progressive\"."),
527 },
528 {
530 "-INFINITY", pcmk__valid_int,
532 N_("The score to use for a node health attribute whose value is "
533 "\"red\""),
534 N_("Only used when \"node-health-strategy\" is set to \"custom\" or "
535 "\"progressive\".")
536 },
537
538 // Placement strategy
539 {
545 N_("How the cluster should allocate resources to nodes"),
546 NULL,
547 },
548
549 { NULL, },
550};
551
552static const pcmk__cluster_option_t fencing_params[] = {
553 /* name, old name, type, allowed values,
554 * default value, validator,
555 * flags,
556 * short description,
557 * long description
558 */
559 {
561 NULL, NULL,
563 N_("Name of agent parameter that should be set to the fencing target"),
564 N_("If the fencing agent metadata advertises support for the \"port\" "
565 "or \"plug\" parameter, that will be used as the default, "
566 "otherwise \"none\" will be used, which tells the cluster not to "
567 "supply any additional parameters."),
568 },
569 {
571 NULL, NULL,
573 N_("A mapping of node names to port numbers for devices that do not "
574 "support node names."),
575 N_("For example, \"node1:1;node2:2,3\" would tell the cluster to use "
576 "port 1 for node1 and ports 2 and 3 for node2."),
577 },
578 {
580 NULL, NULL,
582 N_("Nodes targeted by this device"),
583 N_("Comma-separated list of nodes that can be targeted by this device "
584 "(for example, \"node1,node2,node3\"). If pcmk_host_check is "
585 "\"static-list\", either this or pcmk_host_map must be set."),
586 },
587 {
591 NULL, NULL,
593 N_("How to determine which nodes can be targeted by the device"),
594 N_("Use \"dynamic-list\" to query the device via the 'list' command; "
595 "\"static-list\" to check the pcmk_host_list attribute; "
596 "\"status\" to query the device via the 'status' command; or "
597 "\"none\" to assume every device can fence every node. "
598 "The default value is \"static-list\" if pcmk_host_map or "
599 "pcmk_host_list is set; otherwise \"dynamic-list\" if the device "
600 "supports the list operation; otherwise \"status\" if the device "
601 "supports the status operation; otherwise \"none\""),
602 },
603 {
605 "0s", NULL,
607 N_("Enable a delay of no more than the time specified before executing "
608 "fencing actions."),
609 N_("Enable a delay of no more than the time specified before executing "
610 "fencing actions. Pacemaker derives the overall delay by taking "
611 "the value of pcmk_delay_base and adding a random delay value such "
612 "that the sum is kept below this maximum."),
613 },
614 {
616 "0s", NULL,
618 N_("Enable a base delay for fencing actions and specify base delay "
619 "value."),
620 N_("This enables a static delay for fencing actions, which can help "
621 "avoid \"death matches\" where two nodes try to fence each other "
622 "at the same time. If pcmk_delay_max is also used, a random delay "
623 "will be added such that the total delay is kept below that value. "
624 "This can be set to a single time value to apply to any node "
625 "targeted by this device (useful if a separate device is "
626 "configured for each target), or to a node map (for example, "
627 "\"node1:1s;node2:5\") to set a different value for each target."),
628 },
629 {
631 "1", NULL,
633 N_("The maximum number of actions can be performed in parallel on this "
634 "device"),
635 N_("If the concurrent-fencing cluster property is \"true\", this "
636 "specifies the maximum number of actions that can be performed in "
637 "parallel on this device. A value of -1 means unlimited."),
638 },
639 {
640 "pcmk_reboot_action", NULL, PCMK_VALUE_STRING, NULL,
641 PCMK_ACTION_REBOOT, NULL,
643 N_("An alternate command to run instead of 'reboot'"),
644 N_("Some devices do not support the standard commands or may provide "
645 "additional ones. Use this to specify an alternate, device-"
646 "specific, command that implements the 'reboot' action."),
647 },
648 {
649 "pcmk_reboot_timeout", NULL, PCMK_VALUE_TIMEOUT, NULL,
650 "60s", NULL,
652 N_("Specify an alternate timeout to use for 'reboot' actions instead "
653 "of stonith-timeout"),
654 N_("Some devices need much more/less time to complete than normal. "
655 "Use this to specify an alternate, device-specific, timeout for "
656 "'reboot' actions."),
657 },
658 {
659 "pcmk_reboot_retries", NULL, PCMK_VALUE_INTEGER, NULL,
660 "2", NULL,
662 N_("The maximum number of times to try the 'reboot' command within the "
663 "timeout period"),
664 N_("Some devices do not support multiple connections. Operations may "
665 "\"fail\" if the device is busy with another task. In that case, "
666 "Pacemaker will automatically retry the operation if there is time "
667 "remaining. Use this option to alter the number of times Pacemaker "
668 "tries a 'reboot' action before giving up."),
669 },
670 {
671 "pcmk_off_action", NULL, PCMK_VALUE_STRING, NULL,
672 PCMK_ACTION_OFF, NULL,
674 N_("An alternate command to run instead of 'off'"),
675 N_("Some devices do not support the standard commands or may provide "
676 "additional ones. Use this to specify an alternate, device-"
677 "specific, command that implements the 'off' action."),
678 },
679 {
680 "pcmk_off_timeout", NULL, PCMK_VALUE_TIMEOUT, NULL,
681 "60s", NULL,
683 N_("Specify an alternate timeout to use for 'off' actions instead of "
684 "stonith-timeout"),
685 N_("Some devices need much more/less time to complete than normal. "
686 "Use this to specify an alternate, device-specific, timeout for "
687 "'off' actions."),
688 },
689 {
690 "pcmk_off_retries", NULL, PCMK_VALUE_INTEGER, NULL,
691 "2", NULL,
693 N_("The maximum number of times to try the 'off' command within the "
694 "timeout period"),
695 N_("Some devices do not support multiple connections. Operations may "
696 "\"fail\" if the device is busy with another task. In that case, "
697 "Pacemaker will automatically retry the operation if there is time "
698 "remaining. Use this option to alter the number of times Pacemaker "
699 "tries a 'off' action before giving up."),
700 },
701 {
702 "pcmk_on_action", NULL, PCMK_VALUE_STRING, NULL,
703 PCMK_ACTION_ON, NULL,
705 N_("An alternate command to run instead of 'on'"),
706 N_("Some devices do not support the standard commands or may provide "
707 "additional ones. Use this to specify an alternate, device-"
708 "specific, command that implements the 'on' action."),
709 },
710 {
711 "pcmk_on_timeout", NULL, PCMK_VALUE_TIMEOUT, NULL,
712 "60s", NULL,
714 N_("Specify an alternate timeout to use for 'on' actions instead of "
715 "stonith-timeout"),
716 N_("Some devices need much more/less time to complete than normal. "
717 "Use this to specify an alternate, device-specific, timeout for "
718 "'on' actions."),
719 },
720 {
721 "pcmk_on_retries", NULL, PCMK_VALUE_INTEGER, NULL,
722 "2", NULL,
724 N_("The maximum number of times to try the 'on' command within the "
725 "timeout period"),
726 N_("Some devices do not support multiple connections. Operations may "
727 "\"fail\" if the device is busy with another task. In that case, "
728 "Pacemaker will automatically retry the operation if there is time "
729 "remaining. Use this option to alter the number of times Pacemaker "
730 "tries a 'on' action before giving up."),
731 },
732 {
733 "pcmk_list_action", NULL, PCMK_VALUE_STRING, NULL,
734 PCMK_ACTION_LIST, NULL,
736 N_("An alternate command to run instead of 'list'"),
737 N_("Some devices do not support the standard commands or may provide "
738 "additional ones. Use this to specify an alternate, device-"
739 "specific, command that implements the 'list' action."),
740 },
741 {
742 "pcmk_list_timeout", NULL, PCMK_VALUE_TIMEOUT, NULL,
743 "60s", NULL,
745 N_("Specify an alternate timeout to use for 'list' actions instead of "
746 "stonith-timeout"),
747 N_("Some devices need much more/less time to complete than normal. "
748 "Use this to specify an alternate, device-specific, timeout for "
749 "'list' actions."),
750 },
751 {
752 "pcmk_list_retries", NULL, PCMK_VALUE_INTEGER, NULL,
753 "2", NULL,
755 N_("The maximum number of times to try the 'list' command within the "
756 "timeout period"),
757 N_("Some devices do not support multiple connections. Operations may "
758 "\"fail\" if the device is busy with another task. In that case, "
759 "Pacemaker will automatically retry the operation if there is time "
760 "remaining. Use this option to alter the number of times Pacemaker "
761 "tries a 'list' action before giving up."),
762 },
763 {
764 "pcmk_monitor_action", NULL, PCMK_VALUE_STRING, NULL,
767 N_("An alternate command to run instead of 'monitor'"),
768 N_("Some devices do not support the standard commands or may provide "
769 "additional ones. Use this to specify an alternate, device-"
770 "specific, command that implements the 'monitor' action."),
771 },
772 {
773 "pcmk_monitor_timeout", NULL, PCMK_VALUE_TIMEOUT, NULL,
774 "60s", NULL,
776 N_("Specify an alternate timeout to use for 'monitor' actions instead "
777 "of stonith-timeout"),
778 N_("Some devices need much more/less time to complete than normal. "
779 "Use this to specify an alternate, device-specific, timeout for "
780 "'monitor' actions."),
781 },
782 {
783 "pcmk_monitor_retries", NULL, PCMK_VALUE_INTEGER, NULL,
784 "2", NULL,
786 N_("The maximum number of times to try the 'monitor' command within "
787 "the timeout period"),
788 N_("Some devices do not support multiple connections. Operations may "
789 "\"fail\" if the device is busy with another task. In that case, "
790 "Pacemaker will automatically retry the operation if there is time "
791 "remaining. Use this option to alter the number of times Pacemaker "
792 "tries a 'monitor' action before giving up."),
793 },
794 {
795 "pcmk_status_action", NULL, PCMK_VALUE_STRING, NULL,
796 PCMK_ACTION_STATUS, NULL,
798 N_("An alternate command to run instead of 'status'"),
799 N_("Some devices do not support the standard commands or may provide "
800 "additional ones. Use this to specify an alternate, device-"
801 "specific, command that implements the 'status' action."),
802 },
803 {
804 "pcmk_status_timeout", NULL, PCMK_VALUE_TIMEOUT, NULL,
805 "60s", NULL,
807 N_("Specify an alternate timeout to use for 'status' actions instead "
808 "of stonith-timeout"),
809 N_("Some devices need much more/less time to complete than normal. "
810 "Use this to specify an alternate, device-specific, timeout for "
811 "'status' actions."),
812 },
813 {
814 "pcmk_status_retries", NULL, PCMK_VALUE_INTEGER, NULL,
815 "2", NULL,
817 N_("The maximum number of times to try the 'status' command within "
818 "the timeout period"),
819 N_("Some devices do not support multiple connections. Operations may "
820 "\"fail\" if the device is busy with another task. In that case, "
821 "Pacemaker will automatically retry the operation if there is time "
822 "remaining. Use this option to alter the number of times Pacemaker "
823 "tries a 'status' action before giving up."),
824 },
825
826 { NULL, },
827};
828
829static const pcmk__cluster_option_t primitive_meta[] = {
830 /* name, old name, type, allowed values,
831 * default value, validator,
832 * flags,
833 * short description,
834 * long description
835 */
836 {
838 "0", NULL,
840 N_("Resource assignment priority"),
841 N_("If not all resources can be active, the cluster will stop "
842 "lower-priority resources in order to keep higher-priority ones "
843 "active."),
844 },
845 {
847 PCMK_VALUE_TRUE, NULL,
849 N_("Default value for influence in colocation constraints"),
850 N_("Use this value as the default for influence in all colocation "
851 "constraints involving this resource, as well as in the implicit "
852 "colocation constraints created if this resource is in a group."),
853 },
854 {
858 PCMK_ROLE_STARTED, NULL,
860 N_("State the cluster should attempt to keep this resource in"),
861 N_("\"Stopped\" forces the resource to be stopped. "
862 "\"Started\" allows the resource to be started (and in the case of "
863 "promotable clone resources, promoted if appropriate). "
864 "\"Unpromoted\" allows the resource to be started, but only in the "
865 "unpromoted role if the resource is promotable. "
866 "\"Promoted\" is equivalent to \"Started\"."),
867 },
868 {
870 PCMK_VALUE_TRUE, NULL,
872 N_("Whether the cluster is allowed to actively change the resource's "
873 "state"),
874 N_("If false, the cluster will not start, stop, promote, or demote the "
875 "resource on any node. Recurring actions for the resource are "
876 "unaffected. If true, a true value for the maintenance-mode "
877 "cluster option, the maintenance node attribute, or the "
878 "maintenance resource meta-attribute overrides this."),
879 },
880 {
882 PCMK_VALUE_FALSE, NULL,
884 N_("If true, the cluster will not schedule any actions involving the "
885 "resource"),
886 N_("If true, the cluster will not start, stop, promote, or demote the "
887 "resource on any node, and will pause any recurring monitors "
888 "(except those specifying role as \"Stopped\"). If false, a true "
889 "value for the maintenance-mode cluster option or maintenance node "
890 "attribute overrides this."),
891 },
892 {
894 NULL, NULL,
896 N_("Score to add to the current node when a resource is already "
897 "active"),
898 N_("Score to add to the current node when a resource is already "
899 "active. This allows running resources to stay where they are, "
900 "even if they would be placed elsewhere if they were being started "
901 "from a stopped state. "
902 "The default is 1 for individual clone instances, and 0 for all "
903 "other resources."),
904 },
905 {
909 NULL, NULL,
911 N_("Conditions under which the resource can be started"),
912 N_("Conditions under which the resource can be started. "
913 "\"nothing\" means the cluster can always start this resource. "
914 "\"quorum\" means the cluster can start this resource only if a "
915 "majority of the configured nodes are active. "
916 "\"fencing\" means the cluster can start this resource only if a "
917 "majority of the configured nodes are active and any failed or "
918 "unknown nodes have been fenced. "
919 "\"unfencing\" means the cluster can start this resource only if "
920 "a majority of the configured nodes are active and any failed or "
921 "unknown nodes have been fenced, and only on nodes that have been "
922 "unfenced. "
923 "The default is \"quorum\" for resources with a class of stonith; "
924 "otherwise, \"unfencing\" if unfencing is active in the cluster; "
925 "otherwise, \"fencing\" if the stonith-enabled cluster option is "
926 "true; "
927 "otherwise, \"quorum\"."),
928 },
929 {
933 N_("Number of failures on a node before the resource becomes "
934 "ineligible to run there."),
935 N_("Number of failures that may occur for this resource on a node, "
936 "before that node is marked ineligible to host this resource. A "
937 "value of 0 indicates that this feature is disabled (the node will "
938 "never be marked ineligible). By contrast, the cluster treats "
939 "\"INFINITY\" (the default) as a very large but finite number. "
940 "This option has an effect only if the failed operation specifies "
941 "its on-fail attribute as \"restart\" (the default), and "
942 "additionally for failed start operations, if the "
943 "start-failure-is-fatal cluster property is set to false."),
944 },
945 {
947 "0", NULL,
949 N_("Number of seconds before acting as if a failure had not occurred"),
950 N_("Number of seconds after a failed action for this resource before "
951 "acting as if the failure had not occurred, and potentially "
952 "allowing the resource back to the node on which it failed. "
953 "A value of 0 indicates that this feature is disabled."),
954 },
955 {
961 N_("What to do if the cluster finds the resource active on more than "
962 "one node"),
963 N_("What to do if the cluster finds the resource active on more than "
964 "one node. "
965 "\"block\" means to mark the resource as unmanaged. "
966 "\"stop_only\" means to stop all active instances of this resource "
967 "and leave them stopped. "
968 "\"stop_start\" means to stop all active instances of this "
969 "resource and start the resource in one location only. "
970 "\"stop_unexpected\" means to stop all active instances of this "
971 "resource except where the resource should be active. (This should "
972 "be used only when extra instances are not expected to disrupt "
973 "existing instances, and the resource agent's monitor of an "
974 "existing instance is capable of detecting any problems that could "
975 "be caused. Note that any resources ordered after this one will "
976 "still need to be restarted.)"),
977 },
978 {
980 NULL, NULL,
982 N_("Whether the cluster should try to \"live migrate\" this resource "
983 "when it needs to be moved"),
984 N_("Whether the cluster should try to \"live migrate\" this resource "
985 "when it needs to be moved. "
986 "The default is true for ocf:pacemaker:remote resources, and false "
987 "otherwise."),
988 },
989 {
991 PCMK_VALUE_FALSE, NULL,
993 N_("Whether the resource should be allowed to run on a node even if "
994 "the node's health score would otherwise prevent it"),
995 NULL,
996 },
997 {
999 NULL, NULL,
1001 N_("Where to check user-defined node attributes"),
1002 N_("Whether to check user-defined node attributes on the physical host "
1003 "where a container is running or on the local node. This is "
1004 "usually set for a bundle resource and inherited by the bundle's "
1005 "primitive resource. "
1006 "A value of \"host\" means to check user-defined node attributes "
1007 "on the underlying physical host. Any other value means to check "
1008 "user-defined node attributes on the local node (for a bundled "
1009 "primitive resource, this is the bundle node)."),
1010 },
1011 {
1013 NULL, NULL,
1015 N_("Name of the Pacemaker Remote guest node this resource is "
1016 "associated with, if any"),
1017 N_("Name of the Pacemaker Remote guest node this resource is "
1018 "associated with, if any. If specified, this both enables the "
1019 "resource as a guest node and defines the unique name used to "
1020 "identify the guest node. The guest must be configured to run the "
1021 "Pacemaker Remote daemon when it is started. "
1022 "WARNING: This value cannot overlap with any resource or node "
1023 "IDs."),
1024 },
1025 {
1027 NULL, NULL,
1029 N_("If remote-node is specified, the IP address or hostname used to "
1030 "connect to the guest via Pacemaker Remote"),
1031 N_("If remote-node is specified, the IP address or hostname used to "
1032 "connect to the guest via Pacemaker Remote. The Pacemaker Remote "
1033 "daemon on the guest must be configured to accept connections on "
1034 "this address. "
1035 "The default is the value of the remote-node meta-attribute."),
1036 },
1037 {
1039 "3121", NULL,
1041 N_("If remote-node is specified, port on the guest used for its "
1042 "Pacemaker Remote connection"),
1043 N_("If remote-node is specified, the port on the guest used for its "
1044 "Pacemaker Remote connection. The Pacemaker Remote daemon on the "
1045 "guest must be configured to listen on this port."),
1046 },
1047 {
1049 "60s", NULL,
1051 N_("If remote-node is specified, how long before a pending Pacemaker "
1052 "Remote guest connection times out."),
1053 NULL,
1054 },
1055 {
1057 PCMK_VALUE_TRUE, NULL,
1059 N_("If remote-node is specified, this acts as the allow-migrate "
1060 "meta-attribute for the implicit remote connection resource "
1061 "(ocf:pacemaker:remote)."),
1062 NULL,
1063 },
1064
1065 { NULL, },
1066};
1067
1068/*
1069 * Environment variable option handling
1070 */
1071
1084const char *
1085pcmk__env_option(const char *option)
1086{
1087 const char *const prefixes[] = {"PCMK_", "HA_"};
1088 char env_name[NAME_MAX];
1089 const char *value = NULL;
1090
1091 CRM_CHECK(!pcmk__str_empty(option), return NULL);
1092
1093 for (int i = 0; i < PCMK__NELEM(prefixes); i++) {
1094 int rv = snprintf(env_name, NAME_MAX, "%s%s", prefixes[i], option);
1095
1096 if (rv < 0) {
1097 crm_err("Failed to write %s%s to buffer: %s", prefixes[i], option,
1098 strerror(errno));
1099 return NULL;
1100 }
1101
1102 if (rv >= sizeof(env_name)) {
1103 crm_trace("\"%s%s\" is too long", prefixes[i], option);
1104 continue;
1105 }
1106
1107 value = getenv(env_name);
1108 if (value != NULL) {
1109 crm_trace("Found %s = %s", env_name, value);
1110 return value;
1111 }
1112 }
1113
1114 crm_trace("Nothing found for %s", option);
1115 return NULL;
1116}
1117
1134void
1135pcmk__set_env_option(const char *option, const char *value, bool compat)
1136{
1137 // @COMPAT Drop support for "HA_" options eventually
1138 const char *const prefixes[] = {"PCMK_", "HA_"};
1139 char env_name[NAME_MAX];
1140
1141 CRM_CHECK(!pcmk__str_empty(option) && (strchr(option, '=') == NULL),
1142 return);
1143
1144 for (int i = 0; i < PCMK__NELEM(prefixes); i++) {
1145 int rv = snprintf(env_name, NAME_MAX, "%s%s", prefixes[i], option);
1146
1147 if (rv < 0) {
1148 crm_err("Failed to write %s%s to buffer: %s", prefixes[i], option,
1149 strerror(errno));
1150 return;
1151 }
1152
1153 if (rv >= sizeof(env_name)) {
1154 crm_trace("\"%s%s\" is too long", prefixes[i], option);
1155 continue;
1156 }
1157
1158 if (value != NULL) {
1159 crm_trace("Setting %s to %s", env_name, value);
1160 rv = setenv(env_name, value, 1);
1161 } else {
1162 crm_trace("Unsetting %s", env_name);
1163 rv = unsetenv(env_name);
1164 }
1165
1166 if (rv < 0) {
1167 crm_err("Failed to %sset %s: %s", (value != NULL)? "" : "un",
1168 env_name, strerror(errno));
1169 }
1170
1171 if (!compat && (value != NULL)) {
1172 // For set, don't proceed to HA_<option> unless compat is enabled
1173 break;
1174 }
1175 }
1176}
1177
1191bool
1192pcmk__env_option_enabled(const char *daemon, const char *option)
1193{
1194 const char *value = pcmk__env_option(option);
1195
1196 return (value != NULL)
1197 && (crm_is_true(value)
1198 || ((daemon != NULL) && (strstr(value, daemon) != NULL)));
1199}
1200
1201
1202/*
1203 * Cluster option handling
1204 */
1205
1215bool
1217{
1218 return pcmk_parse_interval_spec(value, NULL) == pcmk_rc_ok;
1219}
1220
1229bool
1230pcmk__valid_boolean(const char *value)
1231{
1232 return crm_str_to_boolean(value, NULL) == 1;
1233}
1234
1245bool
1246pcmk__valid_int(const char *value)
1247{
1248 return (value != NULL)
1249 && (pcmk_str_is_infinity(value)
1251 || (pcmk__scan_ll(value, NULL, 0LL) == pcmk_rc_ok));
1252}
1253
1265bool
1267{
1268 long long num = 0LL;
1269
1270 return pcmk_str_is_infinity(value)
1271 || ((pcmk__scan_ll(value, &num, 0LL) == pcmk_rc_ok)
1272 && (num > 0));
1273}
1274
1285bool
1294
1307bool
1308pcmk__valid_percentage(const char *value)
1309{
1310 char *end = NULL;
1311 float number = strtof(value, &end);
1312
1313 return ((end == NULL) || (end[0] == '%')) && (number >= 0);
1314}
1315
1325bool
1332
1342static const char *
1343cluster_option_value(GHashTable *table, const pcmk__cluster_option_t *option)
1344{
1345 const char *value = NULL;
1346
1347 pcmk__assert((option != NULL) && (option->name != NULL));
1348
1349 if (table != NULL) {
1350 value = g_hash_table_lookup(table, option->name);
1351
1352 if ((value == NULL) && (option->alt_name != NULL)) {
1353 value = g_hash_table_lookup(table, option->alt_name);
1354 if (value != NULL) {
1355 pcmk__config_warn("Support for legacy name '%s' for cluster "
1356 "option '%s' is deprecated and will be "
1357 "removed in a future release",
1358 option->alt_name, option->name);
1359
1360 // Inserting copy with current name ensures we only warn once
1361 pcmk__insert_dup(table, option->name, value);
1362 }
1363 }
1364
1365 if ((value != NULL) && (option->is_valid != NULL)
1366 && !option->is_valid(value)) {
1367
1368 pcmk__config_err("Using default value for cluster option '%s' "
1369 "because '%s' is invalid", option->name, value);
1370 value = NULL;
1371 }
1372
1373 if (value != NULL) {
1374 return value;
1375 }
1376 }
1377
1378 // No value found, use default
1379 value = option->default_value;
1380
1381 if (value == NULL) {
1382 crm_trace("No value or default provided for cluster option '%s'",
1383 option->name);
1384 return NULL;
1385 }
1386
1387 CRM_CHECK((option->is_valid == NULL) || option->is_valid(value),
1388 crm_err("Bug: default value for cluster option '%s' is invalid",
1389 option->name);
1390 return NULL);
1391
1392 crm_trace("Using default value '%s' for cluster option '%s'",
1393 value, option->name);
1394 if (table != NULL) {
1395 pcmk__insert_dup(table, option->name, value);
1396 }
1397 return value;
1398}
1399
1409const char *
1410pcmk__cluster_option(GHashTable *options, const char *name)
1411{
1412 for (const pcmk__cluster_option_t *option = cluster_options;
1413 option->name != NULL; option++) {
1414
1415 if (pcmk__str_eq(name, option->name, pcmk__str_casei)) {
1416 return cluster_option_value(options, option);
1417 }
1418 }
1419 CRM_CHECK(FALSE, crm_err("Bug: looking for unknown option '%s'", name));
1420 return NULL;
1421}
1422
1442int
1444 const char *desc_short, const char *desc_long,
1445 uint32_t filter, bool all)
1446{
1447 return out->message(out, "option-list", name, desc_short, desc_long, filter,
1448 cluster_options, all);
1449}
1450
1465int
1467 const char *desc_short, const char *desc_long,
1468 bool all)
1469{
1470 return out->message(out, "option-list", name, desc_short, desc_long,
1471 pcmk__opt_none, primitive_meta, all);
1472}
1473
1492int
1494 const char *desc_short, const char *desc_long,
1495 bool all)
1496{
1497 return out->message(out, "option-list", name, desc_short, desc_long,
1498 pcmk__opt_none, fencing_params, all);
1499}
1500
1514int
1516 const char *desc_short, const char *desc_long,
1517 enum pcmk__opt_flags filter)
1518{
1519 // @COMPAT Drop this function when we drop daemon metadata
1520 pcmk__output_t *tmp_out = NULL;
1521 xmlNode *top = NULL;
1522 const xmlNode *metadata = NULL;
1523 GString *metadata_s = NULL;
1524
1525 int rc = pcmk__output_new(&tmp_out, "xml", "/dev/null", NULL);
1526
1527 if (rc != pcmk_rc_ok) {
1528 return rc;
1529 }
1530
1532
1533 if (filter == pcmk__opt_fencing) {
1534 pcmk__output_fencing_params(tmp_out, name, desc_short, desc_long, true);
1535 } else {
1536 pcmk__output_cluster_options(tmp_out, name, desc_short, desc_long,
1537 (uint32_t) filter, true);
1538 }
1539
1540 tmp_out->finish(tmp_out, CRM_EX_OK, false, (void **) &top);
1541 metadata = pcmk__xe_first_child(top, PCMK_XE_RESOURCE_AGENT, NULL, NULL);
1542
1543 metadata_s = g_string_sized_new(16384);
1545 metadata_s, 0);
1546
1547 out->output_xml(out, PCMK_XE_METADATA, metadata_s->str);
1548
1549 pcmk__output_free(tmp_out);
1550 pcmk__xml_free(top);
1551 g_string_free(metadata_s, TRUE);
1552 return pcmk_rc_ok;
1553}
1554
1555void
1557{
1558 for (const pcmk__cluster_option_t *option = cluster_options;
1559 option->name != NULL; option++) {
1560
1561 cluster_option_value(options, option);
1562 }
1563}
#define PCMK_ACTION_STATUS
Definition actions.h:64
#define PCMK_ACTION_LIST
Definition actions.h:43
#define PCMK_ACTION_REBOOT
Definition actions.h:59
#define PCMK_ACTION_MONITOR
Definition actions.h:51
#define PCMK_ACTION_ON
Definition actions.h:55
#define PCMK_ACTION_OFF
Definition actions.h:54
bool pcmk__is_fencing_action(const char *action)
Definition actions.c:611
#define PCMK_STONITH_HOST_LIST
Definition agents.h:42
#define PCMK_STONITH_HOST_ARGUMENT
Definition agents.h:40
#define PCMK_STONITH_HOST_MAP
Definition agents.h:43
#define PCMK_STONITH_DELAY_BASE
Definition agents.h:38
#define PCMK_STONITH_ACTION_LIMIT
Definition agents.h:37
#define PCMK_STONITH_HOST_CHECK
Definition agents.h:41
#define PCMK_STONITH_DELAY_MAX
Definition agents.h:39
const char * name
Definition cib.c:26
#define PCMK__NELEM(a)
Definition internal.h:50
#define PACEMAKER_VERSION
Definition config.h:430
#define CRM_FEATURES
Definition config.h:30
#define BUILD_VERSION
Definition config.h:5
A dumping ground.
#define N_(String)
bool pcmk__validate_health_strategy(const char *value)
Definition health.c:26
#define NAME_MAX
Definition logging.c:112
#define CRM_CHECK(expr, failure_action)
Definition logging.h:213
#define crm_err(fmt, args...)
Definition logging.h:357
#define crm_trace(fmt, args...)
Definition logging.h:370
#define pcmk__config_warn(fmt...)
#define pcmk__config_err(fmt...)
bool pcmk__valid_positive_int(const char *value)
Definition options.c:1266
void pcmk__cli_help(char cmd)
Definition options.c:22
const char * pcmk__cluster_option(GHashTable *options, const char *name)
Definition options.c:1410
int pcmk__output_primitive_meta(pcmk__output_t *out, const char *name, const char *desc_short, const char *desc_long, bool all)
Definition options.c:1466
int pcmk__output_cluster_options(pcmk__output_t *out, const char *name, const char *desc_short, const char *desc_long, uint32_t filter, bool all)
Definition options.c:1443
bool pcmk__valid_no_quorum_policy(const char *value)
Definition options.c:1286
bool pcmk__valid_interval_spec(const char *value)
Definition options.c:1216
bool pcmk__valid_boolean(const char *value)
Definition options.c:1230
void pcmk__set_env_option(const char *option, const char *value, bool compat)
Set or unset a Pacemaker environment variable option.
Definition options.c:1135
bool pcmk__valid_placement_strategy(const char *value)
Definition options.c:1326
int pcmk__daemon_metadata(pcmk__output_t *out, const char *name, const char *desc_short, const char *desc_long, enum pcmk__opt_flags filter)
Definition options.c:1515
bool pcmk__env_option_enabled(const char *daemon, const char *option)
Definition options.c:1192
bool pcmk__valid_percentage(const char *value)
Definition options.c:1308
bool pcmk__valid_int(const char *value)
Definition options.c:1246
const char * pcmk__env_option(const char *option)
Definition options.c:1085
void pcmk__validate_cluster_options(GHashTable *options)
Definition options.c:1556
int pcmk__output_fencing_params(pcmk__output_t *out, const char *name, const char *desc_short, const char *desc_long, bool all)
Definition options.c:1493
#define PCMK_META_PRIORITY
Definition options.h:101
#define PCMK_VALUE_UTILIZATION
Definition options.h:222
#define PCMK_VALUE_BOOLEAN
Definition options.h:137
#define PCMK_VALUE_PANIC
Definition options.h:191
#define PCMK_OPT_NODE_ACTION_LIMIT
Definition options.h:48
#define PCMK_VALUE_MINIMAL
Definition options.h:174
#define PCMK_VALUE_DYNAMIC_LIST
Definition options.h:150
#define PCMK_OPT_STOP_ALL_RESOURCES
Definition options.h:70
#define PCMK_VALUE_FENCE_LEGACY
Definition options.h:228
#define PCMK_OPT_CLUSTER_RECHECK_INTERVAL
Definition options.h:32
#define PCMK_VALUE_TIMEOUT
Definition options.h:218
#define PCMK_OPT_PE_WARN_SERIES_MAX
Definition options.h:57
#define PCMK_VALUE_STOP_UNEXPECTED
Definition options.h:216
#define PCMK_OPT_NODE_HEALTH_YELLOW
Definition options.h:53
#define PCMK_OPT_SYMMETRIC_CLUSTER
Definition options.h:73
#define PCMK_OPT_LOAD_THRESHOLD
Definition options.h:44
#define PCMK_META_RESOURCE_STICKINESS
Definition options.h:112
#define PCMK_VALUE_STATIC_LIST
Definition options.h:210
#define PCMK_OPT_JOIN_INTEGRATION_TIMEOUT
Definition options.h:43
#define PCMK_OPT_NODE_HEALTH_RED
Definition options.h:51
#define PCMK_META_MIGRATION_THRESHOLD
Definition options.h:96
#define PCMK_VALUE_PORT
Definition options.h:196
#define PCMK_OPT_ENABLE_ACL
Definition options.h:37
#define PCMK_META_REQUIRES
Definition options.h:111
#define PCMK_OPT_NODE_PENDING_TIMEOUT
Definition options.h:54
#define PCMK_OPT_STARTUP_FENCING
Definition options.h:64
#define PCMK_VALUE_INTEGER
Definition options.h:166
#define PCMK_OPT_STOP_ORPHAN_RESOURCES
Definition options.h:72
#define PCMK_OPT_SHUTDOWN_LOCK_LIMIT
Definition options.h:62
#define PCMK_OPT_MAINTENANCE_MODE
Definition options.h:45
#define PCMK_META_CONTAINER_ATTRIBUTE_TARGET
Definition options.h:86
#define PCMK_VALUE_STOP_START
Definition options.h:215
#define PCMK_OPT_STOP_ORPHAN_ACTIONS
Definition options.h:71
#define PCMK_OPT_CLUSTER_INFRASTRUCTURE
Definition options.h:29
#define PCMK_OPT_BATCH_LIMIT
Definition options.h:27
#define PCMK_OPT_NO_QUORUM_POLICY
Definition options.h:47
#define PCMK_VALUE_FENCING
Definition options.h:156
#define PCMK_META_CRITICAL
Definition options.h:87
#define PCMK_OPT_PRIORITY_FENCING_DELAY
Definition options.h:59
#define PCMK_OPT_NODE_HEALTH_GREEN
Definition options.h:50
#define PCMK_OPT_PE_ERROR_SERIES_MAX
Definition options.h:55
#define PCMK_VALUE_TRUE
Definition options.h:219
#define PCMK_VALUE_BALANCED
Definition options.h:135
#define PCMK_META_REMOTE_CONNECT_TIMEOUT
Definition options.h:108
#define PCMK_VALUE_SELECT
Definition options.h:207
#define PCMK_OPT_STONITH_MAX_ATTEMPTS
Definition options.h:67
#define PCMK_VALUE_SCORE
Definition options.h:206
#define PCMK_VALUE_DEMOTE
Definition options.h:147
#define PCMK_OPT_FENCE_REACTION
Definition options.h:39
#define PCMK_VALUE_STATUS
Definition options.h:211
#define PCMK_VALUE_ONLY_GREEN
Definition options.h:188
#define PCMK_OPT_CLUSTER_DELAY
Definition options.h:28
#define PCMK_META_FAILURE_TIMEOUT
Definition options.h:89
#define PCMK_OPT_FENCE_REMOTE_WITHOUT_QUORUM
Definition options.h:40
#define PCMK_OPT_TRANSITION_DELAY
Definition options.h:74
#define PCMK_VALUE_CUSTOM
Definition options.h:142
#define PCMK_OPT_NODE_HEALTH_STRATEGY
Definition options.h:52
#define PCMK_VALUE_PROGRESSIVE
Definition options.h:197
#define PCMK_META_REMOTE_NODE
Definition options.h:109
#define PCMK_OPT_PE_INPUT_SERIES_MAX
Definition options.h:56
#define PCMK_VALUE_PERCENTAGE
Definition options.h:194
#define PCMK_VALUE_QUORUM
Definition options.h:198
#define PCMK_OPT_HAVE_WATCHDOG
Definition options.h:41
#define PCMK_VALUE_FREEZE
Definition options.h:157
#define PCMK_OPT_CONCURRENT_FENCING
Definition options.h:33
#define PCMK_OPT_START_FAILURE_IS_FATAL
Definition options.h:63
#define PCMK_OPT_PLACEMENT_STRATEGY
Definition options.h:58
#define PCMK_META_IS_MANAGED
Definition options.h:93
#define PCMK_VALUE_NONE
Definition options.h:180
#define PCMK_OPT_STONITH_ENABLED
Definition options.h:66
#define PCMK_OPT_ENABLE_STARTUP_PROBES
Definition options.h:38
#define PCMK_OPT_MIGRATION_LIMIT
Definition options.h:46
#define PCMK_META_ALLOW_MIGRATE
Definition options.h:81
#define PCMK_META_TARGET_ROLE
Definition options.h:114
#define PCMK_OPT_CLUSTER_NAME
Definition options.h:31
#define PCMK_VALUE_IGNORE
Definition options.h:163
#define PCMK_VALUE_FENCE
Definition options.h:155
#define PCMK_VALUE_MIGRATE_ON_RED
Definition options.h:173
#define PCMK_META_ALLOW_UNHEALTHY_NODES
Definition options.h:82
#define PCMK_VALUE_BLOCK
Definition options.h:136
#define PCMK_OPT_SHUTDOWN_ESCALATION
Definition options.h:60
#define PCMK_VALUE_STOP_ONLY
Definition options.h:214
#define PCMK_OPT_JOIN_FINALIZATION_TIMEOUT
Definition options.h:42
#define PCMK_META_REMOTE_PORT
Definition options.h:110
#define PCMK_VALUE_VERSION
Definition options.h:223
#define PCMK_VALUE_NONNEGATIVE_INTEGER
Definition options.h:181
#define PCMK_VALUE_FALSE
Definition options.h:154
#define PCMK_OPT_CLUSTER_IPC_LIMIT
Definition options.h:30
#define PCMK_OPT_STONITH_TIMEOUT
Definition options.h:68
#define PCMK_VALUE_STRING
Definition options.h:212
#define PCMK_VALUE_DEFAULT
Definition options.h:144
#define PCMK_META_REMOTE_ALLOW_MIGRATE
Definition options.h:107
#define PCMK_META_MAINTENANCE
Definition options.h:95
#define PCMK_OPT_DC_VERSION
Definition options.h:35
#define PCMK_VALUE_UNFENCING
Definition options.h:220
#define PCMK_VALUE_INFINITY
Definition options.h:165
#define PCMK_OPT_STONITH_WATCHDOG_TIMEOUT
Definition options.h:69
#define PCMK_OPT_ELECTION_TIMEOUT
Definition options.h:36
#define PCMK_META_REMOTE_ADDR
Definition options.h:106
#define PCMK_OPT_DC_DEADTIME
Definition options.h:34
#define PCMK_OPT_STONITH_ACTION
Definition options.h:65
#define PCMK_VALUE_NOTHING
Definition options.h:183
#define PCMK_META_MULTIPLE_ACTIVE
Definition options.h:97
#define PCMK_OPT_NODE_HEALTH_BASE
Definition options.h:49
#define PCMK_OPT_SHUTDOWN_LOCK
Definition options.h:61
#define PCMK_VALUE_DURATION
Definition options.h:149
#define PCMK_VALUE_STOP
Definition options.h:213
pcmk__opt_flags
@ pcmk__opt_advanced
Advanced use only.
@ pcmk__opt_deprecated
Option is deprecated.
@ pcmk__opt_generated
Generated by Pacemaker.
@ pcmk__opt_controld
In controller metadata.
@ pcmk__opt_fencing
Common fencing resource parameter.
@ pcmk__opt_schedulerd
In scheduler metadata.
@ pcmk__opt_none
No additional information.
@ pcmk__opt_based
In CIB manager metadata.
void pcmk__output_set_legacy_xml(pcmk__output_t *out)
Definition output_xml.c:614
void pcmk__output_free(pcmk__output_t *out)
Definition output.c:30
int pcmk__output_new(pcmk__output_t **out, const char *fmt_name, const char *filename, char **argv)
Definition output.c:113
@ CRM_EX_OK
Success.
Definition results.h:233
_Noreturn crm_exit_t crm_exit(crm_exit_t rc)
Definition results.c:1058
@ pcmk_rc_ok
Definition results.h:159
#define pcmk__assert(expr)
#define PCMK_ROLE_PROMOTED
Definition roles.h:28
#define PCMK_ROLE_STARTED
Definition roles.h:26
#define PCMK_ROLE_STOPPED
Definition roles.h:25
#define PCMK_ROLE_UNPROMOTED
Definition roles.h:27
bool pcmk_str_is_infinity(const char *s)
Definition scores.c:130
bool pcmk_str_is_minus_infinity(const char *s)
Definition scores.c:144
int pcmk_parse_interval_spec(const char *input, guint *result_ms)
Parse milliseconds from a Pacemaker interval specification.
Definition strings.c:452
gboolean crm_is_true(const char *s)
Definition strings.c:490
int crm_str_to_boolean(const char *s, int *ret)
Definition strings.c:498
void pcmk__insert_dup(GHashTable *table, const char *name, const char *value)
Definition strings.c:703
int pcmk__scan_ll(const char *text, long long *result, long long default_value)
Definition strings.c:92
bool pcmk__strcase_any_of(const char *s,...) G_GNUC_NULL_TERMINATED
Definition strings.c:1029
@ pcmk__str_casei
bool(* is_valid)(const char *)
This structure contains everything that makes up a single output formatter.
int(* message)(pcmk__output_t *out, const char *message_id,...)
int int void void(* output_xml)(pcmk__output_t *out, const char *name, const char *buf)
void(* finish)(pcmk__output_t *out, crm_exit_t exit_status, bool print, void **copy_dest)
Wrappers for and extensions to libxml2.
xmlNode * pcmk__xe_first_child(const xmlNode *parent, const char *node_name, const char *attr_n, const char *attr_v)
Definition xml_element.c:43
@ pcmk__xml_fmt_pretty
Include indentation and newlines.
@ pcmk__xml_fmt_text
Include XML text nodes.
void pcmk__xml_free(xmlNode *xml)
Definition xml.c:816
void pcmk__xml_string(const xmlNode *data, uint32_t options, GString *buffer, int depth)
Definition xml_io.c:370
#define PCMK_XE_METADATA
Definition xml_names.h:131
#define PCMK_XE_RESOURCE_AGENT
Definition xml_names.h:173