diff --git a/website/content/api-docs/operator/autopilot.mdx b/website/content/api-docs/operator/autopilot.mdx index cfe2ea2a9d7..fa66106ebb2 100644 --- a/website/content/api-docs/operator/autopilot.mdx +++ b/website/content/api-docs/operator/autopilot.mdx @@ -30,23 +30,23 @@ The table below shows this endpoint's support for ### Sample Request ```shell-session -$ curl \ - https://localhost:4646/v1/operator/autopilot/configuration +$ nomad operator api /v1/operator/autopilot/configuration ``` ### Sample Response ```json { - "CleanupDeadServers": true, "LastContactThreshold": "200ms", - "MaxTrailingLogs": 250, "ServerStabilizationTime": "10s", + "CleanupDeadServers": true, + "MaxTrailingLogs": 250, + "MinQuorum": 2, "EnableRedundancyZones": false, "DisableUpgradeMigration": false, "EnableCustomUpgrades": false, - "CreateIndex": 4, - "ModifyIndex": 4 + "CreateIndex": 68, + "ModifyIndex": 68 } ``` @@ -79,15 +79,14 @@ The table below shows this endpoint's support for ```json { - "CleanupDeadServers": true, "LastContactThreshold": "200ms", - "MaxTrailingLogs": 250, "ServerStabilizationTime": "10s", + "CleanupDeadServers": true, + "MaxTrailingLogs": 250, + "MinQuorum": 2, "EnableRedundancyZones": false, "DisableUpgradeMigration": false, - "EnableCustomUpgrades": false, - "CreateIndex": 4, - "ModifyIndex": 4 + "EnableCustomUpgrades": false } ``` @@ -101,6 +100,10 @@ The table below shows this endpoint's support for - `MaxTrailingLogs` `(int: 250)` specifies the maximum number of log entries that a server can trail the leader by before being considered unhealthy. +- `MinQuorum` `(int: 0)` - Sets the minimum number of servers necessary in a + cluster. Autopilot will stop pruning dead servers when this minimum is + reached. There is no default. + - `ServerStabilizationTime` `(string: "10s")` - Specifies the minimum amount of time a server must be stable in the 'healthy' state before being added to the cluster. Only takes effect if all servers are running Raft protocol version 3 @@ -136,51 +139,65 @@ The table below shows this endpoint's support for ### Sample Request ```shell-session -$ curl \ - https://localhost:4646/v1/operator/autopilot/health +$ nomad operator api /v1/operator/autopilot/health ``` ### Sample response ```json { + "FailureTolerance": 1, "Healthy": true, - "FailureTolerance": 0, + "Leader": "021e5b05-7100-6982-19a3-bb4bd3765e1c", "Servers": [ { - "ID": "e349749b-3303-3ddf-959c-b5885a0e1f6e", - "Name": "node1", - "Address": "127.0.0.1:4647", + "LastContact": "28.900799ms", + "ID": "01dc237a-638b-0532-c548-f29f2269feaf", + "Name": "server2.global", + "Address": "192.168.50.139:4657", "SerfStatus": "alive", - "Version": "0.8.0", - "Leader": true, - "LastContact": "0s", + "Version": "1.9.3", + "Leader": false, "LastTerm": 2, - "LastIndex": 46, + "LastIndex": 7, "Healthy": true, "Voter": true, - "StableSince": "2017-03-06T22:07:51Z" + "StableSince": "2024-11-22T00:54:11Z" }, { - "ID": "e36ee410-cc3c-0a0c-c724-63817ab30303", - "Name": "node2", - "Address": "127.0.0.1:4747", + "LastContact": "4.824885ms", + "ID": "eae21027-b4ed-ea94-73c3-d25b7fd26c13", + "Name": "server3.global", + "Address": "192.168.50.139:4667", "SerfStatus": "alive", - "Version": "0.8.0", + "Version": "1.9.3", "Leader": false, - "LastContact": "27.291304ms", "LastTerm": 2, - "LastIndex": 46, + "LastIndex": 7, "Healthy": true, - "Voter": false, - "StableSince": "2017-03-06T22:18:26Z" + "Voter": true, + "StableSince": "2024-11-22T00:54:11Z" + }, + { + "LastContact": "0s", + "ID": "021e5b05-7100-6982-19a3-bb4bd3765e1c", + "Name": "server1.global", + "Address": "192.168.50.139:4647", + "SerfStatus": "alive", + "Version": "1.9.3", + "Leader": true, + "LastTerm": 2, + "LastIndex": 7, + "Healthy": true, + "Voter": true, + "StableSince": "2024-11-22T00:54:11Z" } ], - "Leader": "e349749b-3303-3ddf-959c-b5885a0e1f6e", "Voters": [ - "e349749b-3303-3ddf-959c-b5885a0e1f6e", - "e36ee410-cc3c-0a0c-c724-63817ab30303" - ], + "021e5b05-7100-6982-19a3-bb4bd3765e1c", + "01dc237a-638b-0532-c548-f29f2269feaf", + "eae21027-b4ed-ea94-73c3-d25b7fd26c13" + ] } ``` @@ -216,10 +233,8 @@ $ curl \ - `StableSince` is the time this server has been in its current `Healthy` state. - - - The HTTP status code will indicate the health of the cluster. If `Healthy` is true, then a - status of 200 will be returned. If `Healthy` is false, then a status of 429 will be returned. +The HTTP status code will indicate the health of the cluster. If `Healthy` is true, then a +status of 200 will be returned. If `Healthy` is false, then a status of 429 will be returned. This API endpoint return with more information in Nomad Enterprise. This is diff --git a/website/content/docs/configuration/autopilot.mdx b/website/content/docs/configuration/autopilot.mdx index 53cb78c19dc..4d7814d994b 100644 --- a/website/content/docs/configuration/autopilot.mdx +++ b/website/content/docs/configuration/autopilot.mdx @@ -15,13 +15,14 @@ For more information about Autopilot, see the [Autopilot Guide](/nomad/tutorials ```hcl autopilot { - cleanup_dead_servers = true - last_contact_threshold = "200ms" - max_trailing_logs = 250 - server_stabilization_time = "10s" - enable_redundancy_zones = false - disable_upgrade_migration = false - enable_custom_upgrades = false + cleanup_dead_servers = true + last_contact_threshold = "200ms" + max_trailing_logs = 250 + min_quorum = 1 + server_stabilization_time = "10s" + enable_redundancy_zones = false + disable_upgrade_migration = false + enable_custom_upgrades = false } ``` @@ -37,6 +38,10 @@ autopilot { - `max_trailing_logs` `(int: 250)` specifies the maximum number of log entries that a server can trail the leader by before being considered unhealthy. +- `min_quorum` `(int: 0)` - Sets the minimum number of servers necessary in a + cluster. Autopilot will stop pruning dead servers when this minimum is + reached. There is no default. + - `server_stabilization_time` `(string: "10s")` - Specifies the minimum amount of time a server must be stable in the 'healthy' state before being added to the cluster. Only takes effect if all servers are running Raft protocol version 3