Skip to content

Commit 5d62bd4

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. 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 ef12081 commit 5d62bd4

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

include/crm/msg_xml.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ extern "C" {
348348
# define XML_CONFIG_ATTR_FENCE_REACTION "fence-reaction"
349349
# define XML_CONFIG_ATTR_SHUTDOWN_LOCK "shutdown-lock"
350350
# define XML_CONFIG_ATTR_SHUTDOWN_LOCK_LIMIT "shutdown-lock-limit"
351+
# define XML_CONFIG_ATTR_PRIORITY_FENCING_DELAY "priority-fencing-delay"
351352

352353
# define XML_ALERT_ATTR_PATH "path"
353354
# define XML_ALERT_ATTR_TIMEOUT "timeout"

lib/pengine/common.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,21 @@ static pcmk__cluster_option_t pe_opts[] = {
158158
"Setting this to false may lead to a \"split-brain\" situation,"
159159
"potentially leading to data loss and/or service unavailability."
160160
},
161+
{
162+
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 "
166+
"nodes with the highest total resource priority in case we don't "
167+
"have the majority of the nodes in our cluster partition, so that "
168+
"the more significant nodes potentially win any fencing match, "
169+
"which is especially meaningful under split-brain of 2-node "
170+
"cluster. If all the nodes have equal priority, then any "
171+
"pcmk_delay_base/max configured for the corresponding fencing "
172+
"resources will be applied. Otherwise as long as it's set, even if "
173+
"to 0, it takes precedence over any configured pcmk_delay_base/max."
174+
"By default, priority fencing delay is disabled."
175+
},
161176

162177
{
163178
"cluster-delay", NULL, "time", NULL,

0 commit comments

Comments
 (0)