Browse Source

Update messaging notification configuration

This patch add 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. For example, if the
transport_url is not provided in the notification section of the
service configuration, the transport_url specified in the default
section will be used instead.

This patch conditionally selects the notifier driver. The noop
driver will be selected when notification publishing is disabled.
The messagingv2 driver is selected when notification publishing is
enabled.

Change-Id: Iaadc0d852c003e653e00b4736ddc28f16ddfec5a
Closes-Bug: #1794320
ZhijunWei 7 months ago
parent
commit
9508e525ed
2 changed files with 4 additions and 0 deletions
  1. 3
    0
      defaults/main.yml
  2. 1
    0
      templates/magnum.conf.j2

+ 3
- 0
defaults/main.yml View File

@@ -16,6 +16,9 @@
16 16
 ## Verbosity Options
17 17
 debug: False
18 18
 
19
+# Enable/Disable Ceilometer
20
+magnum_ceilometer_enabled: False
21
+
19 22
 # Set the host which will execute the shade modules
20 23
 # for the service setup. The host must already have
21 24
 # clouds.yaml properly configured.

+ 1
- 0
templates/magnum.conf.j2 View File

@@ -69,6 +69,7 @@ endpoint_type = internalURL
69 69
 endpoint_type = internalURL
70 70
 
71 71
 [oslo_messaging_notifications]
72
+driver = {% if magnum_ceilometer_enabled %}messagingv2{% else %}noop{% endif %}
72 73
 transport_url = {{ magnum_oslomsg_notify_transport }}://{% for host in magnum_oslomsg_notify_servers.split(',') %}{{ magnum_oslomsg_notify_userid }}:{{ magnum_oslomsg_notify_password }}@{{ host }}:{{ magnum_oslomsg_notify_port }}{% if not loop.last %},{% else %}/{{ magnum_oslomsg_notify_vhost }}{% if magnum_oslomsg_notify_use_ssl | bool %}?ssl=1{% else %}?ssl=0{% endif %}{% endif %}{% endfor %}
73 74
 
74 75
 [oslo_messaging_rabbit]

Loading…
Cancel
Save