From 1fb67475fe215c62894457d7e25eaffa3e6ac4ed Mon Sep 17 00:00:00 2001 From: Liam Young Date: Wed, 22 Aug 2018 13:07:47 +0000 Subject: [PATCH] Use v2 api when talking to etcd Use the etcd v2 api when talking to vault because there is a bug in the client which causes vault to be inaccessible if the first etcd unit goes down. Change-Id: Iadbfcb9998d029cc6cf599008c124960993acb4e Closes-Bug: 1782620 --- src/templates/vault.hcl.j2 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/templates/vault.hcl.j2 b/src/templates/vault.hcl.j2 index 7c70f2d..7ad7b12 100644 --- a/src/templates/vault.hcl.j2 +++ b/src/templates/vault.hcl.j2 @@ -26,8 +26,11 @@ ha_storage "etcd" { tls_ca_file = "{{ etcd_tls_ca_file }}" tls_cert_file = "{{ etcd_tls_cert_file }}" tls_key_file = "{{ etcd_tls_key_file }}" - etcd_api = "v3" + # Use v2 api due to https://github.com/hashicorp/vault/issues/4961 + etcd_api = "v2" } + + {%- endif %} listener "tcp" { address = "0.0.0.0:8200"