Skip to content

Commit 435d333

Browse files
committed
Feature: scheduler: priority-fencing-delay defaults to 0 meaning disabled
This commit also documents the upcoming new behavior as discussed from: #2012 `priority-fencing-delay` will combine with any static/random delays that are introduced by `pcmk_delay_base/max` configured for the corresponding fencing resources. This delay should be significantly greater than, safely twice, the maximum `pcmk_delay_base/max`. By default, priority fencing delay is disabled.
1 parent 5084024 commit 435d333

File tree

4 files changed

+18
-20
lines changed

4 files changed

+18
-20
lines changed

doc/Pacemaker_Explained/en-US/Ch-Options.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -292,21 +292,21 @@ are +stop+ to attempt to immediately stop pacemaker and stay stopped, or
292292
on failure. The default is likely to be changed to +panic+ in a future release.
293293
'(since 2.0.3)'
294294

295-
| priority-fencing-delay | |
295+
| priority-fencing-delay | 0 |
296296
indexterm:[priority-fencing-delay,Cluster Option]
297297
indexterm:[Cluster,Option,priority-fencing-delay]
298-
Enforce specified delay for the fencings that are targeting the lost
298+
Apply specified delay for the fencings that are targeting the lost
299299
nodes with the highest total resource priority in case we don't
300300
have the majority of the nodes in our cluster partition, so that
301301
the more significant nodes potentially win any fencing match,
302302
which is especially meaningful under split-brain of 2-node
303303
cluster. A promoted resource instance takes the base priority + 1
304-
on calculation if the base priority is not 0. If all the nodes
305-
have equal priority, then any pcmk_delay_base/max configured for
306-
the corresponding fencing resources will be applied. Otherwise as
307-
long as it's set, even if to 0, it takes precedence over any
308-
configured pcmk_delay_base/max. By default, priority fencing
309-
delay is disabled. '(since 2.0.4)'
304+
on calculation if the base priority is not 0. This delay will
305+
combine with any static/random delays that are introduced by
306+
`pcmk_delay_base/max` configured for the corresponding fencing
307+
resources. This delay should be significantly greater than,
308+
safely twice, the maximum `pcmk_delay_base/max`. By default,
309+
priority fencing delay is disabled. '(since 2.0.4)'
310310

311311
| cluster-delay | 60s |
312312
indexterm:[cluster-delay,Cluster Option]

include/crm/pengine/pe_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ struct pe_working_set_s {
176176
time_t recheck_by; // Hint to controller to re-run scheduler by this time
177177
int ninstances; // Total number of resource instances
178178
guint shutdown_lock;// How long (seconds) to lock resources to shutdown node
179-
int priority_fencing_delay; // Enforced priority fencing delay
179+
int priority_fencing_delay; // Priority fencing delay
180180
};
181181

182182
enum pe_check_parameters {

lib/pengine/common.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -160,20 +160,20 @@ static pcmk__cluster_option_t pe_opts[] = {
160160
},
161161
{
162162
XML_CONFIG_ATTR_PRIORITY_FENCING_DELAY, NULL, "time", NULL,
163-
NULL, pcmk__valid_interval_spec,
164-
"Enforced fencing delay targeting the lost nodes with the highest total resource priority",
165-
"Enforce specified delay for the fencings that are targeting the lost "
163+
"0", pcmk__valid_interval_spec,
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 "
166166
"nodes with the highest total resource priority in case we don't "
167167
"have the majority of the nodes in our cluster partition, so that "
168168
"the more significant nodes potentially win any fencing match, "
169169
"which is especially meaningful under split-brain of 2-node "
170170
"cluster. A promoted resource instance takes the base priority + 1 "
171-
"on calculation if the base priority is not 0. If all the nodes "
172-
"have equal priority, then any pcmk_delay_base/max configured for "
173-
"the corresponding fencing resources will be applied. Otherwise as "
174-
"long as it's set, even if to 0, it takes precedence over any "
175-
"configured pcmk_delay_base/max. By default, priority fencing "
176-
"delay is disabled."
171+
"on calculation if the base priority is not 0. This delay will "
172+
"combine with any static/random delays that are introduced by "
173+
"`pcmk_delay_base/max` configured for the corresponding fencing "
174+
"resources. This delay should be significantly greater than, "
175+
"safely twice, the maximum `pcmk_delay_base/max`. By default, "
176+
"priority fencing delay is disabled."
177177
},
178178

179179
{

lib/pengine/unpack.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,6 @@ unpack_config(xmlNode * config, pe_working_set_t * data_set)
233233
crm_debug("Concurrent fencing is %s",
234234
is_set(data_set->flags, pe_flag_concurrent_fencing) ? "enabled" : "disabled");
235235

236-
// Default value -1 means `priority-fencing-delay` is disabled
237-
data_set->priority_fencing_delay = -1;
238236
value = pe_pref(data_set->config_hash,
239237
XML_CONFIG_ATTR_PRIORITY_FENCING_DELAY);
240238
if (value) {

0 commit comments

Comments
 (0)