Browse Source

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
Andy Smith 7 months ago
parent
commit
209e2ba35c
3 changed files with 2 additions and 7 deletions
  1. 0
    1
      tasks/main.yml
  2. 1
    3
      templates/glance-api.conf.j2
  3. 1
    3
      templates/glance-registry.conf.j2

+ 0
- 1
tasks/main.yml View File

@@ -63,7 +63,6 @@
63 63
     _oslomsg_notify_password: "{{ glance_oslomsg_notify_password }}"
64 64
     _oslomsg_notify_vhost: "{{ glance_oslomsg_notify_vhost }}"
65 65
     _oslomsg_notify_transport: "{{ glance_oslomsg_notify_transport }}"
66
-    _oslomsg_configure_notify: "{{ glance_ceilometer_enabled | bool }}"
67 66
   tags:
68 67
     - common-mq
69 68
     - glance-config

+ 1
- 3
templates/glance-api.conf.j2 View File

@@ -70,11 +70,9 @@ ssl = {{ glance_oslomsg_notify_use_ssl | bool }}
70 70
 rabbit_notification_exchange = glance
71 71
 rabbit_notification_topic = notifications
72 72
 
73
-{% if glance_ceilometer_enabled %}
74 73
 [oslo_messaging_notifications]
75
-driver = messagingv2
74
+driver = {% if glance_ceilometer_enabled %}messagingv2{% else %}noop{% endif %}
76 75
 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 %}
77
-{% endif %}
78 76
 
79 77
 [paste_deploy]
80 78
 flavor = {{ glance_flavor }}

+ 1
- 3
templates/glance-registry.conf.j2 View File

@@ -47,11 +47,9 @@ ssl = {{ glance_oslomsg_notify_use_ssl | bool }}
47 47
 rabbit_notification_exchange = glance
48 48
 rabbit_notification_topic = notifications
49 49
 
50
-{% if glance_ceilometer_enabled %}
51 50
 [oslo_messaging_notifications]
52
-driver = messagingv2
51
+driver = {% if glance_ceilometer_enabled %}messagingv2{% else %}noop{% endif %}
53 52
 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 %}
54
-{% endif %}
55 53
 
56 54
 [oslo_policy]
57 55
 policy_file = {{ glance_policy_file }}

Loading…
Cancel
Save