Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add missing MinQuorum docs #24536

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 53 additions & 38 deletions website/content/api-docs/operator/autopilot.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
```

Expand Down Expand Up @@ -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
}
```

Expand All @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cluster. Autopilot will stop pruning dead servers when this minimum is
cluster. Autopilot stops 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
Expand Down Expand Up @@ -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"
]
}
```

Expand Down Expand Up @@ -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.
Comment on lines +236 to +237
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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 indicates the health of the cluster. If `Healthy` is true, Nomad
returns status of 200. If `Healthy` is false, then Nomad returns a status of 429.


<EnterpriseAlert>
This API endpoint return with more information in Nomad Enterprise. This is
Expand Down
19 changes: 12 additions & 7 deletions website/content/docs/configuration/autopilot.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
```

Expand All @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cluster. Autopilot will stop pruning dead servers when this minimum is
cluster. Autopilot stops 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
Expand Down