24 check_health(
const char *value)
34 check_stonith_action(
const char *value)
42 check_placement_strategy(
const char *value)
57 "no-quorum-policy", NULL,
"enum",
"stop, freeze, ignore, suicide",
59 "What to do when the cluster does not have quorum",
63 "symmetric-cluster", NULL,
"boolean", NULL,
65 "Whether resources can run on any node by default",
69 "maintenance-mode", NULL,
"boolean", NULL,
71 "Whether the cluster should refrain from monitoring, starting, "
72 "and stopping resources",
76 "start-failure-is-fatal", NULL,
"boolean", NULL,
78 "Whether a start failure should prevent a resource from being "
79 "recovered on the same node",
80 "When true, the cluster will immediately ban a resource from a node "
81 "if it fails to start there. When false, the cluster will instead "
82 "check the resource's fail count against its migration-threshold."
85 "enable-startup-probes", NULL,
"boolean", NULL,
87 "Whether the cluster should check for active resources during start-up",
93 "Whether to lock resources to a cleanly shut down node",
94 "When true, resources active on a node when it is cleanly shut down "
95 "are kept \"locked\" to that node (not allowed to run elsewhere) "
96 "until they start again on that node after it rejoins (or for at "
97 "most shutdown-lock-limit, if set). Stonith resources and "
98 "Pacemaker Remote connections are never locked. Clone and bundle "
99 "instances and the master role of promotable clones are currently "
100 "never locked, though support could be added in a future release."
105 "Do not lock resources to a cleanly shut down node longer than this",
106 "If shutdown-lock is true and this is set to a nonzero time duration, "
107 "shutdown locks will expire after this much time has passed since "
108 "the shutdown was initiated, even if the node has not rejoined."
113 "stonith-enabled", NULL,
"boolean", NULL,
115 "*** Advanced Use Only *** "
116 "Whether nodes may be fenced as part of recovery",
117 "If false, unresponsive nodes are immediately assumed to be harmless, "
118 "and resources that were active on them may be recovered "
119 "elsewhere. This can result in a \"split-brain\" situation, "
120 "potentially leading to data loss and/or service unavailability."
123 "stonith-action", NULL,
"enum",
"reboot, off, poweroff",
124 "reboot", check_stonith_action,
125 "Action to send to fence device when a node needs to be fenced "
126 "(\"poweroff\" is a deprecated alias for \"off\")",
130 "stonith-timeout", NULL,
"time", NULL,
132 "*** Advanced Use Only *** Unused by Pacemaker",
133 "This value is not used by Pacemaker, but is kept for backward "
134 "compatibility, and certain legacy fence agents might use it."
139 "Whether watchdog integration is enabled",
140 "This is set automatically by the cluster according to whether SBD "
141 "is detected to be in use. User-configured values are ignored."
144 "concurrent-fencing", NULL,
"boolean", NULL,
145 #ifdef DEFAULT_CONCURRENT_FENCING_TRUE
151 "Allow performing fencing operations in parallel",
155 "startup-fencing", NULL,
"boolean", NULL,
157 "*** Advanced Use Only *** Whether to fence unseen nodes at start-up",
158 "Setting this to false may lead to a \"split-brain\" situation,"
159 "potentially leading to data loss and/or service unavailability."
164 "Apply fencing delay targeting the lost nodes with the highest total resource priority",
165 "Apply specified delay for the fencings that are targeting the lost "
166 "nodes with the highest total resource priority in case we don't "
167 "have the majority of the nodes in our cluster partition, so that "
168 "the more significant nodes potentially win any fencing match, "
169 "which is especially meaningful under split-brain of 2-node "
170 "cluster. A promoted resource instance takes the base priority + 1 "
171 "on calculation if the base priority is not 0. Any static/random "
172 "delays that are introduced by `pcmk_delay_base/max` configured "
173 "for the corresponding fencing resources will be added to this "
174 "delay. This delay should be significantly greater than, safely "
175 "twice, the maximum `pcmk_delay_base/max`. By default, priority "
176 "fencing delay is disabled."
180 "cluster-delay", NULL,
"time", NULL,
182 "Maximum time for node-to-node communication",
183 "The node elected Designated Controller (DC) will consider an action "
184 "failed if it does not get a response from the node executing the "
185 "action within this time (after considering the action's own "
186 "timeout). The \"correct\" value will depend on the speed and "
187 "load of your network and cluster nodes."
190 "batch-limit", NULL,
"integer", NULL,
192 "Maximum number of jobs that the cluster may execute in parallel "
194 "The \"correct\" value will depend on the speed and load of your "
195 "network and cluster nodes. If set to 0, the cluster will "
196 "impose a dynamically calculated limit when any node has a "
200 "migration-limit", NULL,
"integer", NULL,
202 "The number of live migration actions that the cluster is allowed "
203 "to execute in parallel on a node (-1 means no limit)"
208 "stop-all-resources", NULL,
"boolean", NULL,
210 "Whether the cluster should stop all active resources",
214 "stop-orphan-resources", NULL,
"boolean", NULL,
216 "Whether to stop resources that were removed from the configuration",
220 "stop-orphan-actions", NULL,
"boolean", NULL,
222 "Whether to cancel recurring actions removed from the configuration",
226 "remove-after-stop", NULL,
"boolean", NULL,
228 "*** Advanced Use Only *** Whether to remove stopped resources from "
230 "Values other than default are poorly tested and potentially dangerous."
235 "pe-error-series-max", NULL,
"integer", NULL,
237 "The number of scheduler inputs resulting in errors to save",
238 "Zero to disable, -1 to store unlimited."
241 "pe-warn-series-max", NULL,
"integer", NULL,
243 "The number of scheduler inputs resulting in warnings to save",
244 "Zero to disable, -1 to store unlimited."
247 "pe-input-series-max", NULL,
"integer", NULL,
249 "The number of scheduler inputs without errors or warnings to save",
250 "Zero to disable, -1 to store unlimited."
255 "node-health-strategy", NULL,
"enum",
256 "none, migrate-on-red, only-green, progressive, custom",
257 "none", check_health,
258 "How cluster should react to node health attributes",
259 "Requires external entities to create node attributes (named with "
260 "the prefix \"#health\") with values \"red\", \"yellow\" or "
264 "node-health-base", NULL,
"integer", NULL,
266 "Base health score assigned to a node",
267 "Only used when node-health-strategy is set to progressive."
270 "node-health-green", NULL,
"integer", NULL,
272 "The score to use for a node health attribute whose value is \"green\"",
273 "Only used when node-health-strategy is set to custom or progressive."
276 "node-health-yellow", NULL,
"integer", NULL,
278 "The score to use for a node health attribute whose value is \"yellow\"",
279 "Only used when node-health-strategy is set to custom or progressive."
282 "node-health-red", NULL,
"integer", NULL,
284 "The score to use for a node health attribute whose value is \"red\"",
285 "Only used when node-health-strategy is set to custom or progressive."
290 "placement-strategy", NULL,
"enum",
291 "default, utilization, minimal, balanced",
292 "default", check_placement_strategy,
293 "How the cluster should allocate resources to nodes",
302 "Pacemaker scheduler options",
303 "Cluster options used by Pacemaker's scheduler"
304 " (formerly called pengine)",
305 pe_opts,
DIMOF(pe_opts));
323 const char *result =
"<unknown>";
348 result =
"restart-container";
351 result =
"reset-remote";
403 crm_trace(
"Unsupported action: %s", task);
412 const char *result =
"<unknown>";
416 result =
"no_action";
498 crm_err(
"Unknown role: %s", role);
512 int result = score1 + score2;
519 crm_trace(
"-INFINITY + -INFINITY = -INFINITY");
521 crm_trace(
"-INFINITY + +INFINITY = -INFINITY");
523 crm_trace(
"-INFINITY + %d = -INFINITY", score2);
531 crm_trace(
"+INFINITY + -INFINITY = -INFINITY");
533 crm_trace(
"%d + -INFINITY = -INFINITY", score1);
541 crm_trace(
"+INFINITY + +INFINITY = +INFINITY");
543 crm_trace(
"+INFINITY + %d = +INFINITY", score2);
549 crm_trace(
"%d + +INFINITY = +INFINITY", score1);
560 crm_trace(
"%d + %d = +INFINITY", score1, score2);
564 crm_trace(
"%d + %d = -INFINITY", score1, score2);
568 crm_trace(
"%d + %d = %d", score1, score2, result);
578 if (name == NULL || value == NULL) {
584 }
else if (g_hash_table_lookup(hash, name) == NULL) {
585 g_hash_table_insert(hash, strdup(name), strdup(value));
598 }
else if(rsc == NULL) {
603 if(source == NULL ||
safe_str_eq(
"host", source) == FALSE) {
623 pe_rsc_trace(rsc,
"%s: Not looking for %s on the container host: %s is inactive",
#define CRM_CHECK(expr, failure_action)
void verify_pe_options(GHashTable *options)
const char * task2text(enum action_tasks task)
#define CRMD_ACTION_MIGRATED
const char * pe_node_attribute_calculated(const pe_node_t *node, const char *name, const pe_resource_t *rsc)
#define XML_CONFIG_ATTR_SHUTDOWN_LOCK
pe_resource_t * container
#define XML_CONFIG_ATTR_PRIORITY_FENCING_DELAY
#define RSC_ROLE_STARTED_S
pe_resource_t * remote_rsc
#define CRMD_ACTION_NOTIFY
#define CRMD_ACTION_PROMOTE
enum action_tasks text2task(const char *task)
const char * pe_pref(GHashTable *options, const char *name)
#define CRM_SCORE_INFINITY
#define XML_RSC_ATTR_TARGET
#define CRMD_ACTION_START
#define CRM_OP_LRM_REFRESH
const char * role2text(enum rsc_role_e role)
#define CRMD_ACTION_DEMOTED
bool pcmk__valid_quorum(const char *value)
#define XML_CONFIG_ATTR_SHUTDOWN_LOCK_LIMIT
#define CRMD_ACTION_DEMOTE
bool pcmk__valid_interval_spec(const char *value)
#define crm_trace(fmt, args...)
struct pe_node_shared_s * details
Wrappers for and extensions to libxml2.
const char * pe_node_attribute_raw(pe_node_t *node, const char *name)
#define RSC_ROLE_MASTER_S
#define CRMD_ACTION_PROMOTED
const char * pcmk__cluster_option(GHashTable *options, pcmk__cluster_option_t *option_list, int len, const char *name)
enum rsc_role_e text2role(const char *role)
void pcmk__print_option_metadata(const char *name, const char *version, const char *desc_short, const char *desc_long, pcmk__cluster_option_t *option_list, int len)
#define CRMD_ACTION_STOPPED
bool pcmk__valid_boolean(const char *value)
const char * fail2text(enum action_fail_response fail)
void add_hash_param(GHashTable *hash, const char *name, const char *value)
int pe__add_scores(int score1, int score2)
#define crm_err(fmt, args...)
#define XML_ATTR_HAVE_WATCHDOG
bool pcmk__valid_number(const char *value)
#define CRMD_ACTION_MIGRATE
#define RSC_ROLE_STOPPED_S
#define RSC_ROLE_UNKNOWN_S
void pcmk__validate_cluster_options(GHashTable *options, pcmk__cluster_option_t *option_list, int len)
#define CRMD_ACTION_NOTIFIED
#define pe_rsc_trace(rsc, fmt, args...)
gboolean was_processing_error
#define safe_str_eq(a, b)
gboolean was_processing_warning
#define CRMD_ACTION_STARTED
#define CRMD_ACTION_CANCEL
#define CRMD_ACTION_DELETE
#define CRMD_ACTION_STATUS