Standardize the configuration of "oslo_messaging" section

After all of the discussions we had on
"https://review.opendev.org/#/c/670626/2", I studied all projects that
have an "oslo_messaging" section. Afterwards, I applied the same method
that is already used in "oslo_messaging" section in Nova, Cinder, and
others. This guarantees that we have a consistent method to
enable/disable notifications across projects based on components (e.g.
Ceilometer) being enabled or disabled. Here follows the list of
components, and the respective changes I did.

* Aodh:
The section is declared, but it is not used. Therefore, it will
be removed in an upcomming PR.

* Congress:
The section is declared, but it is not used. Therefore, it will
be removed in an upcomming PR.

* Cinder:
It was already properly configured.

* Octavia:
The section is declared, but it is not used. Therefore, it will
be removed in an upcomming PR.

* Heat:
It was already using a similar scheme; I just modified it a little bit
to be the same as we have in all other components

* Ceilometer:
Ceilometer publishes some messages in the rabbitMQ. However, the
default driver is "messagingv2", and not ''(empty) as defined in Oslo;
these configurations are defined in ceilometer/publisher/messaging.py.
Therefore, we do not need to do anything for the
"oslo_messaging_notifications" section in Ceilometer

* Tacker:
It was already using a similar scheme; I just modified it a little bit
to be the same as we have in all other components

* Neutron:
It was already properly configured.

* Nova
It was already properly configured. However, we found another issue
with its configuration. Kolla-ansible does not configure nova
notifications as it should. If 'searchlight' is not installed (enabled)
the 'notification_format' should be 'unversioned'. The default is
'both'; so nova will send a notification to the queue
versioned_notifications; but that queue has no consumer when
'searchlight' is disabled. In our case, the queue got 511k messages.
The huge amount of "stuck" messages made the Rabbitmq cluster
unstable.

https://bugzilla.redhat.com/show_bug.cgi?id=1478274
https://bugs.launchpad.net/ceilometer/+bug/1665449

* Nova_hyperv:
I added the same configurations as in Nova project.

* Vitrage
It was already using a similar scheme; I just modified it a little bit
to be the same as we have in all other components

* Searchlight
I created a mechanism similar to what we have in AODH, Cinder, Nova,
and others.

* Ironic
I created a mechanism similar to what we have in AODH, Cinder, Nova,
and others.

* Glance
It was already properly configured.

* Trove
It was already using a similar scheme; I just modified it a little bit
to be the same as we have in all other components

* Blazar
It was already using a similar scheme; I just modified it a little bit
to be the same as we have in all other components

* Sahara
It was already using a similar scheme; I just modified it a little bit
to be the same as we have in all other components

* Watcher
I created a mechanism similar to what we have in AODH, Cinder, Nova,
and others.

* Barbican
I created a mechanism similar to what we have in Cinder, Nova,
and others. I also added a configuration to 'keystone_notifications'
section. Barbican needs its own queue to capture events from Keystone.
Otherwise, it has an impact on Ceilometer and other systems that are
connected to the "notifications" default queue.

* Keystone
Keystone is the system that triggered this work with the discussions
that followed on https://review.opendev.org/#/c/670626/2. After a long
discussion, we agreed to apply the same approach that we have in Nova,
Cinder and other systems in Keystone. That is what we did. Moreover, we
introduce a new topic "barbican_notifications" when barbican is
enabled. We also removed the "variable" enable_cadf_notifications, as
it is obsolete, and the default in Keystone is CADF.

* Mistral:
It was hardcoded "noop" as the driver. However, that does not seem a
good practice. Instead, I applied the same standard of using the driver
and pushing to "notifications" queue if Ceilometer is enabled.

* Cyborg:
I created a mechanism similar to what we have in AODH, Cinder, Nova,
and others.

* Murano
It was already using a similar scheme; I just modified it a little bit
to be the same as we have in all other components

* Senlin
It was already using a similar scheme; I just modified it a little bit
to be the same as we have in all other components

