Messaging multi-backend support

Allow to set backend-related dependencies
and configurations for oslo.messaging.

Change-Id: I3112a12f972cbaa3c72644c25568976a687966d0
This commit is contained in:
Kirill Bespalov 2016-12-29 12:09:57 +03:00
parent 4d5ce34116
commit 0fd1ecf92f
4 changed files with 16 additions and 13 deletions

View File

@ -10,8 +10,6 @@ osapi_compute_listen_port = {{ nova.api_port.cont }}
metadata_listen = {{ network_topology["private"]["address"] }}
metadata_listen_port = {{ nova.metadata.port.cont }}
transport_url=rabbit://{{ rabbitmq.user }}:{{ rabbitmq.password }}@{{ address('rabbitmq') }}
use_neutron = true
firewall_driver = nova.virt.firewall.NoopFirewallDriver
scheduler_max_attempts = 10
@ -74,17 +72,6 @@ admin_tenant_name = service
api_endpoint = http://{{ address('ironic-api') }}:{{ ironic_api_port }}/v1
{% endif %}
[oslo_messaging_notifications]
{% if searchlight is defined and searchlight.services.nova %}
driver = {{ searchlight.notification_driver }}
notify_on_state_change = vm_and_task_state
{% else %}
driver = noop
{% endif %}
[oslo_messaging_rabbit]
rabbit_ha_queues = false
[oslo_concurrency]
lock_path = /var/lib/nova/tmp
@ -175,3 +162,13 @@ compute = auto
[wsgi]
api_paste_config = /etc/nova/api-paste.ini
[oslo_messaging_notifications]
{% if searchlight is defined and searchlight.services.nova %}
driver = {{ searchlight.notification_driver }}
notify_on_state_change = vm_and_task_state
{% endif %}
{# messaging macros templates #}
{{ oslo_messaging[messaging.backend.notifications]('notifications_config') }}
{{ oslo_messaging[messaging.backend.rpc]('rpc_config') }}

View File

@ -33,6 +33,8 @@ service:
- nova-db-migrations
- nova-libvirt:local
- nova-conductor
- "{{ messaging.dependencies[messaging.backend.rpc] }}"
- "{{ messaging.dependencies[messaging.backend.notifications] }}"
files:
- nova.conf
# {% if nova.libvirt.tls_enable %}

View File

@ -10,6 +10,8 @@ service:
- nova.conf
dependencies:
- nova-db-migrations
- "{{ messaging.dependencies[messaging.backend.rpc] }}"
- "{{ messaging.dependencies[messaging.backend.notifications] }}"
files:
nova.conf:
path: /etc/nova/nova.conf

View File

@ -10,6 +10,8 @@ service:
- nova.conf
dependencies:
- nova-db-migrations
- "{{ messaging.dependencies[messaging.backend.rpc] }}"
- "{{ messaging.dependencies[messaging.backend.notifications] }}"
files:
nova.conf:
path: /etc/nova/nova.conf