From 9d8fe891887cafa98c7102f016aee2fb48b25e48 Mon Sep 17 00:00:00 2001
From: Jeffrey Zhang <zhang.lei.fly@gmail.com>
Date: Mon, 3 Oct 2016 23:34:50 +0800
Subject: [PATCH] Handle z stream change for rabbitmq-server

We need install rabbitmq_clusterer plugin in the rabbitmq server folder.
create a rabbitmq_server-3.6 folder to handle the z stream change for
rabbitmq-server.

TrivialFix

Change-Id: I5254c1909f169e542d1a5efc910d5e17a53de7ff
---
 ansible/group_vars/all.yml    | 2 +-
 docker/rabbitmq/Dockerfile.j2 | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml
index edffdef18e..71f86f5d9e 100644
--- a/ansible/group_vars/all.yml
+++ b/ansible/group_vars/all.yml
@@ -306,7 +306,7 @@ enable_kibana: "{{ 'yes' if enable_central_logging | bool else 'no' }}"
 # RabbitMQ options
 ####################
 rabbitmq_user: "openstack"
-rabbitmq_version: "rabbitmq_server-3.6.5/plugins/rabbitmq_clusterer-3.6.x.ez/rabbitmq_clusterer-3.6.x-667f92b0/ebin"
+rabbitmq_version: "rabbitmq_server-3.6/plugins/rabbitmq_clusterer-3.6.x.ez/rabbitmq_clusterer-3.6.x-667f92b0/ebin"
 
 ####################
 # HAProxy options
diff --git a/docker/rabbitmq/Dockerfile.j2 b/docker/rabbitmq/Dockerfile.j2
index 91b77a9d0b..c1a89da210 100644
--- a/docker/rabbitmq/Dockerfile.j2
+++ b/docker/rabbitmq/Dockerfile.j2
@@ -40,7 +40,8 @@ MAINTAINER {{ maintainer }}
 #              process.
 
 RUN rm -rf /var/lib/rabbitmq/* \
-    && curl -o /usr/lib/rabbitmq/lib/rabbitmq_server-3.6.5/plugins/rabbitmq_clusterer-3.6.x-667f92b0.ez http://www.rabbitmq.com/community-plugins/v3.6.x/rabbitmq_clusterer-3.6.x-667f92b0.ez \
+    && ln -s /usr/lib/rabbitmq/lib/rabbitmq_server-3.6.* /usr/lib/rabbitmq/lib/rabbitmq_server-3.6 \
+    && curl -o /usr/lib/rabbitmq/lib/rabbitmq_server-3.6/plugins/rabbitmq_clusterer-3.6.x-667f92b0.ez http://www.rabbitmq.com/community-plugins/v3.6.x/rabbitmq_clusterer-3.6.x-667f92b0.ez \
     && /usr/lib/rabbitmq/bin/rabbitmq-plugins enable --offline \
        rabbitmq_management \
        rabbitmq_clusterer \