While trying to setup vault with raft backend storage to setup high availability in container- podman ending up with the below error:
Command which i run:
mkdir -p /opt/vaultconfig/raft-node1
podman run -v /opt/vaultconfig:/vault/config --security-opt label=disable --cap-add=IPC_LOCK -p 2200:2200 --pod new:VT docker.io/library/vault server
error details:
200:2200 --pod new:VT docker.io/library/vault server
Error initializing storage of type raft: failed to create fsm: failed to open bolt file: open /opt/vaultconfig/raft-node1/vault.db: no such file or directory
2021-07-01T06:22:16.571Z [INFO] proxy environment: http_proxy="" https_proxy="" no_proxy=""
config files details:
path: /opt/vaultconfig
confg file - config-node1.hcl:
storage “raft” {
path = “/opt/vaultconfig/raft-node1/”
node_id = “node1”
}
listener “tcp” {
address = “127.0.0.1:2200”
cluster_address = “127.0.0.1:2201”
tls_disable = true
}
disable_mlock = true
api_addr = “http://127.0.0.1:2200”
cluster_addr = “http://127.0.0.1:2201”
Note: When in run the config with file as storage backend as below with the same ciommand - “podman run -v /opt/vaultconfig:/vault/config --security-opt label=disable --cap-add=IPC_LOCK -p 2200:2200 --pod new:VT docker.io/library/vault server” it actullay works!
listener “tcp” {
address = “0.0.0.0:2200”
tls_disable = 1
}
storage “file” {
path = “/vault/file”
}
disable_mlock = true
api_addr = “http://0.0.0.0:2200”
ui=true
Could you assist/help?