mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
implement MinQuorum
This commit is contained in:
@@ -34,6 +34,7 @@ func (c *OperatorAutopilotSetCommand) Name() string { return "operator autopilot
|
||||
func (c *OperatorAutopilotSetCommand) Run(args []string) int {
|
||||
var cleanupDeadServers flags.BoolValue
|
||||
var maxTrailingLogs flags.UintValue
|
||||
var minQuorum flags.UintValue
|
||||
var lastContactThreshold flags.DurationValue
|
||||
var serverStabilizationTime flags.DurationValue
|
||||
var enableRedundancyZones flags.BoolValue
|
||||
@@ -50,6 +51,7 @@ func (c *OperatorAutopilotSetCommand) Run(args []string) int {
|
||||
f.Var(&enableRedundancyZones, "enable-redundancy-zones", "")
|
||||
f.Var(&disableUpgradeMigration, "disable-upgrade-migration", "")
|
||||
f.Var(&enableCustomUpgrades, "enable-custom-upgrades", "")
|
||||
f.Var(&minQuorum, "min-quorum", "")
|
||||
|
||||
if err := f.Parse(args); err != nil {
|
||||
c.Ui.Error(fmt.Sprintf("Failed to parse args: %v", err))
|
||||
@@ -80,6 +82,7 @@ func (c *OperatorAutopilotSetCommand) Run(args []string) int {
|
||||
trailing := uint(conf.MaxTrailingLogs)
|
||||
maxTrailingLogs.Merge(&trailing)
|
||||
conf.MaxTrailingLogs = uint64(trailing)
|
||||
minQuorum.Merge(&conf.MinQuorum)
|
||||
lastContactThreshold.Merge(&conf.LastContactThreshold)
|
||||
serverStabilizationTime.Merge(&conf.ServerStabilizationTime)
|
||||
|
||||
@@ -131,6 +134,10 @@ Set Config Options:
|
||||
Controls the maximum number of log entries that a server can trail
|
||||
the leader by before being considered unhealthy.
|
||||
|
||||
-min-quorum=<value>
|
||||
Controls the minimum number of servers required in a cluster
|
||||
before autopilot can prune dead servers.
|
||||
|
||||
-redundancy-zone-tag=<value>
|
||||
(Enterprise-only) Controls the node_meta tag name used for
|
||||
separating servers into different redundancy zones.
|
||||
|
||||
Reference in New Issue
Block a user