open-nomad/website/pages/docs/commands/operator/raft-list-peers.mdx

63 lines
1.9 KiB
Plaintext
Raw Normal View History

---
2020-02-06 23:45:31 +00:00
layout: docs
page_title: 'Commands: operator raft list-peers'
sidebar_title: raft list-peers
description: |
Display the current Raft peer configuration.
---
2018-03-22 20:39:18 +00:00
# Command: operator raft list-peers
The Raft list-peers command is used to display the current Raft peer
2017-05-27 02:30:31 +00:00
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]
```
## General Options
2020-02-06 23:45:31 +00:00
@include 'general_options.mdx'
## List Peers Options
- `-stale`: The stale argument defaults to "false" which means the leader
2020-02-06 23:45:31 +00:00
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:
2017-05-27 02:30:31 +00:00
2020-05-18 20:53:06 +00:00
```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
```
2017-02-14 19:01:12 +00:00
- `Node` is the node name of the server, as known to Nomad, or "(unknown)" if
2020-02-06 23:45:31 +00:00
the node is stale and not known.
2020-02-06 23:45:31 +00:00
- `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.
2017-02-14 19:01:12 +00:00
- `Address` is the IP:port for the server.
2017-02-14 19:01:12 +00:00
- `State` is either "follower" or "leader" depending on the server's role in the
2020-02-06 23:45:31 +00:00
Raft configuration.
2017-02-14 19:01:12 +00:00
- `Voter` is "true" or "false", indicating if the server has a vote in the Raft
2020-02-06 23:45:31 +00:00
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