From 9cae608392802ce4b80e83105b60dbd3611cd7b9 Mon Sep 17 00:00:00 2001 From: Joseph M Date: Fri, 13 Sep 2019 11:50:21 -0400 Subject: [PATCH] [designate] Add coordination backend for designate workers Add coordination backend configuration to designate.conf which is required in multinode environments. Fixes warning from designate: WARNING designate.coordination [-] No coordination backend configured, assuming we are the only worker. Please configure a coordination backend Change-Id: I23c4d2de7e3f9368795c423000a4f9a6c3a431e2 Closes-Bug: #1843842 Related-Bug: #1840070 --- ansible/group_vars/all.yml | 2 ++ ansible/roles/designate/templates/designate.conf.j2 | 8 ++++++++ doc/source/reference/networking/designate-guide.rst | 7 +++++++ etc/kolla/globals.yml | 2 ++ ...e-designate-coordination-backend-741ec71946e7567e.yaml | 7 +++++++ 5 files changed, 26 insertions(+) create mode 100644 releasenotes/notes/new-variable-designate-coordination-backend-741ec71946e7567e.yaml diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index e57dbd6700..c8bcae57c7 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -869,6 +869,8 @@ designate_backend: "bind9" designate_ns_record: "sample.openstack.org" designate_backend_external: "no" designate_backend_external_bind9_nameservers: "" +# Valid options are [ '', redis, etcd ] +designate_coordination_backend: "{{ 'redis' if enable_redis|bool else 'etcd' if enable_etcd|bool else '' }}" ####################### # Neutron options diff --git a/ansible/roles/designate/templates/designate.conf.j2 b/ansible/roles/designate/templates/designate.conf.j2 index 749ccdf0c1..6e21e89fc8 100644 --- a/ansible/roles/designate/templates/designate.conf.j2 +++ b/ansible/roles/designate/templates/designate.conf.j2 @@ -114,3 +114,11 @@ enable_proxy_headers_parsing = True [oslo_policy] policy_file = {{ designate_policy_file }} {% endif %} + +[coordination] +{% if designate_coordination_backend == 'redis' %} +backend_url = {{ redis_connection_string }} +{% elif designate_coordination_backend == 'etcd' %} +# NOTE(noxoid): python-etcd3 does not support multiple endpoints +backend_url = etcd3://{{ hostvars[groups['etcd'][0]]['ansible_' + hostvars[groups['etcd'][0]]['api_interface']]['ipv4']['address'] }}:{{ etcd_client_port }} +{% endif %} diff --git a/doc/source/reference/networking/designate-guide.rst b/doc/source/reference/networking/designate-guide.rst index f6b37e3f40..acac51a062 100644 --- a/doc/source/reference/networking/designate-guide.rst +++ b/doc/source/reference/networking/designate-guide.rst @@ -37,6 +37,13 @@ Configure Designate options in ``/etc/kolla/globals.yml`` dns_interface: "eth1" designate_ns_record: "sample.openstack.org" +.. important:: + + If multiple nodes are assigned to be Designate workers then you must + enable a supported coordination backend, currently either 'redis' or + 'etcd'. The backend choice can be overridden by the + ``designate_coordination_backend`` variable. + The following additional variables are required depending on which backend you intend to use: diff --git a/etc/kolla/globals.yml b/etc/kolla/globals.yml index c9c0a513cc..ede05bccd1 100644 --- a/etc/kolla/globals.yml +++ b/etc/kolla/globals.yml @@ -439,6 +439,8 @@ # Valid options are [ bind9 ] #designate_backend: "bind9" #designate_ns_record: "sample.openstack.org" +# Valid options are [ '', redis, etcd ] +#designate_coordination_backend: "{{ 'redis' if enable_redis|bool else 'etcd' if enable_etcd|bool else '' }}" ######################## # Nova - Compute Options diff --git a/releasenotes/notes/new-variable-designate-coordination-backend-741ec71946e7567e.yaml b/releasenotes/notes/new-variable-designate-coordination-backend-741ec71946e7567e.yaml new file mode 100644 index 0000000000..b0239ff97b --- /dev/null +++ b/releasenotes/notes/new-variable-designate-coordination-backend-741ec71946e7567e.yaml @@ -0,0 +1,7 @@ +--- +features: + - | + Designate coordination backend can now be configured via the + designate_coordination_backend variable. Coordination is mandatory + when multiple workers are deployed as in a multinode environment. + Possible values are redis or etcd.