* Manila
It was already using a similar scheme; I just modified it a little bit
to be the same as we have in all other components

* Zun
The section is declared, but it is not used. Therefore, it will
be removed in an upcomming PR.

* Designate
It was already using a similar scheme; I just modified it a little bit
to be the same as we have in all other components

* Magnum
It was already using a similar scheme; I just modified it a little bit
to be the same as we have in all other components

Closes-Bug: #1838985

Change-Id: I88bdb004814f37c81c9a9c4e5e491fac69f6f202
Signed-off-by: Rafael Weingärtner <rafael@apache.org>
This commit is contained in:
Rafael Weingärtner 2019-07-26 09:25:25 -03:00
parent 2b78c831fd
commit 22a6223b1b
45 changed files with 331 additions and 25 deletions

View File

@ -518,6 +518,7 @@ enable_haproxy_memcached: "yes"
enable_aodh: "no"
enable_barbican: "no"
enable_blazar: "no"
# NOTE: This variable has been deprecated and will be removed in the U cycle.
enable_cadf_notifications: "no"
enable_ceilometer: "no"
enable_ceilometer_ipmi: "no"

View File

@ -46,6 +46,9 @@ kek = '{{ barbican_crypto_key }}'
[keystone_notifications]
enable = True
{% if enable_keystone | bool %}
topic = barbican_notifications
{% endif %}
[keystone_authtoken]
www_authenticate_uri = {{ keystone_internal_url }}

View File

@ -95,3 +95,13 @@ blazar_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}"
blazar_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
blazar_dev_mode: "{{ kolla_dev_mode }}"
blazar_source_version: "{{ kolla_source_version }}"
####################
# Notifications
####################
blazar_notification_topics:
- name: notifications
enabled: "{{ enable_ceilometer | bool }}"
blazar_enabled_notification_topics: "{{ blazar_notification_topics | selectattr('enabled', 'equalto', true) | list }}"

View File

@ -50,13 +50,14 @@ blazar_password = {{ blazar_keystone_password }}
blazar_project_name = service
[oslo_messaging_notifications]
{% if enable_ceilometer | bool %}
{% if blazar_enabled_notification_topics %}
driver = messagingv2
topics = notifications
topics = {{ blazar_enabled_notification_topics | map(attribute='name') | join(',') }}
{% else %}
driver = noop
{% endif %}
{% if blazar_policy_file is defined %}
[oslo_policy]
policy_file = {{ blazar_policy_file }}

View File

@ -86,3 +86,13 @@ cyborg_logging_debug: "{{ openstack_logging_debug }}"
cyborg_keystone_user: "cyborg"
openstack_cyborg_auth: "{{ openstack_auth }}"
####################
# Notifications
####################
cyborg_notification_topics:
- name: notifications
enabled: "{{ enable_ceilometer | bool }}"
cyborg_enabled_notification_topics: "{{ cyborg_notification_topics | selectattr('enabled', 'equalto', true) | list }}"

View File

@ -33,3 +33,9 @@ policy_file = {{ cyborg_policy_file }}
[oslo_messaging_notifications]
transport_url = {{ notify_transport_url }}
{% if cyborg_enabled_notification_topics %}
driver = messagingv2
topics = {{ cyborg_enabled_notification_topics | map(attribute='name') | join(',') }}
{% else %}
driver = noop
{% endif %}

View File

@ -206,3 +206,15 @@ designate_infoblox_auth_username: ""
designate_infoblox_auth_password: ""
designate_infoblox_multi_tenant: "false"
designate_infoblox_ns_group: ""
####################
# Notifications
####################
designate_notifications_topic_name: "notifications_designate"
designate_notification_topics:
- name: "{{ designate_notifications_topic_name }}"
enabled: True
designate_enabled_notification_topics: "{{ designate_notification_topics | selectattr('enabled', 'equalto', true) | list }}"

View File

