24 check_placement_strategy(
const char *value)
37 "no-quorum-policy", NULL,
"select",
"stop, freeze, ignore, demote, suicide",
39 "What to do when the cluster does not have quorum",
43 "symmetric-cluster", NULL,
"boolean", NULL,
45 "Whether resources can run on any node by default",
49 "maintenance-mode", NULL,
"boolean", NULL,
51 "Whether the cluster should refrain from monitoring, starting, " 52 "and stopping resources",
56 "start-failure-is-fatal", NULL,
"boolean", NULL,
58 "Whether a start failure should prevent a resource from being " 59 "recovered on the same node",
60 "When true, the cluster will immediately ban a resource from a node " 61 "if it fails to start there. When false, the cluster will instead " 62 "check the resource's fail count against its migration-threshold." 65 "enable-startup-probes", NULL,
"boolean", NULL,
67 "Whether the cluster should check for active resources during start-up",
73 "Whether to lock resources to a cleanly shut down node",
74 "When true, resources active on a node when it is cleanly shut down " 75 "are kept \"locked\" to that node (not allowed to run elsewhere) " 76 "until they start again on that node after it rejoins (or for at " 77 "most shutdown-lock-limit, if set). Stonith resources and " 78 "Pacemaker Remote connections are never locked. Clone and bundle " 79 "instances and the promoted role of promotable clones are currently" 80 " never locked, though support could be added in a future release." 85 "Do not lock resources to a cleanly shut down node longer than this",
86 "If shutdown-lock is true and this is set to a nonzero time duration, " 87 "shutdown locks will expire after this much time has passed since " 88 "the shutdown was initiated, even if the node has not rejoined." 93 "stonith-enabled", NULL,
"boolean", NULL,
95 "*** Advanced Use Only *** " 96 "Whether nodes may be fenced as part of recovery",
97 "If false, unresponsive nodes are immediately assumed to be harmless, " 98 "and resources that were active on them may be recovered " 99 "elsewhere. This can result in a \"split-brain\" situation, " 100 "potentially leading to data loss and/or service unavailability." 103 "stonith-action", NULL,
"select",
"reboot, off, poweroff",
105 "Action to send to fence device when a node needs to be fenced " 106 "(\"poweroff\" is a deprecated alias for \"off\")",
110 "stonith-timeout", NULL,
"time", NULL,
112 "*** Advanced Use Only *** Unused by Pacemaker",
113 "This value is not used by Pacemaker, but is kept for backward " 114 "compatibility, and certain legacy fence agents might use it." 119 N_(
"Whether watchdog integration is enabled"),
120 "This is set automatically by the cluster according to whether SBD " 121 "is detected to be in use. User-configured values are ignored. " 122 "The value `true` is meaningful if diskless SBD is used and " 123 "`stonith-watchdog-timeout` is nonzero. In that case, if fencing " 124 "is required, watchdog-based self-fencing will be performed via " 125 "SBD without requiring a fencing resource explicitly configured." 128 "concurrent-fencing", NULL,
"boolean", NULL,
130 "Allow performing fencing operations in parallel",
134 "startup-fencing", NULL,
"boolean", NULL,
136 "*** Advanced Use Only *** Whether to fence unseen nodes at start-up",
137 "Setting this to false may lead to a \"split-brain\" situation," 138 "potentially leading to data loss and/or service unavailability." 143 "Apply fencing delay targeting the lost nodes with the highest total resource priority",
144 "Apply specified delay for the fencings that are targeting the lost " 145 "nodes with the highest total resource priority in case we don't " 146 "have the majority of the nodes in our cluster partition, so that " 147 "the more significant nodes potentially win any fencing match, " 148 "which is especially meaningful under split-brain of 2-node " 149 "cluster. A promoted resource instance takes the base priority + 1 " 150 "on calculation if the base priority is not 0. Any static/random " 151 "delays that are introduced by `pcmk_delay_base/max` configured " 152 "for the corresponding fencing resources will be added to this " 153 "delay. This delay should be significantly greater than, safely " 154 "twice, the maximum `pcmk_delay_base/max`. By default, priority " 155 "fencing delay is disabled." 159 "cluster-delay", NULL,
"time", NULL,
161 "Maximum time for node-to-node communication",
162 "The node elected Designated Controller (DC) will consider an action " 163 "failed if it does not get a response from the node executing the " 164 "action within this time (after considering the action's own " 165 "timeout). The \"correct\" value will depend on the speed and " 166 "load of your network and cluster nodes." 169 "batch-limit", NULL,
"integer", NULL,
171 "Maximum number of jobs that the cluster may execute in parallel " 173 "The \"correct\" value will depend on the speed and load of your " 174 "network and cluster nodes. If set to 0, the cluster will " 175 "impose a dynamically calculated limit when any node has a " 179 "migration-limit", NULL,
"integer", NULL,
181 "The number of live migration actions that the cluster is allowed " 182 "to execute in parallel on a node (-1 means no limit)" 187 "stop-all-resources", NULL,
"boolean", NULL,
189 "Whether the cluster should stop all active resources",
193 "stop-orphan-resources", NULL,
"boolean", NULL,
195 "Whether to stop resources that were removed from the configuration",
199 "stop-orphan-actions", NULL,
"boolean", NULL,
201 "Whether to cancel recurring actions removed from the configuration",
205 "remove-after-stop", NULL,
"boolean", NULL,
207 "*** Deprecated *** Whether to remove stopped resources from " 209 "Values other than default are poorly tested and potentially dangerous." 210 " This option will be removed in a future release." 215 "pe-error-series-max", NULL,
"integer", NULL,
217 "The number of scheduler inputs resulting in errors to save",
218 "Zero to disable, -1 to store unlimited." 221 "pe-warn-series-max", NULL,
"integer", NULL,
223 "The number of scheduler inputs resulting in warnings to save",
224 "Zero to disable, -1 to store unlimited." 227 "pe-input-series-max", NULL,
"integer", NULL,
229 "The number of scheduler inputs without errors or warnings to save",
230 "Zero to disable, -1 to store unlimited." 240 "How cluster should react to node health attributes",
241 "Requires external entities to create node attributes (named with " 248 "Base health score assigned to a node",
255 "The score to use for a node health attribute whose value is \"" 263 "The score to use for a node health attribute whose value is \"" 271 "The score to use for a node health attribute whose value is \"" 279 "placement-strategy", NULL,
"select",
280 "default, utilization, minimal, balanced",
281 "default", check_placement_strategy,
282 "How the cluster should allocate resources to nodes",
291 "Pacemaker scheduler options",
292 "Cluster options used by Pacemaker's scheduler",
313 const char *
result =
"<unknown>";
341 result =
"restart-container";
394 crm_trace(
"Unsupported action: %s", task);
403 const char *
result =
"<unknown>";
464 #ifdef PCMK__COMPAT_2_0 470 #ifdef PCMK__COMPAT_2_0 499 crm_err(
"Unknown role: %s", role);
509 if (
name == NULL || value == NULL) {
515 }
else if (g_hash_table_lookup(hash,
name) == NULL) {
516 g_hash_table_insert(hash, strdup(
name), strdup(value));
529 }
else if(rsc == NULL) {
551 return g_hash_table_lookup(
host->details->attrs,
name);
554 pe_rsc_trace(rsc,
"%s: Not looking for %s on the container host: %s is inactive",
#define CRM_CHECK(expr, failure_action)
#define RSC_ROLE_UNPROMOTED_S
void add_hash_param(GHashTable *hash, const char *name, const char *value)
#define CRMD_ACTION_MIGRATED
#define XML_CONFIG_ATTR_SHUTDOWN_LOCK
#define PCMK__VALUE_MIGRATE_ON_RED
#define PCMK__VALUE_GREEN
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
const char * pe_node_attribute_raw(pe_node_t *node, const char *name)
#define CRMD_ACTION_PROMOTE
#define RSC_ROLE_PROMOTED_LEGACY_S
int(*) void(*) void(* output_xml)(pcmk__output_t *out, const char *name, const char *buf)
const char * task2text(enum action_tasks task)
#define XML_RSC_ATTR_TARGET
char * pcmk__format_option_metadata(const char *name, const char *desc_short, const char *desc_long, pcmk__cluster_option_t *option_list, int len)
gboolean was_processing_error
#define PCMK__CONCURRENT_FENCING_DEFAULT
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
#define PCMK__VALUE_ONLY_GREEN
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 PCMK__OPT_NODE_HEALTH_BASE
#define PCMK__OPT_NODE_HEALTH_RED
#define crm_trace(fmt, args...)
#define RSC_ROLE_UNPROMOTED_LEGACY_S
void pe_metadata(pcmk__output_t *out)
struct pe_node_shared_s * details
Wrappers for and extensions to libxml2.
#define PCMK__OPT_NODE_HEALTH_GREEN
bool pcmk__is_fencing_action(const char *action)
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)
#define RSC_ROLE_PROMOTED_S
#define PCMK__OPT_NODE_HEALTH_STRATEGY
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 PCMK__OPT_NODE_HEALTH_YELLOW
pcmk__action_result_t result
#define PCMK__VALUE_PROGRESSIVE
#define crm_err(fmt, args...)
#define XML_ATTR_HAVE_WATCHDOG
This structure contains everything that makes up a single output formatter.
bool pcmk__valid_number(const char *value)
#define CRMD_ACTION_MIGRATE
#define RSC_ROLE_STOPPED_S
rsc_role_e
Possible roles that a resource can be in.
enum action_tasks text2task(const char *task)
#define PCMK__VALUE_YELLOW
#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 PCMK__VALUE_CUSTOM
#define CRMD_ACTION_STARTED
#define CRMD_ACTION_CANCEL
bool pcmk__validate_health_strategy(const char *value)
#define CRMD_ACTION_DELETE
#define CRMD_ACTION_STATUS