From e2c7dace44110a6a5142ac7c51df8b006fea7c84 Mon Sep 17 00:00:00 2001 From: Will Szumski Date: Mon, 8 Aug 2022 11:16:54 +0100 Subject: [PATCH] Use loadbalancer to connect to etcd Hardcoding the first etcd host creates a single point of failure. Change-Id: I0f83030fcd84ddcdc4bf2226e76605c7cab84cbb --- ansible/roles/cinder/templates/cinder.conf.j2 | 3 +-- ansible/roles/ironic/templates/ironic-inspector.conf.j2 | 3 +-- ...adbalancer-for-etcdgw-coordination-6704a8b1389bbabe.yaml | 6 ++++++ 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 releasenotes/notes/use-loadbalancer-for-etcdgw-coordination-6704a8b1389bbabe.yaml diff --git a/ansible/roles/cinder/templates/cinder.conf.j2 b/ansible/roles/cinder/templates/cinder.conf.j2 index 0698f5e02a..a309250aa3 100644 --- a/ansible/roles/cinder/templates/cinder.conf.j2 +++ b/ansible/roles/cinder/templates/cinder.conf.j2 @@ -234,9 +234,8 @@ verify_ssl_path = {{ openstack_cacert }} {% if cinder_coordination_backend == 'redis' %} backend_url = {{ redis_connection_string }} {% elif cinder_coordination_backend == 'etcd' %} -# NOTE(yoctozepto): etcd-compatible tooz drivers do not support multiple endpoints here (verified in Stein, Train) # NOTE(yoctozepto): we must use etcd3gw (aka etcd3+http) due to issues with alternative (etcd3) and eventlet (as used by cinder) # see https://bugs.launchpad.net/kolla-ansible/+bug/1854932 # and https://review.opendev.org/466098 for details -backend_url = etcd3+{{ etcd_protocol }}://{{ 'api' | kolla_address(groups['etcd'][0]) | put_address_in_context('url') }}:{{ etcd_client_port }} +backend_url = etcd3+{{ internal_protocol }}://{{ kolla_internal_vip_address }}:{{ etcd_client_port }} {% endif %} diff --git a/ansible/roles/ironic/templates/ironic-inspector.conf.j2 b/ansible/roles/ironic/templates/ironic-inspector.conf.j2 index 278c7144df..4b4b3216b6 100644 --- a/ansible/roles/ironic/templates/ironic-inspector.conf.j2 +++ b/ansible/roles/ironic/templates/ironic-inspector.conf.j2 @@ -79,9 +79,8 @@ dnsmasq_interface = {{ ironic_dnsmasq_interface }} {% if ironic_coordination_backend == 'redis' %} backend_url = {{ redis_connection_string }} {% elif ironic_coordination_backend == 'etcd' %} -# NOTE(yoctozepto): etcd-compatible tooz drivers do not support multiple endpoints here (verified in Stein, Train) # NOTE(yoctozepto): we must use etcd3gw (aka etcd3+http) due to issues with alternative (etcd3) and eventlet (as used by cinder) # see https://bugs.launchpad.net/kolla-ansible/+bug/1854932 # and https://review.opendev.org/466098 for details -backend_url = etcd3+{{ etcd_protocol }}://{{ 'api' | kolla_address(groups['etcd'][0]) | put_address_in_context('url') }}:{{ etcd_client_port }} +backend_url = etcd3+{{ internal_protocol }}://{{ kolla_internal_vip_address }}:{{ etcd_client_port }} {% endif %} diff --git a/releasenotes/notes/use-loadbalancer-for-etcdgw-coordination-6704a8b1389bbabe.yaml b/releasenotes/notes/use-loadbalancer-for-etcdgw-coordination-6704a8b1389bbabe.yaml new file mode 100644 index 0000000000..fa8b1d6703 --- /dev/null +++ b/releasenotes/notes/use-loadbalancer-for-etcdgw-coordination-6704a8b1389bbabe.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + Services using etcd3gw via tooz now use etcd via haproxy. This removes + a single point of failure, where we hardcoded the first etcd host for + backend_url.