@ -80,7 +80,7 @@ idle_timeout = 3600
[handler:nova_fixed]
#NOTE: zone_id must be manually filled an ID from openstack zone list
zone_id =
notification_topics = notifications_designate
notification_topics = {{ designate_notifications_topic_name }}
control_exchange = nova
formatv4 = '%(octet0)s-%(octet1)s-%(octet2)s-%(octet3)s.%(zone)s'
formatv4 = '%(hostname)s.%(project)s.%(zone)s'
@ -91,14 +91,18 @@ formatv6 = '%(hostname)s.%(project)s.%(zone)s'
[handler:neutron_floatingip]
#NOTE: zone_id must be manually filled an ID from openstack zone list
zone_id =
notification_topics = notifications_designate
notification_topics = {{ designate_notifications_topic_name }}
control_exchange = neutron
formatv4 = '%(octet0)s-%(octet1)s-%(octet2)s-%(octet3)s.%(zone)s'
[oslo_messaging_notifications]
transport_url = {{ notify_transport_url }}
topics = notifications_designate
{% if designate_enabled_notification_topics %}
driver = messagingv2
topics = {{ designate_enabled_notification_topics | map(attribute='name') | join(',') }}
{% else %}
driver = noop
{% endif %}
[oslo_concurrency]
lock_path = /var/lib/designate/tmp

View File

@ -127,3 +127,12 @@ heat_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}"
heat_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
heat_dev_mode: "{{ kolla_dev_mode }}"
heat_source_version: "{{ kolla_source_version }}"
####################
# Notifications
####################
heat_notification_topics:
- name: notifications
enabled: "{{ enable_ceilometer | bool }}"
heat_enabled_notification_topics: "{{ heat_notification_topics | selectattr('enabled', 'equalto', true) | list }}"

View File

@ -77,9 +77,9 @@ auth_uri = {{ keystone_public_url }}
[oslo_messaging_notifications]
transport_url = {{ notify_transport_url }}
{% if enable_ceilometer | bool %}
{% if heat_enabled_notification_topics %}
driver = messagingv2
topics = notifications
topics = {{ heat_enabled_notification_topics | map(attribute='name') | join(',') }}
{% else %}
driver = noop
{% endif %}

View File

@ -191,7 +191,6 @@ openstack_ironic_inspector_auth: "{{ openstack_auth }}"
#########
# Ironic
#########
ironic_dnsmasq_interface: "{{ api_interface }}"
ironic_dnsmasq_dhcp_range:
ironic_dnsmasq_default_gateway:
@ -203,6 +202,7 @@ ironic_enable_rolling_upgrade: "yes"
ironic_inspector_kernel_cmdline_extras: []
ironic_inspector_pxe_filter: "{% if enable_neutron | bool %}dnsmasq{% else %}none{% endif %}"
####################
## Kolla
#####################
@ -211,3 +211,13 @@ ironic_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}"
ironic_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
ironic_dev_mode: "{{ kolla_dev_mode }}"
ironic_source_version: "{{ kolla_source_version }}"
####################
# Notifications
####################
ironic_notification_topics:
- name: notifications
enabled: "{{ enable_ceilometer | bool }}"
ironic_enabled_notification_topics: "{{ ironic_notification_topics | selectattr('enabled', 'equalto', true) | list }}"

View File

@ -21,6 +21,12 @@ pin_release_version = {{ pin_release_version }}
[oslo_messaging_notifications]
transport_url = {{ notify_transport_url }}
{% if ironic_enabled_notification_topics %}
driver = messagingv2
topics = {{ ironic_enabled_notification_topics | map(attribute='name') | join(',') }}
{% else %}
driver = noop
{% endif %}
{% if ironic_policy_file is defined %}
[oslo_policy]

View File

@ -88,3 +88,13 @@ karbor_logging_debug: "{{ openstack_logging_debug }}"
karbor_keystone_user: "karbor"
openstack_karbor_auth: "{{ openstack_auth }}"
####################
# Notification
####################
karbor_notification_topics:
- name: notifications
enabled: "{{ enable_ceilometer | bool }}"
karbor_enabled_notification_topics: "{{ karbor_notification_topics | selectattr('enabled', 'equalto', true) | list }}"

