19 #include <sys/types.h> 28 if (cmd ==
'v' || cmd ==
'$') {
30 printf(
"Written by Andrew Beekhof and " 31 "the Pacemaker project contributors\n");
33 }
else if (cmd ==
'!') {
57 N_(
"Pacemaker version on cluster node elected Designated Controller " 59 N_(
"Includes a hash which identifies the exact revision the code was " 60 "built from. Used for diagnostic purposes."),
66 N_(
"The messaging layer on which Pacemaker is currently running"),
67 N_(
"Used for informational and diagnostic purposes."),
73 N_(
"An arbitrary name for the cluster"),
74 N_(
"This optional value is mostly for users' convenience as desired " 75 "in administration, but may also be used in Pacemaker " 76 "configuration rules via the #cluster-name node attribute, and " 77 "by higher-level tools and resource agents."),
83 N_(
"How long to wait for a response from other nodes during start-up"),
84 N_(
"The optimal value will depend on the speed and load of your " 85 "network and the type of switches used."),
91 N_(
"Polling interval to recheck cluster state and evaluate rules " 92 "with date specifications"),
93 N_(
"Pacemaker is primarily event-driven, and looks ahead to know when " 94 "to recheck cluster state for failure-timeout settings and most " 95 "time-based rules. However, it will also recheck the cluster after " 96 "this amount of inactivity, to evaluate rules with date " 97 "specifications and serve as a fail-safe for certain types of " 98 "scheduler bugs. A value of 0 disables polling. A positive value " 99 "sets an interval in seconds, unless other units are specified " 100 "(for example, \"5min\")."),
107 N_(
"How a cluster node should react if notified of its own fencing"),
108 N_(
"A cluster node may receive notification of a \"succeeded\" " 109 "fencing that targeted it if fencing is misconfigured, or if " 110 "fabric fencing is in use that doesn't cut cluster communication. " 111 "Use \"stop\" to attempt to immediately stop Pacemaker and stay " 112 "stopped, or \"panic\" to attempt to immediately reboot the local " 113 "node, falling back to stop on failure."),
119 N_(
"Declare an election failed if it is not decided within this much " 120 "time. If you need to adjust this value, it probably indicates " 121 "the presence of a bug."),
128 N_(
"Exit immediately if shutdown does not complete within this much " 129 "time. If you need to adjust this value, it probably indicates " 130 "the presence of a bug."),
138 N_(
"If you need to adjust this value, it probably indicates " 139 "the presence of a bug."),
147 N_(
"If you need to adjust this value, it probably indicates " 148 "the presence of a bug."),
156 N_(
"Enabling this option will slow down cluster recovery under all " 158 N_(
"Delay cluster recovery for this much time to allow for additional " 159 "events to occur. Useful if your configuration is sensitive to " 160 "the order in which ping updates arrive."),
168 N_(
"What to do when the cluster does not have quorum"),
175 N_(
"Whether to lock resources to a cleanly shut down node"),
176 N_(
"When true, resources active on a node when it is cleanly shut down " 177 "are kept \"locked\" to that node (not allowed to run elsewhere) " 178 "until they start again on that node after it rejoins (or for at " 179 "most shutdown-lock-limit, if set). Stonith resources and " 180 "Pacemaker Remote connections are never locked. Clone and bundle " 181 "instances and the promoted role of promotable clones are " 182 "currently never locked, though support could be added in a future " 189 N_(
"Do not lock resources to a cleanly shut down node longer than " 191 N_(
"If shutdown-lock is true and this is set to a nonzero time " 192 "duration, shutdown locks will expire after this much time has " 193 "passed since the shutdown was initiated, even if the node has not " 200 N_(
"Enable Access Control Lists (ACLs) for the CIB"),
207 N_(
"Whether resources can run on any node by default"),
214 N_(
"Whether the cluster should refrain from monitoring, starting, and " 215 "stopping resources"),
222 N_(
"Whether a start failure should prevent a resource from being " 223 "recovered on the same node"),
224 N_(
"When true, the cluster will immediately ban a resource from a node " 225 "if it fails to start there. When false, the cluster will instead " 226 "check the resource's fail count against its migration-threshold.")
232 N_(
"Whether the cluster should check for active resources during " 242 N_(
"Whether nodes may be fenced as part of recovery"),
243 N_(
"If false, unresponsive nodes are immediately assumed to be " 244 "harmless, and resources that were active on them may be recovered " 245 "elsewhere. This can result in a \"split-brain\" situation, " 246 "potentially leading to data loss and/or service unavailability."),
253 N_(
"Action to send to fence device when a node needs to be fenced " 254 "(\"poweroff\" is a deprecated alias for \"off\")"),
261 N_(
"How long to wait for on, off, and reboot fence actions to complete " 269 N_(
"Whether watchdog integration is enabled"),
270 N_(
"This is set automatically by the cluster according to whether SBD " 271 "is detected to be in use. User-configured values are ignored. " 272 "The value `true` is meaningful if diskless SBD is used and " 273 "`stonith-watchdog-timeout` is nonzero. In that case, if fencing " 274 "is required, watchdog-based self-fencing will be performed via " 275 "SBD without requiring a fencing resource explicitly configured."),
291 N_(
"How long before nodes can be assumed to be safely down when " 292 "watchdog-based self-fencing via SBD is in use"),
293 N_(
"If this is set to a positive value, lost nodes are assumed to " 294 "achieve self-fencing using watchdog-based SBD within this much " 295 "time. This does not require a fencing resource to be explicitly " 296 "configured, though a fence_watchdog resource can be configured, to " 297 "limit use to specific nodes. If this is set to 0 (the default), " 298 "the cluster will never assume watchdog-based self-fencing. If this " 299 "is set to a negative value, the cluster will use twice the local " 300 "value of the `SBD_WATCHDOG_TIMEOUT` environment variable if that " 301 "is positive, or otherwise treat this as 0. WARNING: When used, " 302 "this timeout must be larger than `SBD_WATCHDOG_TIMEOUT` on all " 303 "nodes that use watchdog-based SBD, and Pacemaker will refuse to " 304 "start on any of those nodes where this is not true for the local " 305 "value or SBD is not active. When this is set to a negative value, " 306 "`SBD_WATCHDOG_TIMEOUT` must be set to the same value on all nodes " 307 "that use SBD, otherwise data corruption or loss could occur."),
313 N_(
"How many times fencing can fail before it will no longer be " 314 "immediately re-attempted on a target"),
321 N_(
"Allow performing fencing operations in parallel"),
328 N_(
"Whether to fence unseen nodes at start-up"),
329 N_(
"Setting this to false may lead to a \"split-brain\" situation, " 330 "potentially leading to data loss and/or service unavailability."),
336 N_(
"Apply fencing delay targeting the lost nodes with the highest " 337 "total resource priority"),
338 N_(
"Apply specified delay for the fencings that are targeting the lost " 339 "nodes with the highest total resource priority in case we don't " 340 "have the majority of the nodes in our cluster partition, so that " 341 "the more significant nodes potentially win any fencing match, " 342 "which is especially meaningful under split-brain of 2-node " 343 "cluster. A promoted resource instance takes the base priority + 1 " 344 "on calculation if the base priority is not 0. Any static/random " 345 "delays that are introduced by `pcmk_delay_base/max` configured " 346 "for the corresponding fencing resources will be added to this " 347 "delay. This delay should be significantly greater than, safely " 348 "twice, the maximum `pcmk_delay_base/max`. By default, priority " 349 "fencing delay is disabled."),
355 N_(
"How long to wait for a node that has joined the cluster to join " 356 "the controller process group"),
357 N_(
"Fence nodes that do not join the controller process group within " 358 "this much time after joining the cluster, to allow the cluster " 359 "to continue managing resources. A value of 0 means never fence " 360 "pending nodes. Setting the value to 2h means fence nodes after " 367 N_(
"Maximum time for node-to-node communication"),
368 N_(
"The node elected Designated Controller (DC) will consider an action " 369 "failed if it does not get a response from the node executing the " 370 "action within this time (after considering the action's own " 371 "timeout). The \"correct\" value will depend on the speed and " 372 "load of your network and cluster nodes.")
380 N_(
"Maximum amount of system load that should be used by cluster " 382 N_(
"The cluster will slow down its recovery process when the amount of " 383 "system resources used (currently CPU) approaches this limit"),
389 N_(
"Maximum number of jobs that can be scheduled per node (defaults to " 397 N_(
"Maximum number of jobs that the cluster may execute in parallel " 399 N_(
"The \"correct\" value will depend on the speed and load of your " 400 "network and cluster nodes. If set to 0, the cluster will " 401 "impose a dynamically calculated limit when any node has a " 408 N_(
"The number of live migration actions that the cluster is allowed " 409 "to execute in parallel on a node (-1 means no limit)"),
427 N_(
"Maximum IPC message backlog before disconnecting a cluster daemon"),
428 N_(
"Raise this if log has \"Evicting client\" messages for cluster " 429 "daemon PIDs (a good value is the number of resources in the " 430 "cluster multiplied by the number of nodes)."),
438 N_(
"Whether the cluster should stop all active resources"),
445 N_(
"Whether to stop resources that were removed from the " 453 N_(
"Whether to cancel recurring actions removed from the " 461 N_(
"Whether to remove stopped resources from the executor"),
462 N_(
"Values other than default are poorly tested and potentially " 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_(
"An alternate parameter to supply instead of 'port'"),
564 N_(
"Some devices do not support the standard 'port' parameter or may " 565 "provide additional ones. Use this to specify an alternate, device-" 566 "specific, parameter that should indicate the machine to be " 567 "fenced. A value of \"none\" can be used to tell the cluster not " 568 "to supply any additional parameters."),
574 N_(
"A mapping of node names to port numbers for devices that do not " 575 "support node names."),
576 N_(
"For example, \"node1:1;node2:2,3\" would tell the cluster to use " 577 "port 1 for node1 and ports 2 and 3 for node2."),
583 N_(
"Nodes targeted by this device"),
584 N_(
"Comma-separated list of nodes that can be targeted by this device " 585 "(for example, \"node1,node2,node3\"). If pcmk_host_check is " 586 "\"static-list\", either this or pcmk_host_map must be set."),
594 N_(
"How to determine which nodes can be targeted by the device"),
595 N_(
"Use \"dynamic-list\" to query the device via the 'list' command; " 596 "\"static-list\" to check the pcmk_host_list attribute; " 597 "\"status\" to query the device via the 'status' command; or " 598 "\"none\" to assume every device can fence every node. " 599 "The default value is \"static-list\" if pcmk_host_map or " 600 "pcmk_host_list is set; otherwise \"dynamic-list\" if the device " 601 "supports the list operation; otherwise \"status\" if the device " 602 "supports the status operation; otherwise \"none\""),
608 N_(
"Enable a delay of no more than the time specified before executing " 610 N_(
"Enable a delay of no more than the time specified before executing " 611 "fencing actions. Pacemaker derives the overall delay by taking " 612 "the value of pcmk_delay_base and adding a random delay value such " 613 "that the sum is kept below this maximum."),
619 N_(
"Enable a base delay for fencing actions and specify base delay " 621 N_(
"This enables a static delay for fencing actions, which can help " 622 "avoid \"death matches\" where two nodes try to fence each other " 623 "at the same time. If pcmk_delay_max is also used, a random delay " 624 "will be added such that the total delay is kept below that value. " 625 "This can be set to a single time value to apply to any node " 626 "targeted by this device (useful if a separate device is " 627 "configured for each target), or to a node map (for example, " 628 "\"node1:1s;node2:5\") to set a different value for each target."),
634 N_(
"The maximum number of actions can be performed in parallel on this " 636 N_(
"Cluster property concurrent-fencing=\"true\" needs to be " 637 "configured first. Then use this to specify the maximum number of " 638 "actions can be performed in parallel on this device. A value of " 639 "-1 means an unlimited number of actions can be performed in " 646 N_(
"An alternate command to run instead of 'reboot'"),
647 N_(
"Some devices do not support the standard commands or may provide " 648 "additional ones. Use this to specify an alternate, device-" 649 "specific, command that implements the 'reboot' action."),
655 N_(
"Specify an alternate timeout to use for 'reboot' actions instead " 656 "of stonith-timeout"),
657 N_(
"Some devices need much more/less time to complete than normal. " 658 "Use this to specify an alternate, device-specific, timeout for " 659 "'reboot' actions."),
665 N_(
"The maximum number of times to try the 'reboot' command within the " 667 N_(
"Some devices do not support multiple connections. Operations may " 668 "\"fail\" if the device is busy with another task. In that case, " 669 "Pacemaker will automatically retry the operation if there is time " 670 "remaining. Use this option to alter the number of times Pacemaker " 671 "tries a 'reboot' action before giving up."),
677 N_(
"An alternate command to run instead of 'off'"),
678 N_(
"Some devices do not support the standard commands or may provide " 679 "additional ones. Use this to specify an alternate, device-" 680 "specific, command that implements the 'off' action."),
686 N_(
"Specify an alternate timeout to use for 'off' actions instead of " 688 N_(
"Some devices need much more/less time to complete than normal. " 689 "Use this to specify an alternate, device-specific, timeout for " 696 N_(
"The maximum number of times to try the 'off' command within the " 698 N_(
"Some devices do not support multiple connections. Operations may " 699 "\"fail\" if the device is busy with another task. In that case, " 700 "Pacemaker will automatically retry the operation if there is time " 701 "remaining. Use this option to alter the number of times Pacemaker " 702 "tries a 'off' action before giving up."),
708 N_(
"An alternate command to run instead of 'on'"),
709 N_(
"Some devices do not support the standard commands or may provide " 710 "additional ones. Use this to specify an alternate, device-" 711 "specific, command that implements the 'on' action."),
717 N_(
"Specify an alternate timeout to use for 'on' actions instead of " 719 N_(
"Some devices need much more/less time to complete than normal. " 720 "Use this to specify an alternate, device-specific, timeout for " 727 N_(
"The maximum number of times to try the 'on' command within the " 729 N_(
"Some devices do not support multiple connections. Operations may " 730 "\"fail\" if the device is busy with another task. In that case, " 731 "Pacemaker will automatically retry the operation if there is time " 732 "remaining. Use this option to alter the number of times Pacemaker " 733 "tries a 'on' action before giving up."),
739 N_(
"An alternate command to run instead of 'list'"),
740 N_(
"Some devices do not support the standard commands or may provide " 741 "additional ones. Use this to specify an alternate, device-" 742 "specific, command that implements the 'list' action."),
748 N_(
"Specify an alternate timeout to use for 'list' actions instead of " 750 N_(
"Some devices need much more/less time to complete than normal. " 751 "Use this to specify an alternate, device-specific, timeout for " 758 N_(
"The maximum number of times to try the 'list' command within the " 760 N_(
"Some devices do not support multiple connections. Operations may " 761 "\"fail\" if the device is busy with another task. In that case, " 762 "Pacemaker will automatically retry the operation if there is time " 763 "remaining. Use this option to alter the number of times Pacemaker " 764 "tries a 'list' action before giving up."),
770 N_(
"An alternate command to run instead of 'monitor'"),
771 N_(
"Some devices do not support the standard commands or may provide " 772 "additional ones. Use this to specify an alternate, device-" 773 "specific, command that implements the 'monitor' action."),
779 N_(
"Specify an alternate timeout to use for 'monitor' actions instead " 780 "of stonith-timeout"),
781 N_(
"Some devices need much more/less time to complete than normal. " 782 "Use this to specify an alternate, device-specific, timeout for " 783 "'monitor' actions."),
789 N_(
"The maximum number of times to try the 'monitor' command within " 790 "the timeout period"),
791 N_(
"Some devices do not support multiple connections. Operations may " 792 "\"fail\" if the device is busy with another task. In that case, " 793 "Pacemaker will automatically retry the operation if there is time " 794 "remaining. Use this option to alter the number of times Pacemaker " 795 "tries a 'monitor' action before giving up."),
801 N_(
"An alternate command to run instead of 'status'"),
802 N_(
"Some devices do not support the standard commands or may provide " 803 "additional ones. Use this to specify an alternate, device-" 804 "specific, command that implements the 'status' action."),
810 N_(
"Specify an alternate timeout to use for 'status' actions instead " 811 "of stonith-timeout"),
812 N_(
"Some devices need much more/less time to complete than normal. " 813 "Use this to specify an alternate, device-specific, timeout for " 814 "'status' actions."),
820 N_(
"The maximum number of times to try the 'status' command within " 821 "the timeout period"),
822 N_(
"Some devices do not support multiple connections. Operations may " 823 "\"fail\" if the device is busy with another task. In that case, " 824 "Pacemaker will automatically retry the operation if there is time " 825 "remaining. Use this option to alter the number of times Pacemaker " 826 "tries a 'status' action before giving up."),
843 N_(
"Resource assignment priority"),
844 N_(
"If not all resources can be active, the cluster will stop " 845 "lower-priority resources in order to keep higher-priority ones " 852 N_(
"Default value for influence in colocation constraints"),
853 N_(
"Use this value as the default for influence in all colocation " 854 "constraints involving this resource, as well as in the implicit " 855 "colocation constraints created if this resource is in a group."),
863 N_(
"State the cluster should attempt to keep this resource in"),
864 N_(
"\"Stopped\" forces the resource to be stopped. " 865 "\"Started\" allows the resource to be started (and in the case of " 866 "promotable clone resources, promoted if appropriate). " 867 "\"Unpromoted\" allows the resource to be started, but only in the " 868 "unpromoted role if the resource is promotable. " 869 "\"Promoted\" is equivalent to \"Started\"."),
875 N_(
"Whether the cluster is allowed to actively change the resource's " 877 N_(
"If false, the cluster will not start, stop, promote, or demote the " 878 "resource on any node. Recurring actions for the resource are " 879 "unaffected. If true, a true value for the maintenance-mode " 880 "cluster option, the maintenance node attribute, or the " 881 "maintenance resource meta-attribute overrides this."),
887 N_(
"If true, the cluster will not schedule any actions involving the " 889 N_(
"If true, the cluster will not start, stop, promote, or demote the " 890 "resource on any node, and will pause any recurring monitors " 891 "(except those specifying role as \"Stopped\"). If false, a true " 892 "value for the maintenance-mode cluster option or maintenance node " 893 "attribute overrides this."),
899 N_(
"Score to add to the current node when a resource is already " 901 N_(
"Score to add to the current node when a resource is already " 902 "active. This allows running resources to stay where they are, " 903 "even if they would be placed elsewhere if they were being started " 904 "from a stopped state. " 905 "The default is 1 for individual clone instances, and 0 for all " 914 N_(
"Conditions under which the resource can be started"),
915 N_(
"Conditions under which the resource can be started. " 916 "\"nothing\" means the cluster can always start this resource. " 917 "\"quorum\" means the cluster can start this resource only if a " 918 "majority of the configured nodes are active. " 919 "\"fencing\" means the cluster can start this resource only if a " 920 "majority of the configured nodes are active and any failed or " 921 "unknown nodes have been fenced. " 922 "\"unfencing\" means the cluster can start this resource only if " 923 "a majority of the configured nodes are active and any failed or " 924 "unknown nodes have been fenced, and only on nodes that have been " 926 "The default is \"quorum\" for resources with a class of stonith; " 927 "otherwise, \"unfencing\" if unfencing is active in the cluster; " 928 "otherwise, \"fencing\" if the stonith-enabled cluster option is " 930 "otherwise, \"quorum\"."),
936 N_(
"Number of failures on a node before the resource becomes " 937 "ineligible to run there."),
938 N_(
"Number of failures that may occur for this resource on a node, " 939 "before that node is marked ineligible to host this resource. A " 940 "value of 0 indicates that this feature is disabled (the node will " 941 "never be marked ineligible). By contrast, the cluster treats " 942 "\"INFINITY\" (the default) as a very large but finite number. " 943 "This option has an effect only if the failed operation specifies " 944 "its on-fail attribute as \"restart\" (the default), and " 945 "additionally for failed start operations, if the " 946 "start-failure-is-fatal cluster property is set to false."),
952 N_(
"Number of seconds before acting as if a failure had not occurred"),
953 N_(
"Number of seconds after a failed action for this resource before " 954 "acting as if the failure had not occurred, and potentially " 955 "allowing the resource back to the node on which it failed. " 956 "A value of 0 indicates that this feature is disabled."),
964 N_(
"What to do if the cluster finds the resource active on more than " 966 N_(
"What to do if the cluster finds the resource active on more than " 968 "\"block\" means to mark the resource as unmanaged. " 969 "\"stop_only\" means to stop all active instances of this resource " 970 "and leave them stopped. " 971 "\"stop_start\" means to stop all active instances of this " 972 "resource and start the resource in one location only. " 973 "\"stop_unexpected\" means to stop all active instances of this " 974 "resource except where the resource should be active. (This should " 975 "be used only when extra instances are not expected to disrupt " 976 "existing instances, and the resource agent's monitor of an " 977 "existing instance is capable of detecting any problems that could " 978 "be caused. Note that any resources ordered after this one will " 979 "still need to be restarted.)"),
985 N_(
"Whether the cluster should try to \"live migrate\" this resource " 986 "when it needs to be moved"),
987 N_(
"Whether the cluster should try to \"live migrate\" this resource " 988 "when it needs to be moved. " 989 "The default is true for ocf:pacemaker:remote resources, and false " 996 N_(
"Whether the resource should be allowed to run on a node even if " 997 "the node's health score would otherwise prevent it"),
1004 N_(
"Where to check user-defined node attributes"),
1005 N_(
"Whether to check user-defined node attributes on the physical host " 1006 "where a container is running or on the local node. This is " 1007 "usually set for a bundle resource and inherited by the bundle's " 1008 "primitive resource. " 1009 "A value of \"host\" means to check user-defined node attributes " 1010 "on the underlying physical host. Any other value means to check " 1011 "user-defined node attributes on the local node (for a bundled " 1012 "primitive resource, this is the bundle node)."),
1018 N_(
"Name of the Pacemaker Remote guest node this resource is " 1019 "associated with, if any"),
1020 N_(
"Name of the Pacemaker Remote guest node this resource is " 1021 "associated with, if any. If specified, this both enables the " 1022 "resource as a guest node and defines the unique name used to " 1023 "identify the guest node. The guest must be configured to run the " 1024 "Pacemaker Remote daemon when it is started. " 1025 "WARNING: This value cannot overlap with any resource or node " 1032 N_(
"If remote-node is specified, the IP address or hostname used to " 1033 "connect to the guest via Pacemaker Remote"),
1034 N_(
"If remote-node is specified, the IP address or hostname used to " 1035 "connect to the guest via Pacemaker Remote. The Pacemaker Remote " 1036 "daemon on the guest must be configured to accept connections on " 1038 "The default is the value of the remote-node meta-attribute."),
1044 N_(
"If remote-node is specified, port on the guest used for its " 1045 "Pacemaker Remote connection"),
1046 N_(
"If remote-node is specified, the port on the guest used for its " 1047 "Pacemaker Remote connection. The Pacemaker Remote daemon on the " 1048 "guest must be configured to listen on this port."),
1054 N_(
"If remote-node is specified, how long before a pending Pacemaker " 1055 "Remote guest connection times out."),
1062 N_(
"If remote-node is specified, this acts as the allow-migrate " 1063 "meta-attribute for the implicit remote connection resource " 1064 "(ocf:pacemaker:remote)."),
1090 const char *
const prefixes[] = {
"PCMK_",
"HA_"};
1092 const char *value = NULL;
1094 CRM_CHECK(!pcmk__str_empty(option),
return NULL);
1097 int rv = snprintf(env_name,
NAME_MAX,
"%s%s", prefixes[i], option);
1100 crm_err(
"Failed to write %s%s to buffer: %s", prefixes[i], option,
1105 if (rv >=
sizeof(env_name)) {
1106 crm_trace(
"\"%s%s\" is too long", prefixes[i], option);
1110 value = getenv(env_name);
1111 if (value != NULL) {
1112 crm_trace(
"Found %s = %s", env_name, value);
1117 crm_trace(
"Nothing found for %s", option);
1141 const char *
const prefixes[] = {
"PCMK_",
"HA_"};
1144 CRM_CHECK(!pcmk__str_empty(option) && (strchr(option,
'=') == NULL),
1148 int rv = snprintf(env_name,
NAME_MAX,
"%s%s", prefixes[i], option);
1151 crm_err(
"Failed to write %s%s to buffer: %s", prefixes[i], option,
1156 if (rv >=
sizeof(env_name)) {
1157 crm_trace(
"\"%s%s\" is too long", prefixes[i], option);
1161 if (value != NULL) {
1162 crm_trace(
"Setting %s to %s", env_name, value);
1163 rv = setenv(env_name, value, 1);
1166 rv = unsetenv(env_name);
1170 crm_err(
"Failed to %sset %s: %s", (value != NULL)?
"" :
"un",
1171 env_name, strerror(errno));
1174 if (!compat && (value != NULL)) {
1199 return (value != NULL)
1201 || ((daemon != NULL) && (strstr(value, daemon) != NULL)));
1251 return (value != NULL)
1271 long long num = 0LL;
1313 float number = strtof(value, &end);
1315 return ((end == NULL) || (end[0] ==
'%')) && (number >= 0);
1347 const char *value = NULL;
1351 if (table != NULL) {
1352 value = g_hash_table_lookup(table, option->
name);
1354 if ((value == NULL) && (option->
alt_name != NULL)) {
1355 value = g_hash_table_lookup(table, option->
alt_name);
1356 if (value != NULL) {
1358 "option '%s' is deprecated and will be " 1359 "removed in a future release",
1367 if ((value != NULL) && (option->
is_valid != NULL)
1371 "because '%s' is invalid", option->
name, value);
1375 if (value != NULL) {
1383 if (value == NULL) {
1384 crm_trace(
"No value or default provided for cluster option '%s'",
1390 crm_err(
"Bug: default value for cluster option '%s' is invalid",
1394 crm_trace(
"Using default value '%s' for cluster option '%s'",
1395 value, option->
name);
1396 if (table != NULL) {
1415 option->
name != NULL; option++) {
1418 return cluster_option_value(options, option);
1446 const char *desc_short,
const char *desc_long,
1447 uint32_t filter,
bool all)
1449 return out->
message(out,
"option-list",
name, desc_short, desc_long, filter,
1450 cluster_options, all);
1469 const char *desc_short,
const char *desc_long,
1472 return out->
message(out,
"option-list",
name, desc_short, desc_long,
1496 const char *desc_short,
const char *desc_long,
1499 return out->
message(out,
"option-list",
name, desc_short, desc_long,
1518 const char *desc_short,
const char *desc_long,
1523 xmlNode *top = NULL;
1524 const xmlNode *metadata = NULL;
1525 GString *metadata_s = NULL;
1539 (uint32_t) filter,
true);
1545 metadata_s = g_string_sized_new(16384);
1553 g_string_free(metadata_s, TRUE);
1561 option->
name != NULL; option++) {
1563 cluster_option_value(options, option);
#define PCMK_OPT_PE_WARN_SERIES_MAX
#define CRM_CHECK(expr, failure_action)
#define PCMK_VALUE_DYNAMIC_LIST
#define PCMK_VALUE_STOP_UNEXPECTED
#define PCMK_OPT_STONITH_ENABLED
Common fencing resource parameter.
#define PCMK_OPT_NODE_HEALTH_GREEN
#define PCMK_VALUE_STATUS
#define PCMK_STONITH_HOST_CHECK
#define PCMK_META_MIGRATION_THRESHOLD
_Noreturn crm_exit_t crm_exit(crm_exit_t rc)
#define PCMK_META_REQUIRES
#define PCMK_VALUE_INFINITY
bool pcmk__strcase_any_of(const char *s,...) G_GNUC_NULL_TERMINATED
int(* message)(pcmk__output_t *out, const char *message_id,...)
#define PCMK_OPT_CONCURRENT_FENCING
void pcmk__xml_string(const xmlNode *data, uint32_t options, GString *buffer, int depth)
#define pcmk__config_warn(fmt...)
#define PCMK_META_CONTAINER_ATTRIBUTE_TARGET
#define PCMK_VALUE_PERCENTAGE
bool pcmk__valid_interval_spec(const char *value)
#define PCMK_OPT_SHUTDOWN_LOCK
#define PCMK_OPT_NODE_HEALTH_RED
#define PCMK_STONITH_HOST_MAP
#define pcmk__config_err(fmt...)
#define PCMK_VALUE_STOP_START
#define PCMK_ACTION_MONITOR
#define PCMK_VALUE_DEFAULT
#define PCMK_META_MULTIPLE_ACTIVE
#define PCMK_OPT_ENABLE_ACL
#define PCMK_OPT_CLUSTER_NAME
bool(* is_valid)(const char *)
#define PCMK_OPT_FENCE_REACTION
#define PCMK_STONITH_HOST_LIST
const char * default_value
#define PCMK_OPT_CLUSTER_RECHECK_INTERVAL
#define PCMK_OPT_STOP_ORPHAN_ACTIONS
#define PCMK_META_REMOTE_CONNECT_TIMEOUT
#define PCMK_OPT_DC_VERSION
#define PCMK_OPT_STONITH_ACTION
#define PACEMAKER_VERSION
bool pcmk__valid_percentage(const char *value)
Include indentation and newlines.
int pcmk__output_fencing_params(pcmk__output_t *out, const char *name, const char *desc_short, const char *desc_long, bool all)
#define PCMK_OPT_ENABLE_STARTUP_PROBES
#define PCMK_META_REMOTE_ALLOW_MIGRATE
#define PCMK__CONCURRENT_FENCING_DEFAULT
void pcmk__set_env_option(const char *option, const char *value, bool compat)
Set or unset a Pacemaker environment variable option.
#define PCMK_META_IS_MANAGED
#define PCMK_VALUE_TIMEOUT
#define PCMK_META_REMOTE_ADDR
#define PCMK_VALUE_NOTHING
#define PCMK_VALUE_FENCING
#define PCMK_ACTION_STATUS
char int pcmk_parse_interval_spec(const char *input, guint *result_ms)
Parse milliseconds from a Pacemaker interval specification.
#define PCMK_META_ALLOW_UNHEALTHY_NODES
#define PCMK_OPT_PLACEMENT_STRATEGY
#define PCMK_OPT_STONITH_MAX_ATTEMPTS
#define PCMK_ACTION_REBOOT
int pcmk__scan_ll(const char *text, long long *result, long long default_value)
#define PCMK_OPT_BATCH_LIMIT
bool pcmk__valid_no_quorum_policy(const char *value)
#define PCMK_OPT_SHUTDOWN_ESCALATION
#define PCMK_VALUE_MINIMAL
#define PCMK_VALUE_DURATION
bool pcmk__valid_int(const char *value)
#define PCMK_OPT_STOP_ALL_RESOURCES
xmlNode * pcmk__xe_first_child(const xmlNode *parent, const char *node_name, const char *attr_n, const char *attr_v)
#define PCMK_ROLE_STOPPED
bool pcmk__valid_placement_strategy(const char *value)
#define crm_trace(fmt, args...)
#define PCMK_VALUE_ONLY_GREEN
#define PCMK_OPT_DC_DEADTIME
int pcmk__daemon_metadata(pcmk__output_t *out, const char *name, const char *desc_short, const char *desc_long, enum pcmk__opt_flags filter)
#define PCMK_OPT_MAINTENANCE_MODE
#define PCMK_META_REMOTE_NODE
int(*) int(*) void(*) void(* output_xml)(pcmk__output_t *out, const char *name, const char *buf)
#define PCMK_OPT_SHUTDOWN_LOCK_LIMIT
#define PCMK_OPT_CLUSTER_IPC_LIMIT
#define PCMK_META_RESOURCE_STICKINESS
#define PCMK_VALUE_IGNORE
#define PCMK_OPT_PRIORITY_FENCING_DELAY
Wrappers for and extensions to libxml2.
#define PCMK_OPT_TRANSITION_DELAY
#define PCMK_OPT_STARTUP_FENCING
#define PCMK_META_TARGET_ROLE
void(* finish)(pcmk__output_t *out, crm_exit_t exit_status, bool print, void **copy_dest)
#define PCMK_VALUE_BOOLEAN
#define PCMK_VALUE_NONNEGATIVE_INTEGER
No additional information.
int pcmk__output_primitive_meta(pcmk__output_t *out, const char *name, const char *desc_short, const char *desc_long, bool all)
#define PCMK_OPT_CLUSTER_DELAY
#define PCMK__ACTION_POWEROFF
void pcmk__validate_cluster_options(GHashTable *options)
void free_xml(xmlNode *child)
#define PCMK_OPT_NODE_PENDING_TIMEOUT
#define PCMK_VALUE_QUORUM
const char * pcmk__cluster_option(GHashTable *options, const char *name)
bool pcmk_str_is_infinity(const char *s)
#define PCMK_OPT_START_FAILURE_IS_FATAL
#define PCMK_OPT_NODE_ACTION_LIMIT
#define PCMK_STONITH_ACTION_LIMIT
#define PCMK_VALUE_CUSTOM
#define PCMK_OPT_NODE_HEALTH_YELLOW
#define PCMK_VALUE_FENCE_LEGACY
void pcmk__output_free(pcmk__output_t *out)
#define PCMK_OPT_NODE_HEALTH_STRATEGY
#define PCMK_VALUE_SELECT
#define PCMK_OPT_STONITH_TIMEOUT
int crm_str_to_boolean(const char *s, int *ret)
#define PCMK_STONITH_HOST_ARGUMENT
#define PCMK_XE_RESOURCE_AGENT
#define PCMK_META_MAINTENANCE
#define PCMK_VALUE_UTILIZATION
bool pcmk__is_fencing_action(const char *action)
#define PCMK_OPT_NODE_HEALTH_BASE
#define PCMK_ROLE_PROMOTED
#define PCMK_OPT_SYMMETRIC_CLUSTER
#define PCMK_ROLE_STARTED
#define PCMK_OPT_LOAD_THRESHOLD
#define PCMK_OPT_PE_INPUT_SERIES_MAX
#define crm_err(fmt, args...)
bool pcmk_str_is_minus_infinity(const char *s)
#define PCMK_META_REMOTE_PORT
#define PCMK_VALUE_STOP_ONLY
#define PCMK_OPT_PE_ERROR_SERIES_MAX
#define PCMK_OPT_STOP_ORPHAN_RESOURCES
#define PCMK_OPT_ELECTION_TIMEOUT
#define PCMK_META_FAILURE_TIMEOUT
This structure contains everything that makes up a single output formatter.
#define PCMK_OPT_JOIN_FINALIZATION_TIMEOUT
bool pcmk__valid_positive_int(const char *value)
#define PCMK_ROLE_UNPROMOTED
#define PCMK_OPT_MIGRATION_LIMIT
#define PCMK_OPT_NO_QUORUM_POLICY
#define PCMK_OPT_HAVE_WATCHDOG
#define PCMK_VALUE_VERSION
#define PCMK_VALUE_PROGRESSIVE
#define PCMK_VALUE_STATIC_LIST
#define PCMK_STONITH_DELAY_BASE
#define PCMK_VALUE_BALANCED
#define PCMK_VALUE_STRING
#define PCMK_META_CRITICAL
void pcmk__cli_help(char cmd)
#define PCMK_META_PRIORITY
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)
#define PCMK__OPT_REMOVE_AFTER_STOP
int pcmk__output_new(pcmk__output_t **out, const char *fmt_name, const char *filename, char **argv)
bool pcmk__env_option_enabled(const char *daemon, const char *option)
#define PCMK_VALUE_UNFENCING
#define PCMK_VALUE_INTEGER
gboolean crm_is_true(const char *s)
void pcmk__output_set_legacy_xml(pcmk__output_t *out)
#define PCMK_VALUE_FREEZE
const char * pcmk__env_option(const char *option)
#define PCMK_STONITH_DELAY_MAX
void pcmk__insert_dup(GHashTable *table, const char *name, const char *value)
#define PCMK_VALUE_DEMOTE
bool pcmk__validate_health_strategy(const char *value)
bool pcmk__valid_boolean(const char *value)
#define PCMK_OPT_CLUSTER_INFRASTRUCTURE
#define PCMK_OPT_JOIN_INTEGRATION_TIMEOUT
#define PCMK_META_ALLOW_MIGRATE
#define PCMK_OPT_STONITH_WATCHDOG_TIMEOUT
#define PCMK_VALUE_MIGRATE_ON_RED