From 2edc32f2eb41f9929300ff2af70175660507af08 Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Mon, 31 Jan 2022 15:55:56 +0100 Subject: [PATCH] [ironic] add coordination backend for ironic inspector Change-Id: Ide82b7a7fa6752b60f2c9c31cdc4c79183fc62f6 --- ansible/group_vars/all.yml | 3 +++ .../roles/ironic/templates/ironic-inspector.conf.j2 | 11 +++++++++++ etc/kolla/globals.yml | 3 +++ ...ronic-inspector-coordination-19d47c1d2849d56f.yaml | 6 ++++++ 4 files changed, 23 insertions(+) create mode 100644 releasenotes/notes/ironic-inspector-coordination-19d47c1d2849d56f.yaml diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index 200191e3ab..f8ccb2c832 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -1170,6 +1170,9 @@ grafana_public_endpoint: "{{ public_protocol }}://{{ kolla_external_fqdn | put_a ironic_internal_endpoint: "{{ internal_protocol }}://{{ ironic_internal_fqdn | put_address_in_context('url') }}:{{ ironic_api_port }}" ironic_public_endpoint: "{{ public_protocol }}://{{ ironic_external_fqdn | put_address_in_context('url') }}:{{ ironic_api_port }}" +# Valid options are [ '', redis, etcd ] +ironic_coordination_backend: "{{ 'redis' if enable_redis|bool else 'etcd' if enable_etcd|bool else '' }}" + ######## # Swift ######## diff --git a/ansible/roles/ironic/templates/ironic-inspector.conf.j2 b/ansible/roles/ironic/templates/ironic-inspector.conf.j2 index 2e5e58fbfc..d9e34478af 100644 --- a/ansible/roles/ironic/templates/ironic-inspector.conf.j2 +++ b/ansible/roles/ironic/templates/ironic-inspector.conf.j2 @@ -73,3 +73,14 @@ driver = {{ ironic_inspector_pxe_filter }} [iptables] dnsmasq_interface = {{ ironic_dnsmasq_interface }} {% endif %} + +[coordination] +{% 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 }} +{% endif %} diff --git a/etc/kolla/globals.yml b/etc/kolla/globals.yml index d2d1d35840..017bed3529 100644 --- a/etc/kolla/globals.yml +++ b/etc/kolla/globals.yml @@ -611,6 +611,9 @@ # List of extra kernel parameters passed to the kernel used during inspection #ironic_inspector_kernel_cmdline_extras: [] +# Valid options are [ '', redis, etcd ] +#ironic_coordination_backend: "{{ 'redis' if enable_redis|bool else 'etcd' if enable_etcd|bool else '' }}" + ###################################### # Manila - Shared File Systems Options ###################################### diff --git a/releasenotes/notes/ironic-inspector-coordination-19d47c1d2849d56f.yaml b/releasenotes/notes/ironic-inspector-coordination-19d47c1d2849d56f.yaml new file mode 100644 index 0000000000..a1c2cf99b2 --- /dev/null +++ b/releasenotes/notes/ironic-inspector-coordination-19d47c1d2849d56f.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + Adds support for configuring a coordination backend for Ironic + Inspector via the ``ironic_coordination_backend`` variable. + Possible values are ``redis`` or ``etcd``.