 |
pacemaker
2.0.3-4b1f869f0f
Scalable High-Availability cluster resource manager
|
Go to the documentation of this file.
22 check_health(
const char *value)
43 check_stonith_action(
const char *value)
58 check_placement_strategy(
const char *value)
78 {
"no-quorum-policy", NULL,
"enum",
"stop, freeze, ignore, demote, suicide",
"stop", &
check_quorum,
79 "What to do when the cluster does not have quorum", NULL },
80 {
"symmetric-cluster", NULL,
"boolean", NULL,
"true", &
check_boolean,
81 "All resources can run anywhere by default", NULL },
82 {
"maintenance-mode", NULL,
"boolean", NULL,
"false", &
check_boolean,
83 "Should the cluster monitor resources and start/stop them as required", NULL },
84 {
"start-failure-is-fatal", NULL,
"boolean", NULL,
"true", &
check_boolean,
"Always treat start failures as fatal",
85 "When set to TRUE, the cluster will immediately ban a resource from a node if it fails to start there. When FALSE, the cluster will instead check the resource's fail count against its migration-threshold." },
86 {
"enable-startup-probes", NULL,
"boolean", NULL,
"true", &
check_boolean,
87 "Should the cluster check for active resources during startup", NULL },
90 {
"stonith-enabled", NULL,
"boolean", NULL,
"true", &
check_boolean,
91 "Failed nodes are STONITH'd", NULL },
92 {
"stonith-action", NULL,
"enum",
"reboot, off, poweroff",
"reboot", &check_stonith_action,
93 "Action to send to STONITH device ('poweroff' is a deprecated alias for 'off')", NULL },
94 {
"stonith-timeout", NULL,
"time", NULL,
"60s", &
check_timer,
95 "How long to wait for the STONITH action (reboot,on,off) to complete", NULL },
97 "Enable watchdog integration",
"Set automatically by the cluster if SBD is detected. User configured values are ignored." },
98 {
"concurrent-fencing", NULL,
"boolean", NULL,
99 #ifdef DEFAULT_CONCURRENT_FENCING_TRUE
105 "Allow performing fencing operations in parallel", NULL },
106 {
"startup-fencing", NULL,
"boolean", NULL,
"true", &
check_boolean,
107 "STONITH unseen nodes",
"Advanced Use Only! Not using the default is very unsafe!" },
110 {
"cluster-delay", NULL,
"time", NULL,
"60s", &
check_time,
111 "Round trip delay over the network (excluding action execution)",
112 "The \"correct\" value will depend on the speed and load of your network and cluster nodes." },
113 {
"batch-limit", NULL,
"integer", NULL,
"0", &
check_number,
114 "The number of jobs that the TE is allowed to execute in parallel",
115 "The \"correct\" value will depend on the speed and load of your network and cluster nodes." },
116 {
"migration-limit", NULL,
"integer", NULL,
"-1", &
check_number,
117 "The number of migration jobs that the TE is allowed to execute in parallel on a node"},
120 {
"stop-all-resources", NULL,
"boolean", NULL,
"false", &
check_boolean,
121 "Should the cluster stop all active resources", NULL },
122 {
"stop-orphan-resources", NULL,
"boolean", NULL,
"true", &
check_boolean,
123 "Should deleted resources be stopped", NULL },
124 {
"stop-orphan-actions", NULL,
"boolean", NULL,
"true", &
check_boolean,
125 "Should deleted actions be cancelled", NULL },
126 {
"remove-after-stop", NULL,
"boolean", NULL,
"false", &
check_boolean,
127 "Remove resources from the executor after they are stopped",
128 "Always set this to false. Other values are, at best, poorly tested and potentially dangerous." },
133 "pe-error-series-max", NULL,
"integer", NULL,
"-1", &
check_number,
134 "The number of scheduler inputs resulting in ERRORs to save",
135 "Zero to disable, -1 to store unlimited"
138 "pe-warn-series-max", NULL,
"integer", NULL,
"5000", &
check_number,
139 "The number of scheduler inputs resulting in WARNINGs to save",
140 "Zero to disable, -1 to store unlimited"
143 "pe-input-series-max", NULL,
"integer", NULL,
"4000", &
check_number,
144 "The number of other scheduler inputs to save",
145 "Zero to disable, -1 to store unlimited"
149 {
"node-health-strategy", NULL,
"enum",
"none, migrate-on-red, only-green, progressive, custom",
"none", &check_health,
150 "The strategy combining node attributes to determine overall node health.",
151 "Requires external entities to create node attributes (named with the prefix '#health') with values: 'red', 'yellow' or 'green'."},
152 {
"node-health-base", NULL,
"integer", NULL,
"0", &
check_number,
153 "The base score assigned to a node",
154 "Only used when node-health-strategy is set to progressive." },
155 {
"node-health-green", NULL,
"integer", NULL,
"0", &
check_number,
156 "The score 'green' translates to in rsc_location constraints",
157 "Only used when node-health-strategy is set to custom or progressive." },
158 {
"node-health-yellow", NULL,
"integer", NULL,
"0", &
check_number,
159 "The score 'yellow' translates to in rsc_location constraints",
160 "Only used when node-health-strategy is set to custom or progressive." },
161 {
"node-health-red", NULL,
"integer", NULL,
"-INFINITY", &
check_number,
162 "The score 'red' translates to in rsc_location constraints",
163 "Only used when node-health-strategy is set to custom or progressive." },
166 {
"placement-strategy", NULL,
"enum",
"default, utilization, minimal, balanced",
"default", &check_placement_strategy,
167 "The strategy to determine resource placement", NULL},
175 "Cluster properties used by Pacemaker's scheduler,"
176 " formerly known as pengine",
177 pe_opts,
DIMOF(pe_opts));
187 pe_pref(GHashTable * options,
const char *name)
195 const char *result =
"<unknown>";
223 result =
"restart-container";
226 result =
"reset-remote";
278 crm_trace(
"Unsupported action: %s", task);
287 const char *result =
"<unknown>";
291 result =
"no_action";
373 crm_err(
"Unknown role: %s", role);
380 int result = w1 + w2;
384 crm_trace(
"-INFINITY + INFINITY == -INFINITY");
394 if (w1 <= 0 && w2 < 0) {
398 }
else if (w1 > 0 && w2 > 0) {
410 crm_trace(
"%d + %d = %d", w1, w2, result);
420 if (name == NULL || value == NULL) {
426 }
else if (g_hash_table_lookup(hash, name) == NULL) {
427 g_hash_table_insert(hash, strdup(name), strdup(value));
440 }
else if(rsc == NULL) {
445 if(source == NULL ||
safe_str_eq(
"host", source) == FALSE) {
462 return g_hash_table_lookup(
host->details->attrs, name);
465 pe_rsc_trace(rsc,
"%s: Not looking for %s on the container host: %s is inactive",
#define RSC_ROLE_STARTED_S
int merge_weights(int w1, int w2)
#define CRMD_ACTION_DEMOTED
#define CRMD_ACTION_PROMOTED
const char * pe_node_attribute_raw(pe_node_t *node, const char *name)
#define CRMD_ACTION_STARTED
pe_resource_t * remote_rsc
#define CRMD_ACTION_NOTIFY
#define CRMD_ACTION_DELETE
#define CRMD_ACTION_STOPPED
const char * fail2text(enum action_fail_response fail)
#define CRM_CHECK(expr, failure_action)
const char * task2text(enum action_tasks task)
struct pe_node_shared_s * details
#define crm_err(fmt, args...)
#define crm_trace(fmt, args...)
#define safe_str_eq(a, b)
gboolean was_processing_error
Wrappers for and extensions to libxml2.
#define CRMD_ACTION_CANCEL
void add_hash_param(GHashTable *hash, const char *name, const char *value)
enum rsc_role_e text2role(const char *role)
#define CRM_OP_LRM_REFRESH
gboolean check_number(const char *value)
#define CRMD_ACTION_MIGRATED
@ action_fail_reset_remote
#define CRMD_ACTION_START
#define CRMD_ACTION_MIGRATE
#define RSC_ROLE_MASTER_S
const char * role2text(enum rsc_role_e role)
void config_metadata(const char *name, const char *version, const char *desc_short, const char *desc_long, pe_cluster_option *option_list, int len)
@ action_fail_restart_container
gboolean check_time(const char *value)
gboolean was_processing_warning
gboolean check_quorum(const char *value)
const char * pe_pref(GHashTable *options, const char *name)
gboolean check_boolean(const char *value)
void verify_pe_options(GHashTable *options)
#define CRMD_ACTION_NOTIFIED
pe_resource_t * container
const char * pe_node_attribute_calculated(const pe_node_t *node, const char *name, const resource_t *rsc)
#define RSC_ROLE_STOPPED_S
#define RSC_ROLE_UNKNOWN_S
const char * get_cluster_pref(GHashTable *options, pe_cluster_option *option_list, int len, const char *name)
#define pe_rsc_trace(rsc, fmt, args...)
#define CRMD_ACTION_DEMOTE
gboolean check_timer(const char *value)
#define CRMD_ACTION_STATUS
enum action_tasks text2task(const char *task)
#define XML_ATTR_HAVE_WATCHDOG
void verify_all_options(GHashTable *options, pe_cluster_option *option_list, int len)
#define CRMD_ACTION_PROMOTE
#define XML_RSC_ATTR_TARGET