Add variable to globally control notifications enablement and disable RPC
In order to be able to globally enable notification reporting for all services, without an need to have ceilometer deployed or bunch of overrides for each service, we add `oslomsg_notify_enabled` variable that aims to control behaviour of enabled notifications. Presence of ceilometer is still respected by default and being referenced. Potential usecase are various billing panels that do rely on notifications but do not require presence of Ceilometer. This change also disables RPC communication for Glance since there's no signs of RPC usage in Glance code. RabbitMQ seems to be used solely for notifications Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/914144 Change-Id: I92b95acc5ec35468cafe041b277ef9fb3c21c2e4
This commit is contained in:
parent
5044687dfe
commit
1f4d83ef84
@ -129,6 +129,7 @@ keystone_db_connection_recycle_time: "{{ openstack_db_connection_recycle_time |
|
||||
keystone_messaging_enabled: true
|
||||
|
||||
# RPC
|
||||
keystone_oslomsg_rpc_configure: False
|
||||
keystone_oslomsg_rpc_host_group: "{{ oslomsg_rpc_host_group | default('rabbitmq_all') }}"
|
||||
keystone_oslomsg_rpc_setup_host: "{{ (keystone_oslomsg_rpc_host_group in groups) | ternary(groups[keystone_oslomsg_rpc_host_group][0], 'localhost') }}"
|
||||
keystone_oslomsg_rpc_transport: "{{ oslomsg_rpc_transport | default('rabbit') }}"
|
||||
@ -148,6 +149,7 @@ keystone_oslomsg_rpc_ssl_version: "{{ oslomsg_rpc_ssl_version | default('TLSv1_2
|
||||
keystone_oslomsg_rpc_ssl_ca_file: "{{ oslomsg_rpc_ssl_ca_file | default('') }}"
|
||||
|
||||
# Notify
|
||||
keystone_oslomsg_notify_configure: "{{ oslomsg_notify_configure | default(keystone_ceilometer_enabled) }}"
|
||||
keystone_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}"
|
||||
keystone_oslomsg_notify_setup_host: >-
|
||||
{{ (keystone_oslomsg_notify_host_group in groups) | ternary(groups[keystone_oslomsg_notify_host_group][0], 'localhost') }}
|
||||
|
@ -103,12 +103,14 @@
|
||||
when:
|
||||
- "_keystone_is_first_play_host"
|
||||
vars:
|
||||
_oslomsg_rpc_configure: "{{ keystone_oslomsg_rpc_configure }}"
|
||||
_oslomsg_rpc_setup_host: "{{ keystone_oslomsg_rpc_setup_host }}"
|
||||
_oslomsg_rpc_userid: "{{ keystone_oslomsg_rpc_userid }}"
|
||||
_oslomsg_rpc_password: "{{ keystone_oslomsg_rpc_password }}"
|
||||
_oslomsg_rpc_vhost: "{{ keystone_oslomsg_rpc_vhost }}"
|
||||
_oslomsg_rpc_transport: "{{ keystone_oslomsg_rpc_transport }}"
|
||||
_oslomsg_rpc_policies: "{{ keystone_oslomsg_rpc_policies }}"
|
||||
_oslomsg_notify_configure: "{{ keystone_oslomsg_notify_configure }}"
|
||||
_oslomsg_notify_setup_host: "{{ keystone_oslomsg_notify_setup_host }}"
|
||||
_oslomsg_notify_userid: "{{ keystone_oslomsg_notify_userid }}"
|
||||
_oslomsg_notify_password: "{{ keystone_oslomsg_notify_password }}"
|
||||
|
@ -23,6 +23,7 @@ notification_opt_out = {{ opt_out }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if keystone_oslomsg_rpc_configure %}
|
||||
## Oslo.Messaging RPC
|
||||
transport_url = {{ keystone_oslomsg_rpc_transport }}://{% for host in keystone_oslomsg_rpc_servers.split(',') %}{{ keystone_oslomsg_rpc_userid }}:{{ keystone_oslomsg_rpc_password }}@{{ host }}:{{ keystone_oslomsg_rpc_port }}{% if not loop.last %},{% else %}/{{ _keystone_oslomsg_rpc_vhost_conf }}{% if keystone_oslomsg_rpc_use_ssl | bool %}?ssl=1&ssl_version={{ keystone_oslomsg_rpc_ssl_version }}&ssl_ca_file={{ keystone_oslomsg_rpc_ssl_ca_file }}{% else %}?ssl=0{% endif %}{% endif %}{% endfor %}
|
||||
|
||||
@ -30,9 +31,10 @@ transport_url = {{ keystone_oslomsg_rpc_transport }}://{% for host in keystone_o
|
||||
rabbit_quorum_queue = {{ keystone_oslomsg_rabbit_quorum_queues }}
|
||||
rabbit_quorum_delivery_limit = {{ keystone_oslomsg_rabbit_quorum_delivery_limit }}
|
||||
rabbit_quorum_max_memory_bytes = {{ keystone_oslomsg_rabbit_quorum_max_memory_bytes }}
|
||||
{% endif %}
|
||||
|
||||
[oslo_messaging_notifications]
|
||||
{% if keystone_ceilometer_enabled | bool %}
|
||||
{% if keystone_oslomsg_notify_configure | bool %}
|
||||
driver = messagingv2
|
||||
{% set notification_driver = true %}
|
||||
{% endif %}
|
||||
|
Loading…
Reference in New Issue
Block a user