Skip to content

Commit

Permalink
Feature: scheduler: add priority-fencing-delay cluster option
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gao-yan committed Apr 17, 2020
1 parent 63d2d79 commit fb48eaa
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/crm/msg_xml.h
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@
# define XML_CONFIG_ATTR_FORCE_QUIT "shutdown-escalation"
# define XML_CONFIG_ATTR_RECHECK "cluster-recheck-interval"
# define XML_CONFIG_ATTR_FENCE_REACTION "fence-reaction"
# define XML_CONFIG_ATTR_PRIORITY_FENCING_DELAY "priority-fencing-delay"

# define XML_ALERT_ATTR_PATH "path"
# define XML_ALERT_ATTR_TIMEOUT "timeout"
Expand Down
17 changes: 17 additions & 0 deletions lib/pengine/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,23 @@ pe_cluster_option pe_opts[] = {
"Allow performing fencing operations in parallel", NULL },
{ "startup-fencing", "startup_fencing", "boolean", NULL, "true", &check_boolean,
"STONITH unseen nodes", "Advanced Use Only! Not using the default is very unsafe!" },
{
XML_CONFIG_ATTR_PRIORITY_FENCING_DELAY, NULL, "time", NULL,
NULL, &check_timer,
"Enforced fencing delay targeting the lost nodes with the highest total resource priority",
"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."
},

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

0 comments on commit fb48eaa

Please sign in to comment.