View File

@ -46,6 +46,12 @@ memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansi
[oslo_messaging_notifications]
transport_url = {{ notify_transport_url }}
{% if karbor_enabled_notification_topics %}
driver = messagingv2
topics = {{ karbor_enabled_notification_topics | map(attribute='name') | join(',') }}
{% else %}
driver = noop
{% endif %}
[oslo_middleware]
enable_proxy_headers_parsing = True

View File

@ -113,3 +113,18 @@ keystone_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}"
keystone_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
keystone_dev_mode: "{{ kolla_dev_mode }}"
keystone_source_version: "{{ kolla_source_version }}"
####################
# Notifications
####################
keystone_default_notifications_topic_enabled: "{{ (enable_ceilometer | bool ) or (enable_cadf_notifications | bool)}}"
keystone_default_notifications_topic_name: "notifications"
keystone_notification_topics:
- name: "{{ keystone_default_notifications_topic_name }}"
enabled: "{{ keystone_default_notifications_topic_enabled | bool }}"
- name: barbican_notifications
enabled: "{{ enable_barbican | bool }}"
keystone_enabled_notification_topics: "{{ keystone_notification_topics | selectattr('enabled', 'equalto', true) | list }}"

View File

@ -1,8 +1,5 @@
[DEFAULT]
debug = {{ keystone_logging_debug }}
{% if enable_cadf_notifications | bool %}
notification_format = cadf
{% endif %}
transport_url = {{ rpc_transport_url }}
@ -53,10 +50,14 @@ memcache_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansib
[oslo_messaging_notifications]
transport_url = {{ notify_transport_url }}
{% if enable_cadf_notifications | bool %}
{% if keystone_enabled_notification_topics %}
driver = messagingv2
topics = {{ keystone_enabled_notification_topics | map(attribute='name') | join(',') }}
{% else %}
driver = noop
{% endif %}
{% if enable_osprofiler | bool %}
[profiler]
enabled = true

View File

@ -105,3 +105,13 @@ magnum_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}"
magnum_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
magnum_dev_mode: "{{ kolla_dev_mode }}"
magnum_source_version: "{{ kolla_source_version }}"
####################
# Notifications
####################
magnum_notification_topics:
- name: notifications
enabled: "{{ enable_ceilometer | bool }}"
magnum_enabled_notification_topics: "{{ magnum_notification_topics | selectattr('enabled', 'equalto', true) | list }}"

View File

@ -91,9 +91,9 @@ cert_manager_type = x509keypair
[oslo_messaging_notifications]
transport_url = {{ notify_transport_url }}
{% if enable_ceilometer | bool %}
{% if magnum_enabled_notification_topics %}
driver = messaging
topics = notifications
topics = {{ magnum_enabled_notification_topics | map(attribute='name') | join(',') }}
{% else %}
driver = noop
{% endif %}

View File

@ -183,3 +183,13 @@ manila_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}"
manila_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
manila_dev_mode: "{{ kolla_dev_mode }}"
manila_source_version: "{{ kolla_source_version }}"
####################
# Notifications
####################
manila_notification_topics:
- name: notifications
enabled: "{{ enable_ceilometer | bool }}"
manila_enabled_notification_topics: "{{ manila_notification_topics | selectattr('enabled', 'equalto', true) | list }}"

View File

@ -44,6 +44,13 @@ memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansi
[oslo_messaging_notifications]
transport_url = {{ notify_transport_url }}
{% if manila_enabled_notification_topics %}
driver = messagingv2
topics = {{ manila_enabled_notification_topics | map(attribute='name') | join(',') }}
{% else %}
driver = noop
{% endif %}
[oslo_middleware]
enable_proxy_headers_parsing = True

View File

