From 209e2ba35ca6b1bca487e8f3d619365f0387f61f Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Mon, 24 Sep 2018 09:55:33 -0400 Subject: [PATCH] Update messaging notification configuration This patch removes the conditional inclusion of the notification section of the service configuration. This ensures that oslo.messaging notifications use the correct transport for deployments that have separate rpc and notify messaging backends. This patch conditionally selects the notifier driver for when ceilometer is enabled. Change-Id: Ie73bf32a62d0e959e4905de31517b20b83b5c583 --- tasks/main.yml | 1 - templates/glance-api.conf.j2 | 4 +--- templates/glance-registry.conf.j2 | 4 +--- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 2a479120..32a66d3c 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -63,7 +63,6 @@ _oslomsg_notify_password: "{{ glance_oslomsg_notify_password }}" _oslomsg_notify_vhost: "{{ glance_oslomsg_notify_vhost }}" _oslomsg_notify_transport: "{{ glance_oslomsg_notify_transport }}" - _oslomsg_configure_notify: "{{ glance_ceilometer_enabled | bool }}" tags: - common-mq - glance-config diff --git a/templates/glance-api.conf.j2 b/templates/glance-api.conf.j2 index c14b1e9d..197ea1bd 100644 --- a/templates/glance-api.conf.j2 +++ b/templates/glance-api.conf.j2 @@ -70,11 +70,9 @@ ssl = {{ glance_oslomsg_notify_use_ssl | bool }} rabbit_notification_exchange = glance rabbit_notification_topic = notifications -{% if glance_ceilometer_enabled %} [oslo_messaging_notifications] -driver = messagingv2 +driver = {% if glance_ceilometer_enabled %}messagingv2{% else %}noop{% endif %} transport_url = {{ glance_oslomsg_notify_transport }}://{% for host in glance_oslomsg_notify_servers.split(',') %}{{ glance_oslomsg_notify_userid }}:{{ glance_oslomsg_notify_password }}@{{ host }}:{{ glance_oslomsg_notify_port }}{% if not loop.last %},{% else %}/{{ glance_oslomsg_notify_vhost }}{% if glance_oslomsg_notify_use_ssl | bool %}?ssl=1{% else %}?ssl=0{% endif %}{% endif %}{% endfor %} -{% endif %} [paste_deploy] flavor = {{ glance_flavor }} diff --git a/templates/glance-registry.conf.j2 b/templates/glance-registry.conf.j2 index d6d2287f..33887fc1 100644 --- a/templates/glance-registry.conf.j2 +++ b/templates/glance-registry.conf.j2 @@ -47,11 +47,9 @@ ssl = {{ glance_oslomsg_notify_use_ssl | bool }} rabbit_notification_exchange = glance rabbit_notification_topic = notifications -{% if glance_ceilometer_enabled %} [oslo_messaging_notifications] -driver = messagingv2 +driver = {% if glance_ceilometer_enabled %}messagingv2{% else %}noop{% endif %} transport_url = {{ glance_oslomsg_notify_transport }}://{% for host in glance_oslomsg_notify_servers.split(',') %}{{ glance_oslomsg_notify_userid }}:{{ glance_oslomsg_notify_password }}@{{ host }}:{{ glance_oslomsg_notify_port }}{% if not loop.last %},{% else %}/{{ glance_oslomsg_notify_vhost }}{% if glance_oslomsg_notify_use_ssl | bool %}?ssl=1{% else %}?ssl=0{% endif %}{% endif %}{% endfor %} -{% endif %} [oslo_policy] policy_file = {{ glance_policy_file }}