From cb4d058c0b694baa9ae975275620d0981692b514 Mon Sep 17 00:00:00 2001 From: David Ames Date: Thu, 6 Dec 2018 10:52:41 -0800 Subject: [PATCH] Update deprecated rabbitmq messaging configuration Current versions of OpenStack use the transport url rather than rabbit_hosts and various other configuration settings. Adding a new template for transport url and current oslo-messaging-rabbit settings. Allow the setting ssl_ca at the OpenStack principle layer. Depends-On: Ie17b481bce3e3bfdf71b15ca7667f8688739d608 Change-Id: I6bb56a59cd65310d644aa25ae203996b22ec4b4e Partial-Bug: #1807233 --- config.yaml | 5 +++++ templates/parts/section-oslo-messaging-rabbit | 22 +++++++++++++++++++ templates/parts/section-transport-url | 7 ++++++ 3 files changed, 34 insertions(+) create mode 100644 templates/parts/section-oslo-messaging-rabbit create mode 100644 templates/parts/section-transport-url diff --git a/config.yaml b/config.yaml index 624a3f5..b4201ae 100644 --- a/config.yaml +++ b/config.yaml @@ -19,3 +19,8 @@ options: Openstack mostly defaults to using public endpoints for internal communication between services. If set to True this option will configure services to use internal endpoints where possible. + ssl_ca: + type: string + default: + description: | + SSL CA to use to communicate with other OpenStack cloud components. diff --git a/templates/parts/section-oslo-messaging-rabbit b/templates/parts/section-oslo-messaging-rabbit new file mode 100644 index 0000000..10c493f --- /dev/null +++ b/templates/parts/section-oslo-messaging-rabbit @@ -0,0 +1,22 @@ +# This template supersedes section-rabbitmq-oslo which uses deprecated +# settings. The section-rabbitmq-oslo will remain available until the +# transition is complete. +# +# For a complete messaging queue configuration the template +# section-transport-url must also be used under the [DEFAULT] section. + +{% if amqp.host or amqp.hosts -%} +[oslo_messaging_rabbit] + +{% if amqp.ha_queues -%} +rabbit_ha_queues = True +rabbit_durable_queues = False +{% endif -%} + +{% if amqp.ssl_data_complete == True -%} +ssl = True +{% if amqp.ssl_ca -%} +ssl_ca_file = {{ amqp.ssl_ca_file }} +{% endif -%} +{% endif -%} +{% endif -%} diff --git a/templates/parts/section-transport-url b/templates/parts/section-transport-url new file mode 100644 index 0000000..58e6297 --- /dev/null +++ b/templates/parts/section-transport-url @@ -0,0 +1,7 @@ +# This template must be included under the [DEFAULT] section + +{% if amqp.transport_url -%} +transport_url = {{ amqp.transport_url }} +{% endif -%} + +