From 7e9fa0cd41b72d157f4c88f9ec533aafd60bfefe Mon Sep 17 00:00:00 2001 From: John Garbutt Date: Tue, 5 Sep 2017 11:17:59 +0100 Subject: [PATCH] Make outward_rabbit pre-checks idempotent Copy the patterns from the rabbit checks, skip some pre-checks when the container has already been started. Without this change the pre-checks fail when you re-run the deploy, i.e. the port is not free because rabbit is already running on that port. This bug was triggered because murano is enabled, and this change has been added to add the extra rabbitmq instance by default: d8fe3ea780c188b6e937ab6f08a8475d2330a9fa Closes-Bug: #1715135 Change-Id: I0eb8785e7cd4eadfa792ea14a27f54a891b2bf02 --- ansible/roles/rabbitmq/tasks/precheck.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ansible/roles/rabbitmq/tasks/precheck.yml b/ansible/roles/rabbitmq/tasks/precheck.yml index e9a4662088..6e6584fc25 100644 --- a/ansible/roles/rabbitmq/tasks/precheck.yml +++ b/ansible/roles/rabbitmq/tasks/precheck.yml @@ -3,6 +3,7 @@ kolla_container_facts: name: - rabbitmq + - outward_rabbitmq register: container_facts - name: Checking free port for RabbitMQ @@ -69,6 +70,7 @@ when: - enable_outward_rabbitmq | bool - inventory_hostname in groups['outward-rabbitmq'] + - container_facts['outward_rabbitmq'] is not defined - name: Checking free port for outward RabbitMQ Management wait_for: @@ -79,6 +81,7 @@ when: - enable_outward_rabbitmq | bool - inventory_hostname in groups['outward-rabbitmq'] + - container_facts['outward_rabbitmq'] is not defined - name: Checking free port for outward RabbitMQ Cluster wait_for: @@ -89,6 +92,7 @@ when: - enable_outward_rabbitmq | bool - inventory_hostname in groups['outward-rabbitmq'] + - container_facts['outward_rabbitmq'] is not defined - name: Checking free port for outward RabbitMQ EPMD wait_for: @@ -99,6 +103,7 @@ when: - enable_outward_rabbitmq | bool - inventory_hostname in groups['outward-rabbitmq'] + - container_facts['outward_rabbitmq'] is not defined - name: Check if all outward rabbit hostnames are resolvable command: "getent ahostsv4 {{ hostvars[item]['ansible_hostname'] }}"