25 check_placement_strategy(
const char *value)
38 "no-quorum-policy", NULL,
"select",
"stop, freeze, ignore, demote, suicide",
40 N_(
"What to do when the cluster does not have quorum"),
44 "symmetric-cluster", NULL,
"boolean", NULL,
46 N_(
"Whether resources can run on any node by default"),
50 "maintenance-mode", NULL,
"boolean", NULL,
52 N_(
"Whether the cluster should refrain from monitoring, starting, " 53 "and stopping resources"),
57 "start-failure-is-fatal", NULL,
"boolean", NULL,
59 N_(
"Whether a start failure should prevent a resource from being " 60 "recovered on the same node"),
61 N_(
"When true, the cluster will immediately ban a resource from a node " 62 "if it fails to start there. When false, the cluster will instead " 63 "check the resource's fail count against its migration-threshold.")
66 "enable-startup-probes", NULL,
"boolean", NULL,
68 N_(
"Whether the cluster should check for active resources during start-up"),
74 N_(
"Whether to lock resources to a cleanly shut down node"),
75 N_(
"When true, resources active on a node when it is cleanly shut down " 76 "are kept \"locked\" to that node (not allowed to run elsewhere) " 77 "until they start again on that node after it rejoins (or for at " 78 "most shutdown-lock-limit, if set). Stonith resources and " 79 "Pacemaker Remote connections are never locked. Clone and bundle " 80 "instances and the promoted role of promotable clones are " 81 "currently never locked, though support could be added in a future " 87 N_(
"Do not lock resources to a cleanly shut down node longer than " 89 N_(
"If shutdown-lock is true and this is set to a nonzero time " 90 "duration, shutdown locks will expire after this much time has " 91 "passed since the shutdown was initiated, even if the node has not " 97 "stonith-enabled", NULL,
"boolean", NULL,
99 N_(
"*** Advanced Use Only *** " 100 "Whether nodes may be fenced as part of recovery"),
101 N_(
"If false, unresponsive nodes are immediately assumed to be harmless, " 102 "and resources that were active on them may be recovered " 103 "elsewhere. This can result in a \"split-brain\" situation, " 104 "potentially leading to data loss and/or service unavailability.")
107 "stonith-action", NULL,
"select",
"reboot, off, poweroff",
109 N_(
"Action to send to fence device when a node needs to be fenced " 110 "(\"poweroff\" is a deprecated alias for \"off\")"),
114 "stonith-timeout", NULL,
"time", NULL,
116 N_(
"*** Advanced Use Only *** Unused by Pacemaker"),
117 N_(
"This value is not used by Pacemaker, but is kept for backward " 118 "compatibility, and certain legacy fence agents might use it.")
123 N_(
"Whether watchdog integration is enabled"),
124 N_(
"This is set automatically by the cluster according to whether SBD " 125 "is detected to be in use. User-configured values are ignored. " 126 "The value `true` is meaningful if diskless SBD is used and " 127 "`stonith-watchdog-timeout` is nonzero. In that case, if fencing " 128 "is required, watchdog-based self-fencing will be performed via " 129 "SBD without requiring a fencing resource explicitly configured.")
132 "concurrent-fencing", NULL,
"boolean", NULL,
134 N_(
"Allow performing fencing operations in parallel"),
138 "startup-fencing", NULL,
"boolean", NULL,
140 N_(
"*** Advanced Use Only *** Whether to fence unseen nodes at start-up"),
141 N_(
"Setting this to false may lead to a \"split-brain\" situation," 142 "potentially leading to data loss and/or service unavailability.")
147 N_(
"Apply fencing delay targeting the lost nodes with the highest total resource priority"),
148 N_(
"Apply specified delay for the fencings that are targeting the lost " 149 "nodes with the highest total resource priority in case we don't " 150 "have the majority of the nodes in our cluster partition, so that " 151 "the more significant nodes potentially win any fencing match, " 152 "which is especially meaningful under split-brain of 2-node " 153 "cluster. A promoted resource instance takes the base priority + 1 " 154 "on calculation if the base priority is not 0. Any static/random " 155 "delays that are introduced by `pcmk_delay_base/max` configured " 156 "for the corresponding fencing resources will be added to this " 157 "delay. This delay should be significantly greater than, safely " 158 "twice, the maximum `pcmk_delay_base/max`. By default, priority " 159 "fencing delay is disabled.")
164 N_(
"How long to wait for a node that has joined the cluster to join " 165 "the controller process group"),
166 N_(
"Fence nodes that do not join the controller process group within " 167 "this much time after joining the cluster, to allow the cluster " 168 "to continue managing resources. A value of 0 means never fence " 169 "pending nodes. Setting the value to 2h means fence nodes after " 173 "cluster-delay", NULL,
"time", NULL,
175 N_(
"Maximum time for node-to-node communication"),
176 N_(
"The node elected Designated Controller (DC) will consider an action " 177 "failed if it does not get a response from the node executing the " 178 "action within this time (after considering the action's own " 179 "timeout). The \"correct\" value will depend on the speed and " 180 "load of your network and cluster nodes.")
183 "batch-limit", NULL,
"integer", NULL,
185 N_(
"Maximum number of jobs that the cluster may execute in parallel " 187 N_(
"The \"correct\" value will depend on the speed and load of your " 188 "network and cluster nodes. If set to 0, the cluster will " 189 "impose a dynamically calculated limit when any node has a " 193 "migration-limit", NULL,
"integer", NULL,
195 N_(
"The number of live migration actions that the cluster is allowed " 196 "to execute in parallel on a node (-1 means no limit)")
201 "stop-all-resources", NULL,
"boolean", NULL,
203 N_(
"Whether the cluster should stop all active resources"),
207 "stop-orphan-resources", NULL,
"boolean", NULL,
209 N_(
"Whether to stop resources that were removed from the configuration"),
213 "stop-orphan-actions", NULL,
"boolean", NULL,
215 N_(
"Whether to cancel recurring actions removed from the configuration"),
219 "remove-after-stop", NULL,
"boolean", NULL,
221 N_(
"*** Deprecated *** Whether to remove stopped resources from " 223 N_(
"Values other than default are poorly tested and potentially dangerous." 224 " This option will be removed in a future release.")
229 "pe-error-series-max", NULL,
"integer", NULL,
231 N_(
"The number of scheduler inputs resulting in errors to save"),
232 N_(
"Zero to disable, -1 to store unlimited.")
235 "pe-warn-series-max", NULL,
"integer", NULL,
237 N_(
"The number of scheduler inputs resulting in warnings to save"),
238 N_(
"Zero to disable, -1 to store unlimited.")
241 "pe-input-series-max", NULL,
"integer", NULL,
243 N_(
"The number of scheduler inputs without errors or warnings to save"),
244 N_(
"Zero to disable, -1 to store unlimited.")
254 N_(
"How cluster should react to node health attributes"),
255 N_(
"Requires external entities to create node attributes (named with " 256 "the prefix \"#health\") with values \"red\", " 257 "\"yellow\", or \"green\".")
262 N_(
"Base health score assigned to a node"),
263 N_(
"Only used when \"node-health-strategy\" is set to \"progressive\".")
268 N_(
"The score to use for a node health attribute whose value is \"green\""),
269 N_(
"Only used when \"node-health-strategy\" is set to \"custom\" or \"progressive\".")
274 N_(
"The score to use for a node health attribute whose value is \"yellow\""),
275 N_(
"Only used when \"node-health-strategy\" is set to \"custom\" or \"progressive\".")
280 N_(
"The score to use for a node health attribute whose value is \"red\""),
281 N_(
"Only used when \"node-health-strategy\" is set to \"custom\" or \"progressive\".")
286 "placement-strategy", NULL,
"select",
287 "default, utilization, minimal, balanced",
288 "default", check_placement_strategy,
289 N_(
"How the cluster should allocate resources to nodes"),
297 const char *desc_short =
"Pacemaker scheduler options";
298 const char *desc_long =
"Cluster options used by Pacemaker's scheduler";
322 const char *
result =
"<unknown>";
350 result =
"restart-container";
407 const char *
result =
"<unknown>";
468 #ifdef PCMK__COMPAT_2_0 475 #ifdef PCMK__COMPAT_2_0 503 crm_err(
"Unknown role: %s", role);
512 crm_trace(
"Adding name='%s' value='%s' to hash table",
513 pcmk__s(
name,
"<null>"), pcmk__s(value,
"<null>"));
514 if (
name == NULL || value == NULL) {
520 }
else if (g_hash_table_lookup(hash,
name) == NULL) {
521 g_hash_table_insert(hash, strdup(
name), strdup(value));
552 bool is_guest = (node != NULL)
556 const char *source = NULL;
557 const char *node_type_s = NULL;
558 const char *reason = NULL;
564 && (!force_host || is_guest));
580 node_type_s =
"assigned";
583 reason =
"not assigned";
588 node_type_s =
"current";
605 const char *value = g_hash_table_lookup(
host->details->attrs,
name);
608 "%s: Value lookup for %s on %s container host %s %s%s",
609 rsc->
id,
name, node_type_s, pe__node_name(
host),
610 ((value != NULL)?
"succeeded: " :
"failed"),
615 "%s: Not looking for %s on %s container host: %s is %s",
616 rsc->
id,
name, node_type_s, container->
id, reason);
#define CRM_CHECK(expr, failure_action)
void add_hash_param(GHashTable *hash, const char *name, const char *value)
GHashTable * attrs
Node attributes.
node_type
Possible node types.
#define XML_CONFIG_ATTR_SHUTDOWN_LOCK
#define PCMK__VALUE_MIGRATE_ON_RED
#define PCMK__ROLE_STARTED
bool pcmk__strcase_any_of(const char *s,...) G_GNUC_NULL_TERMINATED
#define XML_CONFIG_ATTR_PRIORITY_FENCING_DELAY
Ban resource from current node.
const char * pe_node_attribute_raw(const pcmk_node_t *node, const char *name)
Fence resource's node.
#define PCMK_ACTION_MONITOR
GHashTable * meta
Resource's meta-attributes.
#define PCMK_ACTION_DO_SHUTDOWN
action_tasks
Possible actions (including some pseudo-actions)
action_fail_response
Possible responses to a resource action failure.
const char * task2text(enum action_tasks task)
#define XML_CONFIG_ATTR_NODE_PENDING_TIMEOUT
Where resource is assigned.
pcmk_resource_t * container
Resource containing this one, if any.
Demote if promotable, else stop.
#define XML_RSC_ATTR_TARGET
gboolean was_processing_error
#define PCMK__CONCURRENT_FENCING_DEFAULT
#define PCMK__ROLE_PROMOTED
gboolean was_processing_warning
Stop resource and leave stopped.
#define PCMK__ROLE_PROMOTED_LEGACY
enum rsc_role_e text2role(const char *role)
#define PCMK_ACTION_DEMOTE
#define PCMK_ACTION_REBOOT
#define PCMK__VALUE_ONLY_GREEN
bool pcmk__valid_quorum(const char *value)
#define XML_CONFIG_ATTR_SHUTDOWN_LOCK_LIMIT
bool pcmk__valid_interval_spec(const char *value)
Put resource's node in standby.
Restart resource's container.
Implementation of pcmk_resource_t.
const char * role2text(enum rsc_role_e role)
#define PCMK__ROLE_UNPROMOTED_LEGACY
#define PCMK__OPT_NODE_HEALTH_BASE
#define PCMK__ROLE_UNPROMOTED
#define PCMK__OPT_NODE_HEALTH_RED
#define crm_trace(fmt, args...)
#define PCMK__ROLE_STOPPED
void pe_metadata(pcmk__output_t *out)
gchar * pcmk__format_option_metadata(const char *name, const char *desc_short, const char *desc_long, pcmk__cluster_option_t *option_list, int len)
int(*) int(*) void(*) void(* output_xml)(pcmk__output_t *out, const char *name, const char *buf)
struct pe_node_shared_s * details
Basic node information.
const char * pcmk__cluster_option(GHashTable *options, const pcmk__cluster_option_t *option_list, int len, const char *name)
#define PCMK_ACTION_START
Wrappers for and extensions to libxml2.
#define PCMK__OPT_NODE_HEALTH_GREEN
const char * pe__node_attribute_calculated(const pcmk_node_t *node, const char *name, const pcmk_resource_t *rsc, enum pcmk__rsc_node node_type, bool force_host)
#define PCMK_ACTION_STONITH
#define PCMK_ACTION_NOTIFIED
Implementation of pcmk_node_t.
#define PCMK__OPT_NODE_HEALTH_STRATEGY
void verify_pe_options(GHashTable *options)
Unspecified or unknown action.
const char * pe_pref(GHashTable *options, const char *name)
bool pcmk__valid_boolean(const char *value)
#define PCMK__OPT_NODE_HEALTH_YELLOW
bool pcmk__is_fencing_action(const char *action)
#define PCMK__ROLE_UNKNOWN
pcmk__action_result_t result
#define PCMK__VALUE_PROGRESSIVE
#define crm_err(fmt, args...)
#define PCMK_ACTION_STOPPED
#define XML_ATTR_HAVE_WATCHDOG
This structure contains everything that makes up a single output formatter.
bool pcmk__valid_number(const char *value)
pcmk_node_t * allocated_to
Node resource is assigned to.
#define PCMK_ACTION_PROMOTE
GList * running_on
Nodes where resource may be active.
enum action_tasks text2task(const char *task)
#define PCMK_ACTION_PROMOTED
void pcmk__validate_cluster_options(GHashTable *options, pcmk__cluster_option_t *option_list, int len)
Treat resource as unmanaged.
Resource role is unknown.
#define pe_rsc_trace(rsc, fmt, args...)
#define PCMK_ACTION_RUNNING
#define PCMK_ACTION_DEMOTED
const char * fail2text(enum action_fail_response fail)
#define PCMK__VALUE_CUSTOM
enum node_type type
Node variant.
bool pcmk__validate_health_strategy(const char *value)
Act as if failure didn't happen.
pcmk_resource_t * remote_rsc
Remote connection resource for node, if it is a Pacemaker Remote node.
#define PCMK_ACTION_NOTIFY
char * id
Resource ID in configuration.
Where resource is running.