Skip to content

Commit 0e8a8d4

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

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
@@ -241,21 +241,21 @@ indexterm:[Cluster,Option,concurrent-fencing]
241241
Is the cluster allowed to initiate multiple fence actions concurrently?
242242
'(since 1.1.15)'
243243

244-
| priority-fencing-delay | |
244+
| priority-fencing-delay | 0 |
245245
indexterm:[priority-fencing-delay,Cluster Option]
246246
indexterm:[Cluster,Option,priority-fencing-delay]
247-
Enforce specified delay for the fencings that are targeting the lost
247+
Apply specified delay for the fencings that are targeting the lost
248248
nodes with the highest total resource priority in case we don't
249249
have the majority of the nodes in our cluster partition, so that
250250
the more significant nodes potentially win any fencing match,
251251
which is especially meaningful under split-brain of 2-node
252252
cluster. A promoted resource instance takes the base priority + 1
253-
on calculation if the base priority is not 0. If all the nodes
254-
have equal priority, then any pcmk_delay_base/max configured for
255-
the corresponding fencing resources will be applied. Otherwise as
256-
long as it's set, even if to 0, it takes precedence over any
257-
configured pcmk_delay_base/max. By default, priority fencing
258-
delay is disabled.
253+
on calculation if the base priority is not 0. Any static/random
254+
delays that are introduced by `pcmk_delay_base/max` configured
255+
for the corresponding fencing resources will be added to this
256+
delay. This delay should be significantly greater than, safely
257+
twice, the maximum `pcmk_delay_base/max`. By default, priority
258+
fencing delay is disabled. '(since 1.1.23)'
259259

260260
| cluster-delay | 60s |
261261
indexterm:[cluster-delay,Cluster Option]

include/crm/pengine/status.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ typedef struct pe_working_set_s {
153153
GList *param_check; // History entries that need to be checked
154154
GList *stop_needed; // Containers that need stop actions
155155
int ninstances; // Total number of resource instances
156-
int priority_fencing_delay; // Enforced priority fencing delay
156+
int priority_fencing_delay; // Priority fencing delay
157157
} pe_working_set_t;
158158

159159
enum pe_check_parameters {

lib/pengine/common.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -123,20 +123,20 @@ pe_cluster_option pe_opts[] = {
123123
"STONITH unseen nodes", "Advanced Use Only! Not using the default is very unsafe!" },
124124
{
125125
XML_CONFIG_ATTR_PRIORITY_FENCING_DELAY, NULL, "time", NULL,
126-
NULL, &check_timer,
127-
"Enforced fencing delay targeting the lost nodes with the highest total resource priority",
128-
"Enforce specified delay for the fencings that are targeting the lost "
126+
"0", &check_timer,
127+
"Apply fencing delay targeting the lost nodes with the highest total resource priority",
128+
"Apply specified delay for the fencings that are targeting the lost "
129129
"nodes with the highest total resource priority in case we don't "
130130
"have the majority of the nodes in our cluster partition, so that "
131131
"the more significant nodes potentially win any fencing match, "
132132
"which is especially meaningful under split-brain of 2-node "
133133
"cluster. A promoted resource instance takes the base priority + 1 "
134-
"on calculation if the base priority is not 0. If all the nodes "
135-
"have equal priority, then any pcmk_delay_base/max configured for "
136-
"the corresponding fencing resources will be applied. Otherwise as "
137-
"long as it's set, even if to 0, it takes precedence over any "
138-
"configured pcmk_delay_base/max. By default, priority fencing "
139-
"delay is disabled."
134+
"on calculation if the base priority is not 0. Any static/random "
135+
"delays that are introduced by `pcmk_delay_base/max` configured "
136+
"for the corresponding fencing resources will be added to this "
137+
"delay. This delay should be significantly greater than, safely "
138+
"twice, the maximum `pcmk_delay_base/max`. By default, priority "
139+
"fencing delay is disabled."
140140
},
141141

142142
/* Timeouts etc */

lib/pengine/unpack.c

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

229-
// Default value -1 means `priority-fencing-delay` is disabled
230-
data_set->priority_fencing_delay = -1;
231229
value = pe_pref(data_set->config_hash,
232230
XML_CONFIG_ATTR_PRIORITY_FENCING_DELAY);
233231
if (value) {

0 commit comments

Comments
 (0)