mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
In Nomad 1.4.0 we removed support for Raft Protocol v2 entirely. But the `Operator.RemoveRaftPeerByAddress` RPC handler was left in place, along with its supporting HTTP API and command line flags. Using this API will always result in the Raft library error "operation not supported with current protocol version". Unfortunately it's still possible in unit tests to exercise this code path, and these tests are quite flaky. This changeset turns the RPC handler and HTTP API into a no-op, removes the associated command line flags, and removes the flaky tests. I've also cleaned up the test for `RemoveRaftPeerByID` to consolidate test servers and use `shoenig/test`. Fixes: https://hashicorp.atlassian.net/browse/NET-12413 Ref: https://github.com/hashicorp/nomad/pull/13467 Ref: https://developer.hashicorp.com/nomad/docs/upgrade/upgrade-specific#raft-protocol-version-2-unsupported Ref: https://github.com/hashicorp/nomad-enterprise/actions/runs/13201513025/job/36855234398?pr=2302
44 lines
1.6 KiB
Plaintext
44 lines
1.6 KiB
Plaintext
---
|
|
layout: docs
|
|
page_title: 'nomad operator raft remove-peer command reference'
|
|
description: |
|
|
The `nomad operator raft remove-peer` command removes a Nomad server from the Raft configuration.
|
|
---
|
|
|
|
# `nomad operator raft remove-peer` command reference
|
|
|
|
Remove the Nomad server with peer ID from the Raft configuration.
|
|
|
|
There are rare cases where a peer may be left behind in the Raft quorum even
|
|
though the server is no longer present and known to the cluster. This command
|
|
can be used to remove the failed server so that it is no longer affects the Raft
|
|
quorum. If the server still shows in the output of the [`nomad server members`]
|
|
command, it is preferable to clean up by running [`nomad server force-leave`]
|
|
instead of this command.
|
|
|
|
See the [Outage Recovery] guide for some examples of how this command is used.
|
|
For an API to perform these operations programmatically, please see the
|
|
documentation for the [Operator] endpoint.
|
|
|
|
## Usage
|
|
|
|
```plaintext
|
|
nomad operator raft remove-peer [options]
|
|
```
|
|
|
|
If ACLs are enabled, this command requires a management token.
|
|
|
|
## General options
|
|
|
|
@include 'general_options_no_namespace.mdx'
|
|
|
|
## Remove Peer options
|
|
|
|
- `-peer-id`: Remove a Nomad server with the given ID from the Raft
|
|
configuration. The format is "id"
|
|
|
|
[`nomad server force-leave`]: /nomad/docs/commands/server/force-leave 'Nomad server force-leave command'
|
|
[`nomad server members`]: /nomad/docs/commands/server/members 'Nomad server members command'
|
|
[operator]: /nomad/api-docs/operator 'Nomad Operator API'
|
|
[outage recovery]: /nomad/tutorials/manage-clusters/outage-recovery
|