24 if (cmd ==
'v' || cmd ==
'$') {
26 printf(
"Written by Andrew Beekhof and "
27 "the Pacemaker project contributors\n");
29 }
else if (cmd ==
'!') {
53 N_(
"Pacemaker version on cluster node elected Designated Controller "
55 N_(
"Includes a hash which identifies the exact revision the code was "
56 "built from. Used for diagnostic purposes."),
62 N_(
"The messaging layer on which Pacemaker is currently running"),
63 N_(
"Used for informational and diagnostic purposes."),
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."),
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."),
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\")."),
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."),
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."),
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."),
133 N_(
"If you need to adjust this value, it probably indicates "
134 "the presence of a bug."),
141 N_(
"If you need to adjust this value, it probably indicates "
142 "the presence of a bug."),
149 N_(
"Enabling this option will slow down cluster recovery under all "
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."),
162 N_(
"What to do when the cluster does not have quorum"),
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 "
183 N_(
"Do not lock resources to a cleanly shut down node longer than "
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 "
194 N_(
"Enable Access Control Lists (ACLs) for the CIB"),
201 N_(
"Whether resources can run on any node by default"),
208 N_(
"Whether the cluster should refrain from monitoring, starting, and "
209 "stopping resources"),
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.")
226 N_(
"Whether the cluster should check for active resources during "
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."),
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."),
257 N_(
"Action to send to fence device when a node needs to be fenced"),
264 N_(
"How long to wait for on, off, and reboot fence actions to complete "
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."),
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."),
316 N_(
"How many times fencing can fail before it will no longer be "
317 "immediately re-attempted on a target"),
322#if PCMK__CONCURRENT_FENCING_DEFAULT_TRUE
329 N_(
"Allow performing fencing operations in parallel"),
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."),
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."),
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 "
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.")
388 N_(
"Maximum amount of system load that should be used by cluster "
390 N_(
"The cluster will slow down its recovery process when the amount of "
391 "system resources used (currently CPU) approaches this limit"),
397 N_(
"Maximum number of jobs that can be scheduled per node (defaults to "
405 N_(
"Maximum number of jobs that the cluster may execute in parallel "
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 "
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)"),
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)."),
446 N_(
"Whether the cluster should stop all active resources"),
453 N_(
"Whether to stop resources that were removed from the "
461 N_(
"Whether to cancel recurring actions removed from the "
471 N_(
"The number of scheduler inputs resulting in errors to save"),
472 N_(
"Zero to disable, -1 to store unlimited."),
478 N_(
"The number of scheduler inputs resulting in warnings to save"),
479 N_(
"Zero to disable, -1 to store unlimited."),
485 N_(
"The number of scheduler inputs without errors or warnings to save"),
486 N_(
"Zero to disable, -1 to store unlimited."),
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 "
506 N_(
"Base health score assigned to a node"),
507 N_(
"Only used when \"node-health-strategy\" is set to "
514 N_(
"The score to use for a node health attribute whose value is "
516 N_(
"Only used when \"node-health-strategy\" is set to \"custom\" or "
523 N_(
"The score to use for a node health attribute whose value is "
525 N_(
"Only used when \"node-health-strategy\" is set to \"custom\" or "
532 N_(
"The score to use for a node health attribute whose value is "
534 N_(
"Only used when \"node-health-strategy\" is set to \"custom\" or "
545 N_(
"How the cluster should allocate resources to nodes"),
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."),
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."),
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."),
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\""),
607 N_(
"Enable a delay of no more than the time specified before executing "
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."),
618 N_(
"Enable a base delay for fencing actions and specify base delay "
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."),
633 N_(
"The maximum number of actions can be performed in parallel on this "
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."),
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."),
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."),
662 N_(
"The maximum number of times to try the 'reboot' command within the "
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."),
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."),
683 N_(
"Specify an alternate timeout to use for 'off' actions instead of "
685 N_(
"Some devices need much more/less time to complete than normal. "
686 "Use this to specify an alternate, device-specific, timeout for "
693 N_(
"The maximum number of times to try the 'off' command within the "
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."),
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."),
714 N_(
"Specify an alternate timeout to use for 'on' actions instead of "
716 N_(
"Some devices need much more/less time to complete than normal. "
717 "Use this to specify an alternate, device-specific, timeout for "
724 N_(
"The maximum number of times to try the 'on' command within the "
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."),
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."),
745 N_(
"Specify an alternate timeout to use for 'list' actions instead of "
747 N_(
"Some devices need much more/less time to complete than normal. "
748 "Use this to specify an alternate, device-specific, timeout for "
755 N_(
"The maximum number of times to try the 'list' command within the "
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."),
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."),
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."),
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."),
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."),
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."),
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."),
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 "
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."),
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\"."),
872 N_(
"Whether the cluster is allowed to actively change the resource's "
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."),
884 N_(
"If true, the cluster will not schedule any actions involving the "
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."),
896 N_(
"Score to add to the current node when a resource is already "
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 "
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 "
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 "
927 "otherwise, \"quorum\"."),
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."),
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."),
961 N_(
"What to do if the cluster finds the resource active on more than "
963 N_(
"What to do if the cluster finds the resource active on more than "
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.)"),
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 "
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"),
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)."),
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 "
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 "
1035 "The default is the value of the remote-node meta-attribute."),
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."),
1051 N_(
"If remote-node is specified, how long before a pending Pacemaker "
1052 "Remote guest connection times out."),
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)."),
1087 const char *
const prefixes[] = {
"PCMK_",
"HA_"};
1089 const char *value = NULL;
1091 CRM_CHECK(!pcmk__str_empty(option),
return NULL);
1094 int rv = snprintf(env_name,
NAME_MAX,
"%s%s", prefixes[i], option);
1097 crm_err(
"Failed to write %s%s to buffer: %s", prefixes[i], option,
1102 if (rv >=
sizeof(env_name)) {
1103 crm_trace(
"\"%s%s\" is too long", prefixes[i], option);
1107 value = getenv(env_name);
1108 if (value != NULL) {
1109 crm_trace(
"Found %s = %s", env_name, value);
1114 crm_trace(
"Nothing found for %s", option);
1138 const char *
const prefixes[] = {
"PCMK_",
"HA_"};
1141 CRM_CHECK(!pcmk__str_empty(option) && (strchr(option,
'=') == NULL),
1145 int rv = snprintf(env_name,
NAME_MAX,
"%s%s", prefixes[i], option);
1148 crm_err(
"Failed to write %s%s to buffer: %s", prefixes[i], option,
1153 if (rv >=
sizeof(env_name)) {
1154 crm_trace(
"\"%s%s\" is too long", prefixes[i], option);
1158 if (value != NULL) {
1159 crm_trace(
"Setting %s to %s", env_name, value);
1160 rv = setenv(env_name, value, 1);
1163 rv = unsetenv(env_name);
1167 crm_err(
"Failed to %sset %s: %s", (value != NULL)?
"" :
"un",
1168 env_name, strerror(errno));
1171 if (!compat && (value != NULL)) {
1196 return (value != NULL)
1198 || ((daemon != NULL) && (strstr(value, daemon) != NULL)));
1248 return (value != NULL)
1268 long long num = 0LL;
1311 float number = strtof(value, &end);
1313 return ((end == NULL) || (end[0] ==
'%')) && (number >= 0);
1345 const char *value = NULL;
1349 if (table != NULL) {
1350 value = g_hash_table_lookup(table, option->
name);
1352 if ((value == NULL) && (option->
alt_name != NULL)) {
1353 value = g_hash_table_lookup(table, option->
alt_name);
1354 if (value != NULL) {
1356 "option '%s' is deprecated and will be "
1357 "removed in a future release",
1365 if ((value != NULL) && (option->
is_valid != NULL)
1369 "because '%s' is invalid", option->
name, value);
1373 if (value != NULL) {
1381 if (value == NULL) {
1382 crm_trace(
"No value or default provided for cluster option '%s'",
1388 crm_err(
"Bug: default value for cluster option '%s' is invalid",
1392 crm_trace(
"Using default value '%s' for cluster option '%s'",
1393 value, option->
name);
1394 if (table != NULL) {
1413 option->
name != NULL; option++) {
1416 return cluster_option_value(options, option);
1444 const char *desc_short,
const char *desc_long,
1445 uint32_t filter,
bool all)
1447 return out->
message(out,
"option-list",
name, desc_short, desc_long, filter,
1448 cluster_options, all);
1467 const char *desc_short,
const char *desc_long,
1470 return out->
message(out,
"option-list",
name, desc_short, desc_long,
1494 const char *desc_short,
const char *desc_long,
1497 return out->
message(out,
"option-list",
name, desc_short, desc_long,
1516 const char *desc_short,
const char *desc_long,
1521 xmlNode *top = NULL;
1522 const xmlNode *metadata = NULL;
1523 GString *metadata_s = NULL;
1537 (uint32_t) filter,
true);
1543 metadata_s = g_string_sized_new(16384);
1551 g_string_free(metadata_s, TRUE);
1559 option->
name != NULL; option++) {
1561 cluster_option_value(options, option);
#define PCMK_ACTION_STATUS
#define PCMK_ACTION_REBOOT
#define PCMK_ACTION_MONITOR
bool pcmk__is_fencing_action(const char *action)
#define PCMK_STONITH_HOST_LIST
#define PCMK_STONITH_HOST_ARGUMENT
#define PCMK_STONITH_HOST_MAP
#define PCMK_STONITH_DELAY_BASE
#define PCMK_STONITH_ACTION_LIMIT
#define PCMK_STONITH_HOST_CHECK
#define PCMK_STONITH_DELAY_MAX
#define PACEMAKER_VERSION
bool pcmk__validate_health_strategy(const char *value)
#define CRM_CHECK(expr, failure_action)
#define crm_err(fmt, args...)
#define crm_trace(fmt, args...)
#define pcmk__config_warn(fmt...)
#define pcmk__config_err(fmt...)
bool pcmk__valid_positive_int(const char *value)
void pcmk__cli_help(char cmd)
const char * pcmk__cluster_option(GHashTable *options, const char *name)
int pcmk__output_primitive_meta(pcmk__output_t *out, const char *name, const char *desc_short, const char *desc_long, bool all)
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)
bool pcmk__valid_no_quorum_policy(const char *value)
bool pcmk__valid_interval_spec(const char *value)
bool pcmk__valid_boolean(const char *value)
void pcmk__set_env_option(const char *option, const char *value, bool compat)
Set or unset a Pacemaker environment variable option.
bool pcmk__valid_placement_strategy(const char *value)
int pcmk__daemon_metadata(pcmk__output_t *out, const char *name, const char *desc_short, const char *desc_long, enum pcmk__opt_flags filter)
bool pcmk__env_option_enabled(const char *daemon, const char *option)
bool pcmk__valid_percentage(const char *value)
bool pcmk__valid_int(const char *value)
const char * pcmk__env_option(const char *option)
void pcmk__validate_cluster_options(GHashTable *options)
int pcmk__output_fencing_params(pcmk__output_t *out, const char *name, const char *desc_short, const char *desc_long, bool all)
#define PCMK_META_PRIORITY
#define PCMK_VALUE_UTILIZATION
#define PCMK_VALUE_BOOLEAN
#define PCMK_OPT_NODE_ACTION_LIMIT
#define PCMK_VALUE_MINIMAL
#define PCMK_VALUE_DYNAMIC_LIST
#define PCMK_OPT_STOP_ALL_RESOURCES
#define PCMK_VALUE_FENCE_LEGACY
#define PCMK_OPT_CLUSTER_RECHECK_INTERVAL
#define PCMK_VALUE_TIMEOUT
#define PCMK_OPT_PE_WARN_SERIES_MAX
#define PCMK_VALUE_STOP_UNEXPECTED
#define PCMK_OPT_NODE_HEALTH_YELLOW
#define PCMK_OPT_SYMMETRIC_CLUSTER
#define PCMK_OPT_LOAD_THRESHOLD
#define PCMK_META_RESOURCE_STICKINESS
#define PCMK_VALUE_STATIC_LIST
#define PCMK_OPT_JOIN_INTEGRATION_TIMEOUT
#define PCMK_OPT_NODE_HEALTH_RED
#define PCMK_META_MIGRATION_THRESHOLD
#define PCMK_OPT_ENABLE_ACL
#define PCMK_META_REQUIRES
#define PCMK_OPT_NODE_PENDING_TIMEOUT
#define PCMK_OPT_STARTUP_FENCING
#define PCMK_VALUE_INTEGER
#define PCMK_OPT_STOP_ORPHAN_RESOURCES
#define PCMK_OPT_SHUTDOWN_LOCK_LIMIT
#define PCMK_OPT_MAINTENANCE_MODE
#define PCMK_META_CONTAINER_ATTRIBUTE_TARGET
#define PCMK_VALUE_STOP_START
#define PCMK_OPT_STOP_ORPHAN_ACTIONS
#define PCMK_OPT_CLUSTER_INFRASTRUCTURE
#define PCMK_OPT_BATCH_LIMIT
#define PCMK_OPT_NO_QUORUM_POLICY
#define PCMK_VALUE_FENCING
#define PCMK_META_CRITICAL
#define PCMK_OPT_PRIORITY_FENCING_DELAY
#define PCMK_OPT_NODE_HEALTH_GREEN
#define PCMK_OPT_PE_ERROR_SERIES_MAX
#define PCMK_VALUE_BALANCED
#define PCMK_META_REMOTE_CONNECT_TIMEOUT
#define PCMK_VALUE_SELECT
#define PCMK_OPT_STONITH_MAX_ATTEMPTS
#define PCMK_VALUE_DEMOTE
#define PCMK_OPT_FENCE_REACTION
#define PCMK_VALUE_STATUS
#define PCMK_VALUE_ONLY_GREEN
#define PCMK_OPT_CLUSTER_DELAY
#define PCMK_META_FAILURE_TIMEOUT
#define PCMK_OPT_FENCE_REMOTE_WITHOUT_QUORUM
#define PCMK_OPT_TRANSITION_DELAY
#define PCMK_VALUE_CUSTOM
#define PCMK_OPT_NODE_HEALTH_STRATEGY
#define PCMK_VALUE_PROGRESSIVE
#define PCMK_META_REMOTE_NODE
#define PCMK_OPT_PE_INPUT_SERIES_MAX
#define PCMK_VALUE_PERCENTAGE
#define PCMK_VALUE_QUORUM
#define PCMK_OPT_HAVE_WATCHDOG
#define PCMK_VALUE_FREEZE
#define PCMK_OPT_CONCURRENT_FENCING
#define PCMK_OPT_START_FAILURE_IS_FATAL
#define PCMK_OPT_PLACEMENT_STRATEGY
#define PCMK_META_IS_MANAGED
#define PCMK_OPT_STONITH_ENABLED
#define PCMK_OPT_ENABLE_STARTUP_PROBES
#define PCMK_OPT_MIGRATION_LIMIT
#define PCMK_META_ALLOW_MIGRATE
#define PCMK_META_TARGET_ROLE
#define PCMK_OPT_CLUSTER_NAME
#define PCMK_VALUE_IGNORE
#define PCMK_VALUE_MIGRATE_ON_RED
#define PCMK_META_ALLOW_UNHEALTHY_NODES
#define PCMK_OPT_SHUTDOWN_ESCALATION
#define PCMK_VALUE_STOP_ONLY
#define PCMK_OPT_JOIN_FINALIZATION_TIMEOUT
#define PCMK_META_REMOTE_PORT
#define PCMK_VALUE_VERSION
#define PCMK_VALUE_NONNEGATIVE_INTEGER
#define PCMK_OPT_CLUSTER_IPC_LIMIT
#define PCMK_OPT_STONITH_TIMEOUT
#define PCMK_VALUE_STRING
#define PCMK_VALUE_DEFAULT
#define PCMK_META_REMOTE_ALLOW_MIGRATE
#define PCMK_META_MAINTENANCE
#define PCMK_OPT_DC_VERSION
#define PCMK_VALUE_UNFENCING
#define PCMK_VALUE_INFINITY
#define PCMK_OPT_STONITH_WATCHDOG_TIMEOUT
#define PCMK_OPT_ELECTION_TIMEOUT
#define PCMK_META_REMOTE_ADDR
#define PCMK_OPT_DC_DEADTIME
#define PCMK_OPT_STONITH_ACTION
#define PCMK_VALUE_NOTHING
#define PCMK_META_MULTIPLE_ACTIVE
#define PCMK_OPT_NODE_HEALTH_BASE
#define PCMK_OPT_SHUTDOWN_LOCK
#define PCMK_VALUE_DURATION
@ 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)
void pcmk__output_free(pcmk__output_t *out)
int pcmk__output_new(pcmk__output_t **out, const char *fmt_name, const char *filename, char **argv)
_Noreturn crm_exit_t crm_exit(crm_exit_t rc)
#define pcmk__assert(expr)
#define PCMK_ROLE_PROMOTED
#define PCMK_ROLE_STARTED
#define PCMK_ROLE_STOPPED
#define PCMK_ROLE_UNPROMOTED
bool pcmk_str_is_infinity(const char *s)
bool pcmk_str_is_minus_infinity(const char *s)
int pcmk_parse_interval_spec(const char *input, guint *result_ms)
Parse milliseconds from a Pacemaker interval specification.
gboolean crm_is_true(const char *s)
int crm_str_to_boolean(const char *s, int *ret)
void pcmk__insert_dup(GHashTable *table, const char *name, const char *value)
int pcmk__scan_ll(const char *text, long long *result, long long default_value)
bool pcmk__strcase_any_of(const char *s,...) G_GNUC_NULL_TERMINATED
bool(* is_valid)(const char *)
const char * default_value
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)
@ pcmk__xml_fmt_pretty
Include indentation and newlines.
@ pcmk__xml_fmt_text
Include XML text nodes.
void pcmk__xml_free(xmlNode *xml)
void pcmk__xml_string(const xmlNode *data, uint32_t options, GString *buffer, int depth)
#define PCMK_XE_RESOURCE_AGENT