@ -125,3 +125,13 @@ mistral_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}"
mistral_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
mistral_dev_mode: "{{ kolla_dev_mode }}"
mistral_source_version: "{{ kolla_source_version }}"
####################
# Notifications
####################
mistral_notification_topics:
- name: notifications
enabled: "{{ enable_ceilometer | bool }}"
mistral_enabled_notification_topics: "{{ mistral_notification_topics | selectattr('enabled', 'equalto', true) | list }}"

View File

@ -60,7 +60,12 @@ default_region = {{ openstack_region_name }}
[oslo_messaging_notifications]
transport_url = {{ notify_transport_url }}
{% if mistral_enabled_notification_topics %}
driver = messagingv2
topics = {{ mistral_enabled_notification_topics | map(attribute='name') | join(',') }}
{% else %}
driver = noop
{% endif %}
{% if mistral_policy_file is defined %}
[oslo_policy]

View File

@ -89,3 +89,12 @@ murano_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}"
murano_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
murano_dev_mode: "{{ kolla_dev_mode }}"
murano_source_version: "{{ kolla_source_version }}"
####################
# Notifications
####################
murano_notification_topics:
- name: notifications
enabled: "{{ enable_ceilometer | bool }}"
murano_enabled_notification_topics: "{{ murano_notification_topics | selectattr('enabled', 'equalto', true) | list }}"

View File

@ -48,7 +48,12 @@ api_workers = {{ openstack_service_workers }}
[oslo_messaging_notifications]
transport_url = {{ notify_transport_url }}
{% if murano_enabled_notification_topics %}
driver = messagingv2
topics = {{ murano_enabled_notification_topics | map(attribute='name') | join(',') }}
{% else %}
driver = noop
{% endif %}
[oslo_middleware]
enable_proxy_headers_parsing = True

View File

@ -6,3 +6,16 @@ log_dir: "%SYSTEMDRIVE%\\OpenStack\\Log"
freerdp_msi_url: "https://cloudbase.it/downloads/FreeRDPWebConnect.msi"
hyperv_compute_msi: "HyperVNovaCompute.msi"
freerdp_webconnect_msi: "FreeRDPWebConnect.msi"
####################
# Notification
####################
nova_notification_topics:
- name: notifications
enabled: "{{ enable_ceilometer | bool or enable_searchlight | bool or enable_neutron_infoblox_ipam_agent | bool }}"
- name: notifications_designate
enabled: "{{ enable_designate | bool }}"
- name: vitrage_notifications
enabled: "{{ enable_vitrage | bool }}"
nova_enabled_notification_topics: "{{ nova_notification_topics | selectattr('enabled', 'equalto', true) | list }}"

View File

@ -18,3 +18,9 @@ enable_security_group = true
[oslo_messaging_notifications]
transport_url = {{ notify_transport_url }}
{% if nova_enabled_notification_topics %}
driver = messagingv2
topics = {{ nova_enabled_notification_topics | map(attribute='name') | join(',') }}
{% else %}
driver = noop
{% endif %}

View File

@ -60,3 +60,16 @@ auth_type = v3password
[oslo_messaging_notifications]
transport_url = {{ notify_transport_url }}
{% if nova_enabled_notification_topics %}
driver = messagingv2
topics = {{ nova_enabled_notification_topics | map(attribute='name') | join(',') }}
{% else %}
driver = noop
{% endif %}
[notifications]
{% if not enable_searchlight | bool %}
notification_format = unversioned
{% else %}
notification_format = both
{% endif %}

View File

@ -264,6 +264,12 @@ os_interface = internal
{% if enable_ceilometer | bool or enable_searchlight | bool or enable_designate | bool or enable_neutron_infoblox_ipam_agent | bool %}
notify_on_state_change = vm_and_task_state
{% endif %}
{% if not enable_searchlight | bool %}
notification_format = unversioned
{% else %}
notification_format = both
{% endif %}
{% if enable_osprofiler | bool %}
[profiler]

View File

