Skip to content

Commit fb48eaa

Browse files
committed
Feature: scheduler: add priority-fencing-delay cluster option
This feature addresses the relevant topics and implements the ideas brought up from: ClusterLabs/fence-agents#308 This commit adds priority-fencing-delay option (just the option, not the feature itself). Enforce specified delay for the fencings that are targeting the lost nodes with the highest total resource priority in case we don't have the majority of the nodes in our cluster partition, so that the more significant nodes potentially win any fencing match, which is especially meaningful under split-brain of 2-node cluster. A promoted resource instance takes the base priority + 1 on calculation if the base priority is not 0. If all the nodes have equal priority, then any pcmk_delay_base/max configured for the corresponding fencing resources will be applied. Otherwise as long as it's set, even if to 0, it takes precedence over any configured pcmk_delay_base/max. By default, priority fencing delay is disabled.
1 parent 63d2d79 commit fb48eaa

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

include/crm/msg_xml.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@
378378
# define XML_CONFIG_ATTR_FORCE_QUIT "shutdown-escalation"
379379
# define XML_CONFIG_ATTR_RECHECK "cluster-recheck-interval"
380380
# define XML_CONFIG_ATTR_FENCE_REACTION "fence-reaction"
381+
# define XML_CONFIG_ATTR_PRIORITY_FENCING_DELAY "priority-fencing-delay"
381382

382383
# define XML_ALERT_ATTR_PATH "path"
383384
# define XML_ALERT_ATTR_TIMEOUT "timeout"

lib/pengine/common.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,23 @@ pe_cluster_option pe_opts[] = {
121121
"Allow performing fencing operations in parallel", NULL },
122122
{ "startup-fencing", "startup_fencing", "boolean", NULL, "true", &check_boolean,
123123
"STONITH unseen nodes", "Advanced Use Only! Not using the default is very unsafe!" },
124+
{
125+
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 "
129+
"nodes with the highest total resource priority in case we don't "
130+
"have the majority of the nodes in our cluster partition, so that "
131+
"the more significant nodes potentially win any fencing match, "
132+
"which is especially meaningful under split-brain of 2-node "
133+
"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."
140+
},
124141

125142
/* Timeouts etc */
126143
{ "cluster-delay", "transition_idle_timeout", "time", NULL, "60s", &check_time,

0 commit comments

Comments
 (0)