Vault pins ip address of raft peers - raft fails when IP changes!

When deployed to docker the raft stanza for the 2nd vault instance in a 3 node cluster can look like this:

storage “raft” {
path = “/file/vault”
node_id = “vault_2”
retry_join {
leader_api_addr = “http://vault_1:8200”
}
retry_join {
leader_api_addr = “http://vault_3:8200”
}
}

However, because containers, “vault_1”, “vault_2” and “vault_3” are assigned when the service tasks are deployed, and reassigned if/when tasks are redeployed. So the hostnames, not the IPs, are important.

However, from the error logs, after vault has failed for the umteenth time, it is clear that vault is using pinned ip’s.

I can cry