Anyone tried to stop and resume migration from some storage to raft? I always have errors when migrating:
To Reproduce
Steps to reproduce the behavior:
Login to container with vault 1.5.4
rm -Rf /vault/data/*
cat < /tmp/migrate.hcl
storage_source “oci” {
namespace_name = “XXXXXXX”
bucket_name = “vault_data”
ha_enabled = “true”
lock_bucket_name = “vault_leader_lock”
}
storage_destination “raft” {
path = “/vault/data”
retry_join {
leader_api_addr = “http://vault-raft:9200”
}
}
cluster_addr = “https://vault-raft-0.vault-raft-internal:8201”
EOT
- Run
vault operator migrate -config=./migrate.hcl
on the new container with 1.5.4 - After some time ctrl-c or otherwise kill the migration
- Run
vault operator migrate -config=./migrate.hcl -start=auth
(or any other key you’d like to resume from) - get error
Error migrating: error mounting 'storage_destination': could not bootstrap clustered storage: error bootstrapping cluster: cluster already has state
Expected behavior
Expected migration to resume at the key I provided in the start flag
Environment:
- Vault Server Version (retrieve with
vault status
): 1.5.4 - Vault CLI Version (retrieve with
vault version
): 1.5.4 - Server Operating System/Architecture: official k8s container via helm chart x86_64