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

raft: disallow ha_storage stanza when raft storage is used #8707

Merged
merged 1 commit into from Apr 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions command/server.go
Expand Up @@ -1144,6 +1144,11 @@ func (c *ServerCommand) Run(args []string) int {
// Initialize the separate HA storage backend, if it exists
var ok bool
if config.HAStorage != nil {
if config.Storage.Type == "raft" {
c.UI.Error("HA storage cannot be declared when Raft is the storage type")
return 1
}

// TODO: Remove when Raft can server as the ha_storage backend.
// See https://github.com/hashicorp/vault/issues/8206
if config.HAStorage.Type == "raft" {
Expand Down
5 changes: 4 additions & 1 deletion website/pages/docs/configuration/storage/raft.mdx
Expand Up @@ -36,6 +36,9 @@ cluster_addr = "http://127.0.0.1:8201"
`cluster_addr` to indicate the address and port to be used for communication
between the nodes in the Raft cluster.

~> **Note:** When using the Raft storage backend, a separate `ha_storage`
backend cannot be declared.

~> **Note:** Raft cannot be used as the configured `ha_storage` backend at this
time. To use Raft for HA coordination users must also use Raft for storage.

Expand All @@ -54,7 +57,7 @@ time. To use Raft for HA coordination users must also use Raft for storage.
expense of requiring more network and CPU resources for better performance.
Omitting this value or setting it to 0 uses default timing described below.
Lower values are used to tighten timing and increase sensitivity while higher
values relax timings and reduce sensitivity.
values relax timings and reduce sensitivity.

By default, Vault will use a lower-performance timing that's suitable for
minimal Vault servers, currently equivalent to setting this to a value of 5
Expand Down