From 2448db8064a6ef019f4fa75d700345ca65a905e1 Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Thu, 20 Sep 2018 10:30:18 -0400 Subject: [PATCH] Update messaging notification configuration This patch removes 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. Change-Id: Ia66fe9a4c5c18f31fa50e06017389489be8c66a4 --- tasks/main.yml | 1 - tasks/nova_db_setup.yml | 1 - templates/nova.conf.j2 | 12 ++++-------- vars/ubuntu.yml | 1 + 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index a2895cc0..64c3b696 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -122,7 +122,6 @@ _oslomsg_notify_password: "{{ nova_oslomsg_notify_password }}" _oslomsg_notify_vhost: "{{ nova_oslomsg_notify_vhost }}" _oslomsg_notify_transport: "{{ nova_oslomsg_notify_transport }}" - _oslomsg_configure_notify: "{{ (nova_ceilometer_enabled | bool) or (nova_designate_enabled | bool) }}" tags: - common-mq - nova-config diff --git a/tasks/nova_db_setup.yml b/tasks/nova_db_setup.yml index 0130d790..783b3a02 100644 --- a/tasks/nova_db_setup.yml +++ b/tasks/nova_db_setup.yml @@ -119,7 +119,6 @@ {{ nova_bin }}/nova-manage cell_v2 create_cell --name {{ nova_cell1_name }} --database_connection mysql+pymysql://{{ nova_galera_user }}:{{ nova_container_mysql_password }}@{{ nova_galera_address }}/{{ nova_galera_database }}?charset=utf8 - --transport-url {{ nova_oslomsg_rpc_transport }}://{% for host in nova_oslomsg_rpc_servers.split(',') %}{{ nova_oslomsg_rpc_userid }}:{{ nova_oslomsg_rpc_password }}@{{ host }}:{{ nova_oslomsg_rpc_port }}{% if not loop.last %},{% else %}/{{ nova_oslomsg_rpc_vhost }}{% endif %}{% endfor %} become: yes become_user: "{{ nova_system_user_name }}" register: nova_cell1_create diff --git a/templates/nova.conf.j2 b/templates/nova.conf.j2 index b6489c31..9533f6be 100644 --- a/templates/nova.conf.j2 +++ b/templates/nova.conf.j2 @@ -77,19 +77,15 @@ notify_on_state_change = vm_and_task_state {% endif %} # Notifications -{% if nova_ceilometer_enabled or nova_designate_enabled %} [oslo_messaging_notifications] -{% set notification_topics = [] %} -{% if neutron_ceilometer_enabled %} -{% set _ = notification_topics.append('notifications') %} -{% endif %} -{% if neutron_designate_enabled %} +{% set notification_topics = ['notifications'] %} +{% if nova_designate_enabled %} {% set _ = notification_topics.append(nova_notifications_designate) %} {% endif %} -notification_topics = {{ notification_topics | join(',') }} +topics = {{ notification_topics | join(',') }} driver = messagingv2 transport_url = {{ nova_oslomsg_notify_transport }}://{% for host in nova_oslomsg_notify_servers.split(',') %}{{ nova_oslomsg_notify_userid }}:{{ nova_oslomsg_notify_password }}@{{ host }}:{{ nova_oslomsg_notify_port }}{% if not loop.last %},{% else %}/{{ nova_oslomsg_notify_vhost }}{% if nova_oslomsg_notify_use_ssl | bool %}?ssl=1{% else %}?ssl=0{% endif %}{% endif %}{% endfor %} -{% endif %} + # Cache [cache] diff --git a/vars/ubuntu.yml b/vars/ubuntu.yml index 358740cf..6242e507 100644 --- a/vars/ubuntu.yml +++ b/vars/ubuntu.yml @@ -69,6 +69,7 @@ nova_compute_barbican_distro_packages: - cryptsetup nova_compute_oslomsg_amqp1_distro_packages: + - libssl-dev - libsasl2-modules - sasl2-bin