operator raft
This command groups subcommands for operators to manage the Integrated Storage Raft backend.
join
This command is used to join a new node as a peer to the Raft cluster. In order to join, there must be at least one existing member of the cluster. If Shamir seal is in use, then unseal keys are to be supplied before or after the join process, depending on whether it's being used exclusively for HA.
If raft is used for storage
, the node must be joined before unsealing and the
leader-api-addr
argument must be provided. If raft is used for ha_storage
,
the node must be first unsealed before joining and the leader-api-addr
must
not be provided.
The join
command also allows operators to specify cloud auto-join configuration
instead of a static IP address or hostname. When provided, Vault will attempt to
automatically discover and resolve potential leader addresses based on the provided
auto-join configuration.
Vault uses go-discover to support the auto-join functionality. Please see the go-discover README for details on the format.
By default, Vault will attempt to reach discovered peers using HTTPS and port 8200.
Operators may override these through the --auto-join-scheme
and --auto-join-port
CLI flags respectively.
Parameters
The following flags are available for the operator raft join
command.
-leader-ca-cert
(string: "")
- CA cert to communicate with Raft leader.-leader-client-cert
(string: "")
- Client cert to authenticate to Raft leader.-leader-client-key
(string: "")
- Client key to authenticate to Raft leader.-non-voter
(bool: false) (enterprise)
- This flag is used to make the server not participate in the Raft quorum, and have it only receive the data replication stream. This can be used to add read scalability to a cluster in cases where a high volume of reads to servers are needed. The default is false.-retry
(bool: false)
- Continuously retry joining the Raft cluster upon failures. The default is false.
list-peers
This command is used to list the full set of peers in the Raft cluster.
Example Output
remove-peer
This command is used to remove a node from being a peer to the Raft cluster. In certain cases where a peer may be left behind in the Raft configuration 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.
snapshot
This command groups subcommands for operators interacting with the snapshot
functionality of the integrated Raft storage backend. There are 2 subcommands
supported: save
and restore
.
snapshot save
Takes a snapshot of the Vault data. The snapshot can be used to restore Vault to the point in time when a snapshot was taken.
Note: Snapshot is not supported when Raft is used only for ha_storage
.
snapshot restore
Restores a snapshot of Vault data taken with vault operator raft snapshot save
.
autopilot
This command groups subcommands for operators interacting with the autopilot
functionality of the integrated Raft storage backend. There are 3 subcommands
supported: get-config
, set-config
and state
.
For a more detailed overview of autopilot features, see the concepts page.
autopilot state
Displays the state of the raft cluster under integrated storage as seen by autopilot. It shows whether autopilot thinks the cluster is healthy or not, and how many nodes could fail before the cluster becomes unhealthy ("Failure Tolerance").
State includes a list of all servers by nodeID and IP address. Last Index indicates how close the state on each node is to the leader's.
A node can have a status of "leader", "voter", and "non-voter".
Example Output
autopilot get-config
Returns the configuration of the autopilot subsystem under integrated storage.
autopilot set-config
Modify the configuration of the autopilot subsystem under integrated storage.
Flags applicable to this command are the following:
cleanup-dead-servers
(bool)
- Controls whether to remove dead servers from the Raft peer list periodically or when a new server joins. This requires thatmin-quorum
is also set.last-contact-threshold
(string)
- Limit on the amount of time a server can go without leader contact before being considered unhealthy.dead-server-last-contact-threshold
(string)
- Limit on the amount of time a server can go without leader contact before being considered failed. This takes effect only whencleanup_dead_servers
is set.max-trailing-logs
(int)
- Amount of entries in the Raft Log that a server can be behind before being considered unhealthy.min-quorum
(int)
- Minimum number of servers allowed in a cluster before autopilot can prune dead servers. This should at least be 3. Applicable only for voting nodes.server-stabilization-time
(string)
- Minimum amount of time a server must be in a stable, healthy state before it can become a voter. Until that happens, it will be visible as a peer in the cluster, but as a non-voter, meaning it won't contribute to quorum.