From 61848d3de20fc6e6931b96a5deb08c1d822bca0e Mon Sep 17 00:00:00 2001 From: Jimmy McCrory Date: Fri, 22 Jul 2016 12:04:47 -0700 Subject: [PATCH] Provide default for rabbitmq telemetry password In order to maintain current behavior when deploying ceilometer using the integrated release, default 'keystone_rabbitmq_telemetry_password' to 'keystone_rabbitmq_password'. 'keystone_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: I310dd2397fdee97790be5e5488a6461b8699ecf4 --- defaults/main.yml | 1 + templates/keystone.conf.j2 | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index e00a4874..a22588a6 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -104,6 +104,7 @@ keystone_rabbitmq_use_ssl: false ## Configuration for notifications communication, i.e. [oslo_messaging_notifications] keystone_rabbitmq_telemetry_userid: "{{ keystone_rabbitmq_userid }}" +keystone_rabbitmq_telemetry_password: "{{ keystone_rabbitmq_password }}" keystone_rabbitmq_telemetry_vhost: "{{ keystone_rabbitmq_vhost }}" keystone_rabbitmq_telemetry_port: "{{ keystone_rabbitmq_port }}" keystone_rabbitmq_telemetry_servers: "{{ keystone_rabbitmq_servers }}" diff --git a/templates/keystone.conf.j2 b/templates/keystone.conf.j2 index f8ae4f38..ec24b86d 100644 --- a/templates/keystone.conf.j2 +++ b/templates/keystone.conf.j2 @@ -19,15 +19,21 @@ log_dir = /var/log/keystone ## RabbitMQ RPC {% if keystone_messaging_enabled | bool %} rpc_backend = {{ keystone_rpc_backend }} -transport_url = rabbit://{% for host in keystone_rabbitmq_servers.split(',') %}{{ keystone_rabbitmq_userid }}:{{ keystone_rabbitmq_password }}@{{ host }}:{{ keystone_rabbitmq_port }}/{{ keystone_rabbitmq_vhost }}?rabbit_use_ssl={{ keystone_rabbitmq_use_ssl }},{% endfor %} +transport_url = rabbit://{% for host in keystone_rabbitmq_servers.split(',') %}{{ keystone_rabbitmq_userid }}:{{ keystone_rabbitmq_password }}@{{ host }}:{{ keystone_rabbitmq_port }}/{{ keystone_rabbitmq_vhost }}?rabbit_use_ssl={{ keystone_rabbitmq_use_ssl }}{% if not loop.last %},{% endif %}{% endfor %} [oslo_messaging_rabbit] +rabbit_port = {{ keystone_rabbitmq_port }} +rabbit_userid = {{ keystone_rabbitmq_userid }} +rabbit_password = {{ keystone_rabbitmq_password }} +rabbit_virtual_host = {{ keystone_rabbitmq_vhost }} +rabbit_hosts = {{ keystone_rabbitmq_servers }} +rabbit_use_ssl = {{ keystone_rabbitmq_use_ssl }} {% endif %} {% if keystone_ceilometer_enabled %} [oslo_messaging_notifications] driver = messagingv2 -transport_url = rabbit://{% for host in keystone_rabbitmq_telemetry_servers.split(',') %}{{ keystone_rabbitmq_telemetry_userid }}:{{ keystone_rabbitmq_telemetry_password }}@{{ host }}:{{ keystone_rabbitmq_telemetry_port }}/{{ keystone_rabbitmq_telemetry_vhost }}?rabbit_use_ssl={{ keystone_rabbitmq_telemetry_use_ssl }},{% endfor %} +transport_url = rabbit://{% for host in keystone_rabbitmq_telemetry_servers.split(',') %}{{ keystone_rabbitmq_telemetry_userid }}:{{ keystone_rabbitmq_telemetry_password }}@{{ host }}:{{ keystone_rabbitmq_telemetry_port }}/{{ keystone_rabbitmq_telemetry_vhost }}?rabbit_use_ssl={{ keystone_rabbitmq_telemetry_use_ssl }}{% if not loop.last %},{% endif %}{% endfor %} {% endif %} {% if 'memcache' in keystone_token_driver and 'fernet' not in keystone_token_provider %}