24 check_health(
const char *value)
27 "migrate-on-red", NULL);
31 check_stonith_action(
const char *value)
37 check_placement_strategy(
const char *value)
50 "no-quorum-policy", NULL,
"enum",
"stop, freeze, ignore, demote, suicide",
52 "What to do when the cluster does not have quorum",
56 "symmetric-cluster", NULL,
"boolean", NULL,
58 "Whether resources can run on any node by default",
62 "maintenance-mode", NULL,
"boolean", NULL,
64 "Whether the cluster should refrain from monitoring, starting, " 65 "and stopping resources",
69 "start-failure-is-fatal", NULL,
"boolean", NULL,
71 "Whether a start failure should prevent a resource from being " 72 "recovered on the same node",
73 "When true, the cluster will immediately ban a resource from a node " 74 "if it fails to start there. When false, the cluster will instead " 75 "check the resource's fail count against its migration-threshold." 78 "enable-startup-probes", NULL,
"boolean", NULL,
80 "Whether the cluster should check for active resources during start-up",
86 "Whether to lock resources to a cleanly shut down node",
87 "When true, resources active on a node when it is cleanly shut down " 88 "are kept \"locked\" to that node (not allowed to run elsewhere) " 89 "until they start again on that node after it rejoins (or for at " 90 "most shutdown-lock-limit, if set). Stonith resources and " 91 "Pacemaker Remote connections are never locked. Clone and bundle " 92 "instances and the master role of promotable clones are currently " 93 "never locked, though support could be added in a future release." 98 "Do not lock resources to a cleanly shut down node longer than this",
99 "If shutdown-lock is true and this is set to a nonzero time duration, " 100 "shutdown locks will expire after this much time has passed since " 101 "the shutdown was initiated, even if the node has not rejoined." 106 "stonith-enabled", NULL,
"boolean", NULL,
108 "*** Advanced Use Only *** " 109 "Whether nodes may be fenced as part of recovery",
110 "If false, unresponsive nodes are immediately assumed to be harmless, " 111 "and resources that were active on them may be recovered " 112 "elsewhere. This can result in a \"split-brain\" situation, " 113 "potentially leading to data loss and/or service unavailability." 116 "stonith-action", NULL,
"enum",
"reboot, off, poweroff",
117 "reboot", check_stonith_action,
118 "Action to send to fence device when a node needs to be fenced " 119 "(\"poweroff\" is a deprecated alias for \"off\")",
123 "stonith-timeout", NULL,
"time", NULL,
125 "*** Advanced Use Only *** Unused by Pacemaker",
126 "This value is not used by Pacemaker, but is kept for backward " 127 "compatibility, and certain legacy fence agents might use it." 132 "Whether watchdog integration is enabled",
133 "This is set automatically by the cluster according to whether SBD " 134 "is detected to be in use. User-configured values are ignored. " 135 "The value `true` is meaningful if diskless SBD is used and " 136 "`stonith-watchdog-timeout` is nonzero. In that case, if fencing " 137 "is required, watchdog-based self-fencing will be performed via " 138 "SBD without requiring a fencing resource explicitly configured." 141 "concurrent-fencing", NULL,
"boolean", NULL,
142 #ifdef DEFAULT_CONCURRENT_FENCING_TRUE 148 "Allow performing fencing operations in parallel",
152 "startup-fencing", NULL,
"boolean", NULL,
154 "*** Advanced Use Only *** Whether to fence unseen nodes at start-up",
155 "Setting this to false may lead to a \"split-brain\" situation," 156 "potentially leading to data loss and/or service unavailability." 161 "Apply fencing delay targeting the lost nodes with the highest total resource priority",
162 "Apply specified delay for the fencings that are targeting the lost " 163 "nodes with the highest total resource priority in case we don't " 164 "have the majority of the nodes in our cluster partition, so that " 165 "the more significant nodes potentially win any fencing match, " 166 "which is especially meaningful under split-brain of 2-node " 167 "cluster. A promoted resource instance takes the base priority + 1 " 168 "on calculation if the base priority is not 0. Any static/random " 169 "delays that are introduced by `pcmk_delay_base/max` configured " 170 "for the corresponding fencing resources will be added to this " 171 "delay. This delay should be significantly greater than, safely " 172 "twice, the maximum `pcmk_delay_base/max`. By default, priority " 173 "fencing delay is disabled." 177 "cluster-delay", NULL,
"time", NULL,
179 "Maximum time for node-to-node communication",
180 "The node elected Designated Controller (DC) will consider an action " 181 "failed if it does not get a response from the node executing the " 182 "action within this time (after considering the action's own " 183 "timeout). The \"correct\" value will depend on the speed and " 184 "load of your network and cluster nodes." 187 "batch-limit", NULL,
"integer", NULL,
189 "Maximum number of jobs that the cluster may execute in parallel " 191 "The \"correct\" value will depend on the speed and load of your " 192 "network and cluster nodes. If set to 0, the cluster will " 193 "impose a dynamically calculated limit when any node has a " 197 "migration-limit", NULL,
"integer", NULL,
199 "The number of live migration actions that the cluster is allowed " 200 "to execute in parallel on a node (-1 means no limit)" 205 "stop-all-resources", NULL,
"boolean", NULL,
207 "Whether the cluster should stop all active resources",
211 "stop-orphan-resources", NULL,
"boolean", NULL,
213 "Whether to stop resources that were removed from the configuration",
217 "stop-orphan-actions", NULL,
"boolean", NULL,
219 "Whether to cancel recurring actions removed from the configuration",
223 "remove-after-stop", NULL,
"boolean", NULL,
225 "*** Advanced Use Only *** Whether to remove stopped resources from " 227 "Values other than default are poorly tested and potentially dangerous." 232 "pe-error-series-max", NULL,
"integer", NULL,
234 "The number of scheduler inputs resulting in errors to save",
235 "Zero to disable, -1 to store unlimited." 238 "pe-warn-series-max", NULL,
"integer", NULL,
240 "The number of scheduler inputs resulting in warnings to save",
241 "Zero to disable, -1 to store unlimited." 244 "pe-input-series-max", NULL,
"integer", NULL,
246 "The number of scheduler inputs without errors or warnings to save",
247 "Zero to disable, -1 to store unlimited." 252 "node-health-strategy", NULL,
"enum",
253 "none, migrate-on-red, only-green, progressive, custom",
254 "none", check_health,
255 "How cluster should react to node health attributes",
256 "Requires external entities to create node attributes (named with " 257 "the prefix \"#health\") with values \"red\", \"yellow\" or " 261 "node-health-base", NULL,
"integer", NULL,
263 "Base health score assigned to a node",
264 "Only used when node-health-strategy is set to progressive." 267 "node-health-green", NULL,
"integer", NULL,
269 "The score to use for a node health attribute whose value is \"green\"",
270 "Only used when node-health-strategy is set to custom or progressive." 273 "node-health-yellow", NULL,
"integer", NULL,
275 "The score to use for a node health attribute whose value is \"yellow\"",
276 "Only used when node-health-strategy is set to custom or progressive." 279 "node-health-red", NULL,
"integer", NULL,
281 "The score to use for a node health attribute whose value is \"red\"",
282 "Only used when node-health-strategy is set to custom or progressive." 287 "placement-strategy", NULL,
"enum",
288 "default, utilization, minimal, balanced",
289 "default", check_placement_strategy,
290 "How the cluster should allocate resources to nodes",
299 "Pacemaker scheduler options",
300 "Cluster options used by Pacemaker's scheduler" 301 " (formerly called pengine)",
302 pe_opts,
DIMOF(pe_opts));
320 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) {
620 return g_hash_table_lookup(
host->details->attrs,
name);
623 pe_rsc_trace(rsc,
"%s: Not looking for %s on the container host: %s is inactive",
#define CRM_CHECK(expr, failure_action)
void add_hash_param(GHashTable *hash, const char *name, const char *value)
#define CRMD_ACTION_MIGRATED
#define XML_CONFIG_ATTR_SHUTDOWN_LOCK
pe_resource_t * container
bool pcmk__strcase_any_of(const char *s,...) G_GNUC_NULL_TERMINATED
#define XML_CONFIG_ATTR_PRIORITY_FENCING_DELAY
#define RSC_ROLE_STARTED_S
pe_resource_t * remote_rsc
#define CRMD_ACTION_NOTIFY
int pe__add_scores(int score1, int score2)
const char * pe_node_attribute_raw(pe_node_t *node, const char *name)
#define CRMD_ACTION_PROMOTE
const char * task2text(enum action_tasks task)
#define CRM_SCORE_INFINITY
#define XML_RSC_ATTR_TARGET
gboolean was_processing_error
gboolean was_processing_warning
#define CRMD_ACTION_START
enum rsc_role_e text2role(const char *role)
#define CRM_OP_LRM_REFRESH
#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)
const char * role2text(enum rsc_role_e role)
#define crm_trace(fmt, args...)
struct pe_node_shared_s * details
Wrappers for and extensions to libxml2.
#define RSC_ROLE_MASTER_S
const char * pe_node_attribute_calculated(const pe_node_t *node, const char *name, const pe_resource_t *rsc)
#define CRMD_ACTION_PROMOTED
const char * pcmk__cluster_option(GHashTable *options, pcmk__cluster_option_t *option_list, int len, const char *name)
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)
void verify_pe_options(GHashTable *options)
const char * pe_pref(GHashTable *options, const char *name)
#define CRMD_ACTION_STOPPED
bool pcmk__valid_boolean(const char *value)
#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
enum action_tasks text2task(const char *task)
#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...)
const char * fail2text(enum action_fail_response fail)
#define CRMD_ACTION_STARTED
#define CRMD_ACTION_CANCEL
#define CRMD_ACTION_DELETE
#define CRMD_ACTION_STATUS