@ -94,3 +94,12 @@ sahara_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}"
sahara_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
sahara_dev_mode: "{{ kolla_dev_mode }}"
sahara_source_version: "{{ kolla_source_version }}"
####################
# Notifications
####################
sahara_notification_topics:
- name: notifications
enabled: "{{ enable_ceilometer | bool }}"
sahara_enabled_notification_topics: "{{ sahara_notification_topics | selectattr('enabled', 'equalto', true) | list }}"

View File

@ -28,9 +28,9 @@ memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansi
[oslo_messaging_notifications]
transport_url = {{ notify_transport_url }}
{% if enable_ceilometer | bool %}
{% if sahara_enabled_notification_topics %}
driver = messagingv2
topics = notifications
topics = {{ sahara_enabled_notification_topics | map(attribute='name') | join(',') }}
{% else %}
driver = noop
{% endif %}

View File

@ -69,3 +69,13 @@ searchlight_logging_debug: "{{ openstack_logging_debug }}"
searchlight_keystone_user: "searchlight"
openstack_searchlight_auth: "{{ openstack_auth }}"
####################
# Notifications
####################
searchlight_notification_topics:
- name: notifications
enabled: "{{ enable_ceilometer | bool }}"
searchlight_enabled_notification_topics: "{{ searchlight_notification_topics | selectattr('enabled', 'equalto', true) | list }}"

View File

@ -36,6 +36,13 @@ memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansi
[oslo_messaging_notifications]
transport_url = {{ notify_transport_url }}
{% if searchlight_enabled_notification_topics %}
driver = messagingv2
topics = {{ searchlight_enabled_notification_topics | map(attribute='name') | join(',') }}
{% else %}
driver = noop
{% endif %}
{% if searchlight_policy_file is defined %}
[oslo_policy]

View File

@ -91,3 +91,13 @@ senlin_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}"
senlin_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
senlin_dev_mode: "{{ kolla_dev_mode }}"
senlin_source_version: "{{ kolla_source_version }}"
####################
# Notifications
####################
senlin_notification_topics:
- name: notifications
enabled: "{{ enable_ceilometer | bool }}"
senlin_enabled_notification_topics: "{{ senlin_notification_topics | selectattr('enabled', 'equalto', true) | list }}"

View File

@ -45,9 +45,9 @@ memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansi
[oslo_messaging_notifications]
transport_url = {{ notify_transport_url }}
{% if enable_ceilometer | bool %}
{% if senlin_enabled_notification_topics %}
driver = messagingv2
topics = notifications
topics = {{ senlin_enabled_notification_topics | map(attribute='name') | join(',') }}
{% else %}
driver = noop
{% endif %}

View File

@ -87,3 +87,12 @@ tacker_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}"
tacker_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
tacker_dev_mode: "{{ kolla_dev_mode }}"
tacker_source_version: "{{ kolla_source_version }}"
####################
# Notifications
####################
tacker_notification_topics:
- name: notifications
enabled: "{{ enable_ceilometer | bool }}"
tacker_enabled_notification_topics: "{{ tacker_notification_topics | selectattr('enabled', 'equalto', true) | list }}"

View File

@ -56,9 +56,9 @@ port = {{ tacker_server_port }}
[oslo_messaging_notifications]
transport_url = {{ notify_transport_url }}
{% if enable_ceilometer | bool %}
{% if tacker_enabled_notification_topics %}
driver = messagingv2
topics = notifications
topics = {{ tacker_enabled_notification_topics | map(attribute='name') | join(',') }}
{% else %}
driver = noop
{% endif %}

View File

@ -111,3 +111,12 @@ trove_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}"
trove_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
trove_dev_mode: "{{ kolla_dev_mode }}"
trove_source_version: "{{ kolla_source_version }}"
####################
# Notifications
####################
trove_notification_topics:
- name: notifications
enabled: "{{ enable_ceilometer | bool }}"
trove_enabled_notification_topics: "{{ trove_notification_topics | selectattr('enabled', 'equalto', true) | list }}"

View File

