open-nomad/website/content/docs/commands/operator/raft-list-peers.mdx
2021-01-05 19:02:39 -05:00

65 lines
2 KiB
Plaintext

---
layout: docs
page_title: 'Commands: operator raft list-peers'
sidebar_title: raft list-peers
description: |
Display the current Raft peer configuration.
---
# Command: operator raft list-peers
The Raft list-peers command is used to display the current Raft peer
configuration.
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 list-peers [options]
```
If ACLs are enabled, this command requires a management token.
## General Options
@include 'general_options_no_namespace.mdx'
## List Peers Options
- `-stale`: The stale argument defaults to "false" which means the leader
provides the result. If the cluster is in an outage state without a leader, you
may need to set `-stale` to "true" to get the configuration from a non-leader
server.
## Examples
An example output with three servers is as follows:
```shell-session
$ nomad operator raft list-peers
Node ID Address State Voter
nomad-server01.global 10.10.11.5:4647 10.10.11.5:4647 follower true
nomad-server02.global 10.10.11.6:4647 10.10.11.6:4647 leader true
nomad-server03.global 10.10.11.7:4647 10.10.11.7:4647 follower true
```
- `Node` is the node name of the server, as known to Nomad, or "(unknown)" if
the node is stale and not known.
- `ID` is the ID of the server. This is the same as the `Address` but may be
upgraded to a GUID in a future version of Nomad.
- `Address` is the IP:port for the server.
- `State` is either "follower" or "leader" depending on the server's role in the
Raft configuration.
- `Voter` is "true" or "false", indicating if the server has a vote in the Raft
configuration. Future versions of Nomad may add support for non-voting servers.
[operator]: /api-docs/operator
[outage recovery]: https://learn.hashicorp.com/tutorials/nomad/outage-recovery