From a867d0eb33ee66d8f203e6abe96a2c1ae1eb8521 Mon Sep 17 00:00:00 2001 From: Jimmy McCrory Date: Fri, 22 Jul 2016 12:04:42 -0700 Subject: [PATCH] Provide default for rabbitmq telemetry password In order to maintain current behavior when deploying ceilometer using the integrated release, default 'neutron_rabbitmq_telemetry_password' to 'neutron_rabbitmq_password'. 'neutron_rabbitmq_telemetry_*' vars may be provided by the user as overrides if a separate rabbitmq cluster is being used for telemetry. Also update the configured transport_urls to only include a comma between urls and re-add rabbit configuration information to the oslo_messaging_rabbit block Change-Id: I44b0e385245188e8cdd616e395878db59fea383f --- defaults/main.yml | 1 + templates/neutron.conf.j2 | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 5ee51e77..7e10b20a 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -80,6 +80,7 @@ neutron_rabbitmq_use_ssl: False ## Configuration for notifications communication, i.e. [oslo_messaging_notifications] neutron_rabbitmq_telemetry_userid: "{{ neutron_rabbitmq_userid }}" +neutron_rabbitmq_telemetry_password: "{{ neutron_rabbitmq_password }}" neutron_rabbitmq_telemetry_vhost: "{{ neutron_rabbitmq_vhost }}" neutron_rabbitmq_telemetry_port: "{{ neutron_rabbitmq_port }}" neutron_rabbitmq_telemetry_servers: "{{ neutron_rabbitmq_servers }}" diff --git a/templates/neutron.conf.j2 b/templates/neutron.conf.j2 index 2c3d950a..88b4f726 100644 --- a/templates/neutron.conf.j2 +++ b/templates/neutron.conf.j2 @@ -86,7 +86,7 @@ rpc_backend = {{ neutron_rpc_backend }} executor_thread_pool_size = {{ neutron_rpc_thread_pool_size }} rpc_conn_pool_size = {{ neutron_rpc_conn_pool_size }} rpc_response_timeout = {{ neutron_rpc_response_timeout }} -transport_url = rabbit://{% for host in neutron_rabbitmq_servers.split(',') %}{{ neutron_rabbitmq_userid }}:{{ neutron_rabbitmq_password }}@{{ host }}:{{ neutron_rabbitmq_port }}/{{ neutron_rabbitmq_vhost }}?rabbit_use_ssl={{ neutron_rabbitmq_use_ssl }},{% endfor %} +transport_url = rabbit://{% for host in neutron_rabbitmq_servers.split(',') %}{{ neutron_rabbitmq_userid }}:{{ neutron_rabbitmq_password }}@{{ host }}:{{ neutron_rabbitmq_port }}/{{ neutron_rabbitmq_vhost }}?rabbit_use_ssl={{ neutron_rabbitmq_use_ssl }}{% if not loop.last %},{% endif %}{% endfor %} [nova] auth_plugin = {{ nova_keystone_auth_plugin }} @@ -176,12 +176,17 @@ root_helper = sudo {{ neutron_bin }}/neutron-rootwrap /etc/neutron/rootwrap.conf # Messaging [oslo_messaging_rabbit] +rabbit_port = {{ neutron_rabbitmq_port }} +rabbit_userid = {{ neutron_rabbitmq_userid }} +rabbit_password = {{ neutron_rabbitmq_password }} +rabbit_virtual_host = {{ neutron_rabbitmq_vhost }} +rabbit_hosts = {{ neutron_rabbitmq_servers }} # Notifications {% if neutron_ceilometer_enabled %} [oslo_messaging_notifications] driver = messagingv2 -transport_url = rabbit://{% for host in neutron_rabbitmq_telemetry_servers.split(',') %}{{ neutron_rabbitmq_telemetry_userid }}:{{ neutron_rabbitmq_telemetry_password }}@{{ host }}:{{ neutron_rabbitmq_telemetry_port }}/{{ neutron_rabbitmq_telemetry_vhost }}?rabbit_use_ssl={{ neutron_rabbitmq_telemetry_use_ssl }},{% endfor %} +transport_url = rabbit://{% for host in neutron_rabbitmq_telemetry_servers.split(',') %}{{ neutron_rabbitmq_telemetry_userid }}:{{ neutron_rabbitmq_telemetry_password }}@{{ host }}:{{ neutron_rabbitmq_telemetry_port }}/{{ neutron_rabbitmq_telemetry_vhost }}?rabbit_use_ssl={{ neutron_rabbitmq_telemetry_use_ssl }}{% if not loop.last %},{% endif %}{% endfor %} {% endif %} # Concurrency (locking mechanisms)