@ -12,6 +12,12 @@ os_region_name = {{ openstack_region_name }}
[oslo_messaging_notifications]
transport_url = {{ notify_transport_url }}
{% if trove_enabled_notification_topics %}
driver = messagingv2
topics = {{ trove_enabled_notification_topics | map(attribute='name') | join(',') }}
{% else %}
driver = noop
{% endif %}
[database]
connection = mysql+pymysql://{{ trove_database_user }}:{{ trove_database_password }}@{{ trove_database_address }}/{{ trove_database_name }}

View File

@ -36,13 +36,14 @@ max_retries = -1
[oslo_messaging_notifications]
transport_url = {{ notify_transport_url }}
{% if enable_ceilometer | bool %}
{% if trove_enabled_notification_topics %}
driver = messagingv2
topics = notifications
topics = {{ trove_enabled_notification_topics | map(attribute='name') | join(',') }}
{% else %}
driver = noop
{% endif %}
{% if enable_osprofiler | bool %}
[profiler]
enabled = true

View File

@ -42,9 +42,9 @@ auth_type = password
[oslo_messaging_notifications]
transport_url = {{ notify_transport_url }}
{% if enable_ceilometer | bool %}
{% if trove_enabled_notification_topics %}
driver = messagingv2
topics = notifications
topics = {{ trove_enabled_notification_topics | map(attribute='name') | join(',') }}
{% else %}
driver = noop
{% endif %}

View File

@ -160,3 +160,14 @@ vitrage_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}"
vitrage_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
vitrage_dev_mode: "{{ kolla_dev_mode }}"
vitrage_source_version: "{{ kolla_source_version }}"
####################
# Notifications
####################
vitrage_notification_topics:
- name: notifications
enabled: "{{ enable_ceilometer | bool }}"
- name: vitrage_notifications
enabled: True
vitrage_enabled_notification_topics: "{{ vitrage_notification_topics | selectattr('enabled', 'equalto', true) | list }}"

View File

@ -61,8 +61,12 @@ memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansi
[oslo_messaging_notifications]
transport_url = {{ notify_transport_url }}
topics = notifications,vitrage_notifications
{% if vitrage_enabled_notification_topics %}
driver = messagingv2
topics = {{ vitrage_enabled_notification_topics | map(attribute='name') | join(',') }}
{% else %}
driver = noop
{% endif %}
[oslo_concurrency]
lock_path = /var/lib/vitrage/tmp

View File

@ -108,3 +108,13 @@ watcher_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}"
watcher_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
watcher_dev_mode: "{{ kolla_dev_mode }}"
watcher_source_version: "{{ kolla_source_version }}"
####################
# Notifications
####################
watcher_notification_topics:
- name: notifications
enabled: "{{ enable_ceilometer | bool }}"
watcher_enabled_notification_topics: "{{ watcher_notification_topics | selectattr('enabled', 'equalto', true) | list }}"

View File

@ -46,6 +46,12 @@ lock_path = /var/lib/watcher/tmp
[oslo_messaging_notifications]
transport_url = {{ notify_transport_url }}
{% if watcher_enabled_notification_topics %}
driver = messagingv2
topics = {{ watcher_enabled_notification_topics | map(attribute='name') | join(',') }}
{% else %}
driver = noop
{% endif %}
{% if watcher_policy_file is defined %}
[oslo_policy]

View File

@ -0,0 +1,16 @@
---
features:
- |
Standard method to execute the configuration of "oslo_messaging" sections
upgrade:
- |
The ``enable_cadf_notifications`` variable is deprecated. CADF is the default
notification format in keystone. To enable keystone notifications, users should
now set ``keystone_default_notifications_topic_enabled`` to ``yes`` or enable
Ceilometer via ``enable_ceilometer``.
deprecations:
- |
The ``enable_cadf_notifications`` variable is deprecated. CADF is the default
notification format in keystone. To enable keystone notifications, users should
now set ``keystone_default_notifications_topic_enabled`` to ``yes`` or enable
Ceilometer via ``enable_ceilometer``.