Merge "Add variable to globally control notifications enablement and disable RPC"

This commit is contained in:
Zuul 2024-05-09 08:56:11 +00:00 committed by Gerrit Code Review
commit 29e7c33f0d
3 changed files with 7 additions and 1 deletions

View File

@ -107,6 +107,7 @@ glance_enable_v2_api: True
## Oslo Messaging Info
# RPC
glance_oslomsg_rpc_configure: False
glance_oslomsg_rpc_host_group: "{{ oslomsg_rpc_host_group | default('rabbitmq_all') }}"
glance_oslomsg_rpc_setup_host: "{{ (glance_oslomsg_rpc_host_group in groups) | ternary(groups[glance_oslomsg_rpc_host_group][0], 'localhost') }}"
glance_oslomsg_rpc_transport: "{{ oslomsg_rpc_transport | default('rabbit') }}"
@ -126,6 +127,7 @@ glance_oslomsg_rpc_ssl_version: "{{ oslomsg_rpc_ssl_version | default('TLSv1_2')
glance_oslomsg_rpc_ssl_ca_file: "{{ oslomsg_rpc_ssl_ca_file | default('') }}"
# Notify
glance_oslomsg_notify_configure: "{{ oslomsg_notify_configure | default(glance_ceilometer_enabled) }}"
glance_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}"
glance_oslomsg_notify_setup_host: "{{ (glance_oslomsg_notify_host_group in groups) | ternary(groups[glance_oslomsg_notify_host_group][0], 'localhost') }}"
glance_oslomsg_notify_transport: "{{ oslomsg_notify_transport | default('rabbit') }}"

View File

@ -81,12 +81,14 @@
_oslomsg_rpc_vhost: "{{ glance_oslomsg_rpc_vhost }}"
_oslomsg_rpc_transport: "{{ glance_oslomsg_rpc_transport }}"
_oslomsg_rpc_policies: "{{ glance_oslomsg_rpc_policies }}"
_oslomsg_rpc_configure: "{{ glance_oslomsg_rpc_configure }}"
_oslomsg_notify_setup_host: "{{ glance_oslomsg_notify_setup_host }}"
_oslomsg_notify_userid: "{{ glance_oslomsg_notify_userid }}"
_oslomsg_notify_password: "{{ glance_oslomsg_notify_password }}"
_oslomsg_notify_vhost: "{{ glance_oslomsg_notify_vhost }}"
_oslomsg_notify_transport: "{{ glance_oslomsg_notify_transport }}"
_oslomsg_notify_policies: "{{ glance_oslomsg_notify_policies }}"
_oslomsg_notify_configure: "{{ glance_oslomsg_notify_configure }}"
tags:
- always

View File

@ -16,7 +16,9 @@ worker_self_reference_url = {{ (glance_backend_ssl | ternary('https', 'http')) ~
enable_v2_api = {{ glance_enable_v2_api | bool }}
{% if glance_oslomsg_rpc_configure %}
transport_url = {{ glance_oslomsg_rpc_transport }}://{% for host in glance_oslomsg_rpc_servers.split(',') %}{{ glance_oslomsg_rpc_userid }}:{{ glance_oslomsg_rpc_password }}@{{ host }}:{{ glance_oslomsg_rpc_port }}{% if not loop.last %},{% else %}/{{ _glance_oslomsg_rpc_vhost_conf }}{% if glance_oslomsg_rpc_use_ssl | bool %}?ssl=1&ssl_version={{ glance_oslomsg_rpc_ssl_version }}&ssl_ca_file={{ glance_oslomsg_rpc_ssl_ca_file }}{% else %}?ssl=0{% endif %}{% endif %}{% endfor %}
{% endif %}
scrub_time = 43200
@ -83,7 +85,7 @@ rabbit_quorum_max_memory_bytes = {{ glance_oslomsg_rabbit_quorum_max_memory_byte
[oslo_messaging_notifications]
topics = notifications
driver = {{ (glance_ceilometer_enabled | bool) | ternary('messagingv2', 'noop') }}
driver = {{ (glance_oslomsg_notify_configure | bool) | ternary('messagingv2', 'noop') }}
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_conf }}{% if glance_oslomsg_notify_use_ssl | bool %}?ssl=1&ssl_version={{ glance_oslomsg_notify_ssl_version }}&ssl_ca_file={{ glance_oslomsg_notify_ssl_ca_file }}{% else %}?ssl=0{% endif %}{% endif %}{% endfor %}
[paste_deploy]