From fe2e454f267ea023d3e3447d743c340d93e96539 Mon Sep 17 00:00:00 2001 From: Sam Yaple Date: Thu, 20 Aug 2015 14:37:00 +0000 Subject: [PATCH] Fix RabbitMQ for Ubuntu In rabbitmq we removed the requirement for hostname since that is already installed. Change-Id: Ia2355e332d53763db630d19663c2ddc8bf3aa425 Paritially-Implements: blueprint install-from-ubuntu --- ansible/roles/rabbitmq/templates/rabbitmq-env.conf.j2 | 4 ++++ ansible/roles/rabbitmq/templates/rabbitmq.config.j2 | 4 ++-- docker_templates/rabbitmq/Dockerfile.j2 | 4 +--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ansible/roles/rabbitmq/templates/rabbitmq-env.conf.j2 b/ansible/roles/rabbitmq/templates/rabbitmq-env.conf.j2 index a62cac8932..732a286a02 100644 --- a/ansible/roles/rabbitmq/templates/rabbitmq-env.conf.j2 +++ b/ansible/roles/rabbitmq/templates/rabbitmq-env.conf.j2 @@ -1,3 +1,7 @@ RABBITMQ_NODENAME=rabbit + +# See bug https://bugs.launchpad.net/ubuntu/+source/erlang/+bug/1374109 +{% if not kolla_base_distro in ['ubuntu', 'debian'] %} export ERL_EPMD_ADDRESS={{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }} +{% endif %} export ERL_EPMD_PORT={{ rabbitmq_epmd_port }} diff --git a/ansible/roles/rabbitmq/templates/rabbitmq.config.j2 b/ansible/roles/rabbitmq/templates/rabbitmq.config.j2 index d12b7f2715..6aa3a5fb1c 100644 --- a/ansible/roles/rabbitmq/templates/rabbitmq.config.j2 +++ b/ansible/roles/rabbitmq/templates/rabbitmq.config.j2 @@ -11,10 +11,10 @@ {default_user, <<"{{ rabbitmq_user }}">>}, {default_pass, <<"{{ rabbitmq_password }}">>}, {cluster_partition_handling, autoheal}, - {cluster_nodes, [ + {cluster_nodes, {[ {% for host in groups['rabbitmq'] %}'rabbit@{{ hostvars[host]['ansible_hostname'] }}'{% if not loop.last %},{% endif %}{% endfor %} - ]} + ], disc}} ]}, {rabbitmq_management, [ {listener, [ diff --git a/docker_templates/rabbitmq/Dockerfile.j2 b/docker_templates/rabbitmq/Dockerfile.j2 index 119a303173..1c748eee0b 100644 --- a/docker_templates/rabbitmq/Dockerfile.j2 +++ b/docker_templates/rabbitmq/Dockerfile.j2 @@ -11,9 +11,7 @@ RUN yum -y install \ {% elif base_distro in ['ubuntu', 'debian'] %} -RUN apt-get install -y --no-install-recommends \ - hostname \ - rabbitmq-server \ +RUN apt-get install -y --no-install-recommends rabbitmq-server \ && apt-get clean \ && rm -rf /var/lib/rabbitmq/*