15 #include <sys/types.h> 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 nodes may be fenced as part of recovery"),
237 N_(
"If false, unresponsive nodes are immediately assumed to be " 238 "harmless, and resources that were active on them may be recovered " 239 "elsewhere. This can result in a \"split-brain\" situation, " 240 "potentially leading to data loss and/or service unavailability."),
247 N_(
"Action to send to fence device when a node needs to be fenced"),
254 N_(
"How long to wait for on, off, and reboot fence actions to complete " 262 N_(
"Whether watchdog integration is enabled"),
263 N_(
"This is set automatically by the cluster according to whether SBD " 264 "is detected to be in use. User-configured values are ignored. " 265 "The value `true` is meaningful if diskless SBD is used and " 266 "`stonith-watchdog-timeout` is nonzero. In that case, if fencing " 267 "is required, watchdog-based self-fencing will be performed via " 268 "SBD without requiring a fencing resource explicitly configured."),
284 N_(
"How long before nodes can be assumed to be safely down when " 285 "watchdog-based self-fencing via SBD is in use"),
286 N_(
"If this is set to a positive value, lost nodes are assumed to " 287 "achieve self-fencing using watchdog-based SBD within this much " 288 "time. This does not require a fencing resource to be explicitly " 289 "configured, though a fence_watchdog resource can be configured, to " 290 "limit use to specific nodes. If this is set to 0 (the default), " 291 "the cluster will never assume watchdog-based self-fencing. If this " 292 "is set to a negative value, the cluster will use twice the local " 293 "value of the `SBD_WATCHDOG_TIMEOUT` environment variable if that " 294 "is positive, or otherwise treat this as 0. WARNING: When used, " 295 "this timeout must be larger than `SBD_WATCHDOG_TIMEOUT` on all " 296 "nodes that use watchdog-based SBD, and Pacemaker will refuse to " 297 "start on any of those nodes where this is not true for the local " 298 "value or SBD is not active. When this is set to a negative value, " 299 "`SBD_WATCHDOG_TIMEOUT` must be set to the same value on all nodes " 300 "that use SBD, otherwise data corruption or loss could occur."),
306 N_(
"How many times fencing can fail before it will no longer be " 307 "immediately re-attempted on a target"),
312 #if PCMK__CONCURRENT_FENCING_DEFAULT_TRUE 319 N_(
"Allow performing fencing operations in parallel"),
326 N_(
"Whether to fence unseen nodes at start-up"),
327 N_(
"Setting this to false may lead to a \"split-brain\" situation, " 328 "potentially leading to data loss and/or service unavailability."),
334 N_(
"Apply fencing delay targeting the lost nodes with the highest " 335 "total resource priority"),
336 N_(
"Apply specified delay for the fencings that are targeting the lost " 337 "nodes with the highest total resource priority in case we don't " 338 "have the majority of the nodes in our cluster partition, so that " 339 "the more significant nodes potentially win any fencing match, " 340 "which is especially meaningful under split-brain of 2-node " 341 "cluster. A promoted resource instance takes the base priority + 1 " 342 "on calculation if the base priority is not 0. Any static/random " 343 "delays that are introduced by `pcmk_delay_base/max` configured " 344 "for the corresponding fencing resources will be added to this " 345 "delay. This delay should be significantly greater than, safely " 346 "twice, the maximum `pcmk_delay_base/max`. By default, priority " 347 "fencing delay is disabled."),
353 N_(
"How long to wait for a node that has joined the cluster to join " 354 "the controller process group"),
355 N_(
"Fence nodes that do not join the controller process group within " 356 "this much time after joining the cluster, to allow the cluster " 357 "to continue managing resources. A value of 0 means never fence " 358 "pending nodes. Setting the value to 2h means fence nodes after " 365 N_(
"Maximum time for node-to-node communication"),
366 N_(
"The node elected Designated Controller (DC) will consider an action " 367 "failed if it does not get a response from the node executing the " 368 "action within this time (after considering the action's own " 369 "timeout). The \"correct\" value will depend on the speed and " 370 "load of your network and cluster nodes.")
378 N_(
"Maximum amount of system load that should be used by cluster " 380 N_(
"The cluster will slow down its recovery process when the amount of " 381 "system resources used (currently CPU) approaches this limit"),
387 N_(
"Maximum number of jobs that can be scheduled per node (defaults to " 395 N_(
"Maximum number of jobs that the cluster may execute in parallel " 397 N_(
"The \"correct\" value will depend on the speed and load of your " 398 "network and cluster nodes. If set to 0, the cluster will " 399 "impose a dynamically calculated limit when any node has a " 406 N_(
"The number of live migration actions that the cluster is allowed " 407 "to execute in parallel on a node (-1 means no limit)"),
425 N_(
"Maximum IPC message backlog before disconnecting a cluster daemon"),
426 N_(
"Raise this if log has \"Evicting client\" messages for cluster " 427 "daemon PIDs (a good value is the number of resources in the " 428 "cluster multiplied by the number of nodes)."),
436 N_(
"Whether the cluster should stop all active resources"),
443 N_(
"Whether to stop resources that were removed from the " 451 N_(
"Whether to cancel recurring actions removed from the " 461 N_(
"The number of scheduler inputs resulting in errors to save"),
462 N_(
"Zero to disable, -1 to store unlimited."),
468 N_(
"The number of scheduler inputs resulting in warnings to save"),
469 N_(
"Zero to disable, -1 to store unlimited."),
475 N_(
"The number of scheduler inputs without errors or warnings to save"),
476 N_(
"Zero to disable, -1 to store unlimited."),
487 N_(
"How cluster should react to node health attributes"),
488 N_(
"Requires external entities to create node attributes (named with " 489 "the prefix \"#health\") with values \"red\", \"yellow\", or " 496 N_(
"Base health score assigned to a node"),
497 N_(
"Only used when \"node-health-strategy\" is set to " 504 N_(
"The score to use for a node health attribute whose value is " 506 N_(
"Only used when \"node-health-strategy\" is set to \"custom\" or " 513 N_(
"The score to use for a node health attribute whose value is " 515 N_(
"Only used when \"node-health-strategy\" is set to \"custom\" or " 522 N_(
"The score to use for a node health attribute whose value is " 524 N_(
"Only used when \"node-health-strategy\" is set to \"custom\" or " 535 N_(
"How the cluster should allocate resources to nodes"),
553 N_(
"Name of agent parameter that should be set to the fencing target"),
554 N_(
"If the fencing agent metadata advertises support for the \"port\" " 555 "or \"plug\" parameter, that will be used as the default, " 556 "otherwise \"none\" will be used, which tells the cluster not to " 557 "supply any additional parameters."),
563 N_(
"A mapping of node names to port numbers for devices that do not " 564 "support node names."),
565 N_(
"For example, \"node1:1;node2:2,3\" would tell the cluster to use " 566 "port 1 for node1 and ports 2 and 3 for node2."),
572 N_(
"Nodes targeted by this device"),
573 N_(
"Comma-separated list of nodes that can be targeted by this device " 574 "(for example, \"node1,node2,node3\"). If pcmk_host_check is " 575 "\"static-list\", either this or pcmk_host_map must be set."),
583 N_(
"How to determine which nodes can be targeted by the device"),
584 N_(
"Use \"dynamic-list\" to query the device via the 'list' command; " 585 "\"static-list\" to check the pcmk_host_list attribute; " 586 "\"status\" to query the device via the 'status' command; or " 587 "\"none\" to assume every device can fence every node. " 588 "The default value is \"static-list\" if pcmk_host_map or " 589 "pcmk_host_list is set; otherwise \"dynamic-list\" if the device " 590 "supports the list operation; otherwise \"status\" if the device " 591 "supports the status operation; otherwise \"none\""),
597 N_(
"Enable a delay of no more than the time specified before executing " 599 N_(
"Enable a delay of no more than the time specified before executing " 600 "fencing actions. Pacemaker derives the overall delay by taking " 601 "the value of pcmk_delay_base and adding a random delay value such " 602 "that the sum is kept below this maximum."),
608 N_(
"Enable a base delay for fencing actions and specify base delay " 610 N_(
"This enables a static delay for fencing actions, which can help " 611 "avoid \"death matches\" where two nodes try to fence each other " 612 "at the same time. If pcmk_delay_max is also used, a random delay " 613 "will be added such that the total delay is kept below that value. " 614 "This can be set to a single time value to apply to any node " 615 "targeted by this device (useful if a separate device is " 616 "configured for each target), or to a node map (for example, " 617 "\"node1:1s;node2:5\") to set a different value for each target."),
623 N_(
"The maximum number of actions can be performed in parallel on this " 625 N_(
"If the concurrent-fencing cluster property is \"true\", this " 626 "specifies the maximum number of actions that can be performed in " 627 "parallel on this device. A value of -1 means unlimited."),
633 N_(
"An alternate command to run instead of 'reboot'"),
634 N_(
"Some devices do not support the standard commands or may provide " 635 "additional ones. Use this to specify an alternate, device-" 636 "specific, command that implements the 'reboot' action."),
642 N_(
"Specify an alternate timeout to use for 'reboot' actions instead " 643 "of stonith-timeout"),
644 N_(
"Some devices need much more/less time to complete than normal. " 645 "Use this to specify an alternate, device-specific, timeout for " 646 "'reboot' actions."),
652 N_(
"The maximum number of times to try the 'reboot' command within the " 654 N_(
"Some devices do not support multiple connections. Operations may " 655 "\"fail\" if the device is busy with another task. In that case, " 656 "Pacemaker will automatically retry the operation if there is time " 657 "remaining. Use this option to alter the number of times Pacemaker " 658 "tries a 'reboot' action before giving up."),
664 N_(
"An alternate command to run instead of 'off'"),
665 N_(
"Some devices do not support the standard commands or may provide " 666 "additional ones. Use this to specify an alternate, device-" 667 "specific, command that implements the 'off' action."),
673 N_(
"Specify an alternate timeout to use for 'off' actions instead of " 675 N_(
"Some devices need much more/less time to complete than normal. " 676 "Use this to specify an alternate, device-specific, timeout for " 683 N_(
"The maximum number of times to try the 'off' command within the " 685 N_(
"Some devices do not support multiple connections. Operations may " 686 "\"fail\" if the device is busy with another task. In that case, " 687 "Pacemaker will automatically retry the operation if there is time " 688 "remaining. Use this option to alter the number of times Pacemaker " 689 "tries a 'off' action before giving up."),
695 N_(
"An alternate command to run instead of 'on'"),
696 N_(
"Some devices do not support the standard commands or may provide " 697 "additional ones. Use this to specify an alternate, device-" 698 "specific, command that implements the 'on' action."),
704 N_(
"Specify an alternate timeout to use for 'on' actions instead of " 706 N_(
"Some devices need much more/less time to complete than normal. " 707 "Use this to specify an alternate, device-specific, timeout for " 714 N_(
"The maximum number of times to try the 'on' command within the " 716 N_(
"Some devices do not support multiple connections. Operations may " 717 "\"fail\" if the device is busy with another task. In that case, " 718 "Pacemaker will automatically retry the operation if there is time " 719 "remaining. Use this option to alter the number of times Pacemaker " 720 "tries a 'on' action before giving up."),
726 N_(
"An alternate command to run instead of 'list'"),
727 N_(
"Some devices do not support the standard commands or may provide " 728 "additional ones. Use this to specify an alternate, device-" 729 "specific, command that implements the 'list' action."),
735 N_(
"Specify an alternate timeout to use for 'list' actions instead of " 737 N_(
"Some devices need much more/less time to complete than normal. " 738 "Use this to specify an alternate, device-specific, timeout for " 745 N_(
"The maximum number of times to try the 'list' command within the " 747 N_(
"Some devices do not support multiple connections. Operations may " 748 "\"fail\" if the device is busy with another task. In that case, " 749 "Pacemaker will automatically retry the operation if there is time " 750 "remaining. Use this option to alter the number of times Pacemaker " 751 "tries a 'list' action before giving up."),
757 N_(
"An alternate command to run instead of 'monitor'"),
758 N_(
"Some devices do not support the standard commands or may provide " 759 "additional ones. Use this to specify an alternate, device-" 760 "specific, command that implements the 'monitor' action."),
766 N_(
"Specify an alternate timeout to use for 'monitor' actions instead " 767 "of stonith-timeout"),
768 N_(
"Some devices need much more/less time to complete than normal. " 769 "Use this to specify an alternate, device-specific, timeout for " 770 "'monitor' actions."),
776 N_(
"The maximum number of times to try the 'monitor' command within " 777 "the timeout period"),
778 N_(
"Some devices do not support multiple connections. Operations may " 779 "\"fail\" if the device is busy with another task. In that case, " 780 "Pacemaker will automatically retry the operation if there is time " 781 "remaining. Use this option to alter the number of times Pacemaker " 782 "tries a 'monitor' action before giving up."),
788 N_(
"An alternate command to run instead of 'status'"),
789 N_(
"Some devices do not support the standard commands or may provide " 790 "additional ones. Use this to specify an alternate, device-" 791 "specific, command that implements the 'status' action."),
797 N_(
"Specify an alternate timeout to use for 'status' actions instead " 798 "of stonith-timeout"),
799 N_(
"Some devices need much more/less time to complete than normal. " 800 "Use this to specify an alternate, device-specific, timeout for " 801 "'status' actions."),
807 N_(
"The maximum number of times to try the 'status' command within " 808 "the timeout period"),
809 N_(
"Some devices do not support multiple connections. Operations may " 810 "\"fail\" if the device is busy with another task. In that case, " 811 "Pacemaker will automatically retry the operation if there is time " 812 "remaining. Use this option to alter the number of times Pacemaker " 813 "tries a 'status' action before giving up."),
830 N_(
"Resource assignment priority"),
831 N_(
"If not all resources can be active, the cluster will stop " 832 "lower-priority resources in order to keep higher-priority ones " 839 N_(
"Default value for influence in colocation constraints"),
840 N_(
"Use this value as the default for influence in all colocation " 841 "constraints involving this resource, as well as in the implicit " 842 "colocation constraints created if this resource is in a group."),
850 N_(
"State the cluster should attempt to keep this resource in"),
851 N_(
"\"Stopped\" forces the resource to be stopped. " 852 "\"Started\" allows the resource to be started (and in the case of " 853 "promotable clone resources, promoted if appropriate). " 854 "\"Unpromoted\" allows the resource to be started, but only in the " 855 "unpromoted role if the resource is promotable. " 856 "\"Promoted\" is equivalent to \"Started\"."),
862 N_(
"Whether the cluster is allowed to actively change the resource's " 864 N_(
"If false, the cluster will not start, stop, promote, or demote the " 865 "resource on any node. Recurring actions for the resource are " 866 "unaffected. If true, a true value for the maintenance-mode " 867 "cluster option, the maintenance node attribute, or the " 868 "maintenance resource meta-attribute overrides this."),
874 N_(
"If true, the cluster will not schedule any actions involving the " 876 N_(
"If true, the cluster will not start, stop, promote, or demote the " 877 "resource on any node, and will pause any recurring monitors " 878 "(except those specifying role as \"Stopped\"). If false, a true " 879 "value for the maintenance-mode cluster option or maintenance node " 880 "attribute overrides this."),
886 N_(
"Score to add to the current node when a resource is already " 888 N_(
"Score to add to the current node when a resource is already " 889 "active. This allows running resources to stay where they are, " 890 "even if they would be placed elsewhere if they were being started " 891 "from a stopped state. " 892 "The default is 1 for individual clone instances, and 0 for all " 901 N_(
"Conditions under which the resource can be started"),
902 N_(
"Conditions under which the resource can be started. " 903 "\"nothing\" means the cluster can always start this resource. " 904 "\"quorum\" means the cluster can start this resource only if a " 905 "majority of the configured nodes are active. " 906 "\"fencing\" means the cluster can start this resource only if a " 907 "majority of the configured nodes are active and any failed or " 908 "unknown nodes have been fenced. " 909 "\"unfencing\" means the cluster can start this resource only if " 910 "a majority of the configured nodes are active and any failed or " 911 "unknown nodes have been fenced, and only on nodes that have been " 913 "The default is \"quorum\" for resources with a class of stonith; " 914 "otherwise, \"unfencing\" if unfencing is active in the cluster; " 915 "otherwise, \"fencing\" if the stonith-enabled cluster option is " 917 "otherwise, \"quorum\"."),
923 N_(
"Number of failures on a node before the resource becomes " 924 "ineligible to run there."),
925 N_(
"Number of failures that may occur for this resource on a node, " 926 "before that node is marked ineligible to host this resource. A " 927 "value of 0 indicates that this feature is disabled (the node will " 928 "never be marked ineligible). By contrast, the cluster treats " 929 "\"INFINITY\" (the default) as a very large but finite number. " 930 "This option has an effect only if the failed operation specifies " 931 "its on-fail attribute as \"restart\" (the default), and " 932 "additionally for failed start operations, if the " 933 "start-failure-is-fatal cluster property is set to false."),
939 N_(
"Number of seconds before acting as if a failure had not occurred"),
940 N_(
"Number of seconds after a failed action for this resource before " 941 "acting as if the failure had not occurred, and potentially " 942 "allowing the resource back to the node on which it failed. " 943 "A value of 0 indicates that this feature is disabled."),
951 N_(
"What to do if the cluster finds the resource active on more than " 953 N_(
"What to do if the cluster finds the resource active on more than " 955 "\"block\" means to mark the resource as unmanaged. " 956 "\"stop_only\" means to stop all active instances of this resource " 957 "and leave them stopped. " 958 "\"stop_start\" means to stop all active instances of this " 959 "resource and start the resource in one location only. " 960 "\"stop_unexpected\" means to stop all active instances of this " 961 "resource except where the resource should be active. (This should " 962 "be used only when extra instances are not expected to disrupt " 963 "existing instances, and the resource agent's monitor of an " 964 "existing instance is capable of detecting any problems that could " 965 "be caused. Note that any resources ordered after this one will " 966 "still need to be restarted.)"),
972 N_(
"Whether the cluster should try to \"live migrate\" this resource " 973 "when it needs to be moved"),
974 N_(
"Whether the cluster should try to \"live migrate\" this resource " 975 "when it needs to be moved. " 976 "The default is true for ocf:pacemaker:remote resources, and false " 983 N_(
"Whether the resource should be allowed to run on a node even if " 984 "the node's health score would otherwise prevent it"),
991 N_(
"Where to check user-defined node attributes"),
992 N_(
"Whether to check user-defined node attributes on the physical host " 993 "where a container is running or on the local node. This is " 994 "usually set for a bundle resource and inherited by the bundle's " 995 "primitive resource. " 996 "A value of \"host\" means to check user-defined node attributes " 997 "on the underlying physical host. Any other value means to check " 998 "user-defined node attributes on the local node (for a bundled " 999 "primitive resource, this is the bundle node)."),
1005 N_(
"Name of the Pacemaker Remote guest node this resource is " 1006 "associated with, if any"),
1007 N_(
"Name of the Pacemaker Remote guest node this resource is " 1008 "associated with, if any. If specified, this both enables the " 1009 "resource as a guest node and defines the unique name used to " 1010 "identify the guest node. The guest must be configured to run the " 1011 "Pacemaker Remote daemon when it is started. " 1012 "WARNING: This value cannot overlap with any resource or node " 1019 N_(
"If remote-node is specified, the IP address or hostname used to " 1020 "connect to the guest via Pacemaker Remote"),
1021 N_(
"If remote-node is specified, the IP address or hostname used to " 1022 "connect to the guest via Pacemaker Remote. The Pacemaker Remote " 1023 "daemon on the guest must be configured to accept connections on " 1025 "The default is the value of the remote-node meta-attribute."),
1031 N_(
"If remote-node is specified, port on the guest used for its " 1032 "Pacemaker Remote connection"),
1033 N_(
"If remote-node is specified, the port on the guest used for its " 1034 "Pacemaker Remote connection. The Pacemaker Remote daemon on the " 1035 "guest must be configured to listen on this port."),
1041 N_(
"If remote-node is specified, how long before a pending Pacemaker " 1042 "Remote guest connection times out."),
1049 N_(
"If remote-node is specified, this acts as the allow-migrate " 1050 "meta-attribute for the implicit remote connection resource " 1051 "(ocf:pacemaker:remote)."),
1077 const char *
const prefixes[] = {
"PCMK_",
"HA_"};
1079 const char *value = NULL;
1081 CRM_CHECK(!pcmk__str_empty(option),
return NULL);
1084 int rv = snprintf(env_name,
NAME_MAX,
"%s%s", prefixes[i], option);
1087 crm_err(
"Failed to write %s%s to buffer: %s", prefixes[i], option,
1092 if (rv >=
sizeof(env_name)) {
1093 crm_trace(
"\"%s%s\" is too long", prefixes[i], option);
1097 value = getenv(env_name);
1098 if (value != NULL) {
1099 crm_trace(
"Found %s = %s", env_name, value);
1104 crm_trace(
"Nothing found for %s", option);
1128 const char *
const prefixes[] = {
"PCMK_",
"HA_"};
1131 CRM_CHECK(!pcmk__str_empty(option) && (strchr(option,
'=') == NULL),
1135 int rv = snprintf(env_name,
NAME_MAX,
"%s%s", prefixes[i], option);
1138 crm_err(
"Failed to write %s%s to buffer: %s", prefixes[i], option,
1143 if (rv >=
sizeof(env_name)) {
1144 crm_trace(
"\"%s%s\" is too long", prefixes[i], option);
1148 if (value != NULL) {
1149 crm_trace(
"Setting %s to %s", env_name, value);
1150 rv = setenv(env_name, value, 1);
1153 rv = unsetenv(env_name);
1157 crm_err(
"Failed to %sset %s: %s", (value != NULL)?
"" :
"un",
1158 env_name, strerror(errno));
1161 if (!compat && (value != NULL)) {
1186 return (value != NULL)
1188 || ((daemon != NULL) && (strstr(value, daemon) != NULL)));
1238 return (value != NULL)
1258 long long num = 0LL;
1301 float number = strtof(value, &end);
1303 return ((end == NULL) || (end[0] ==
'%')) && (number >= 0);
1335 const char *value = NULL;
1339 if (table != NULL) {
1340 value = g_hash_table_lookup(table, option->
name);
1342 if ((value == NULL) && (option->
alt_name != NULL)) {
1343 value = g_hash_table_lookup(table, option->
alt_name);
1344 if (value != NULL) {
1346 "option '%s' is deprecated and will be " 1347 "removed in a future release",
1355 if ((value != NULL) && (option->
is_valid != NULL)
1359 "because '%s' is invalid", option->
name, value);
1363 if (value != NULL) {
1371 if (value == NULL) {
1372 crm_trace(
"No value or default provided for cluster option '%s'",
1378 crm_err(
"Bug: default value for cluster option '%s' is invalid",
1382 crm_trace(
"Using default value '%s' for cluster option '%s'",
1383 value, option->
name);
1384 if (table != NULL) {
1403 option->
name != NULL; option++) {
1406 return cluster_option_value(options, option);
1434 const char *desc_short,
const char *desc_long,
1435 uint32_t filter,
bool all)
1437 return out->
message(out,
"option-list",
name, desc_short, desc_long, filter,
1438 cluster_options, all);
1457 const char *desc_short,
const char *desc_long,
1460 return out->
message(out,
"option-list",
name, desc_short, desc_long,
1484 const char *desc_short,
const char *desc_long,
1487 return out->
message(out,
"option-list",
name, desc_short, desc_long,
1506 const char *desc_short,
const char *desc_long,
1511 xmlNode *top = NULL;
1512 const xmlNode *metadata = NULL;
1513 GString *metadata_s = NULL;
1527 (uint32_t) filter,
true);
1533 metadata_s = g_string_sized_new(16384);
1541 g_string_free(metadata_s, TRUE);
1549 option->
name != NULL; option++) {
1551 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
xmlNode * pcmk__xe_first_child(const xmlNode *parent, const char *node_name, const char *attr_n, const char *attr_v)
#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
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
void pcmk__xml_free(xmlNode *xml)
#define PCMK_META_REMOTE_ADDR
#define PCMK_VALUE_NOTHING
#define PCMK_VALUE_FENCING
#define PCMK_ACTION_STATUS
#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
int pcmk_parse_interval_spec(const char *input, guint *result_ms)
Parse milliseconds from a Pacemaker interval specification.
#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)
bool pcmk_str_is_infinity(const char *s)
#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
void pcmk__validate_cluster_options(GHashTable *options)
#define PCMK_OPT_NODE_PENDING_TIMEOUT
#define PCMK_VALUE_QUORUM
const char * pcmk__cluster_option(GHashTable *options, const char *name)
#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__assert(expr)
#define PCMK_OPT_NODE_HEALTH_STRATEGY
#define PCMK_VALUE_SELECT
bool pcmk_str_is_minus_infinity(const char *s)
#define PCMK_OPT_STONITH_TIMEOUT
#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...)
#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
gboolean crm_is_true(const char *s)
#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)
int crm_str_to_boolean(const char *s, int *ret)
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
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