From 13200ace33bae96092ddadc7d7cb926aeb5eb8ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Piliszek?= Date: Fri, 13 Aug 2021 12:47:41 +0000 Subject: [PATCH] Fix kolla-toolbox with IPv6 and disabled RabbitMQ Closes-Bug: #1939883 Change-Id: Ica311acba445cccac1d20757ced6f15a064ebcaa --- ansible/roles/common/tasks/config.yml | 2 ++ ansible/roles/common/templates/kolla-toolbox.json.j2 | 4 ++-- releasenotes/notes/bug-1939883-dbfca874b138cfe9.yaml | 6 ++++++ 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/bug-1939883-dbfca874b138cfe9.yaml diff --git a/ansible/roles/common/tasks/config.yml b/ansible/roles/common/tasks/config.yml index 022570bff3..e8b9040bf4 100644 --- a/ansible/roles/common/tasks/config.yml +++ b/ansible/roles/common/tasks/config.yml @@ -272,6 +272,7 @@ become: true when: - common_services['kolla-toolbox'] | service_enabled_and_mapped_to_host + - enable_rabbitmq | bool - api_address_family == "ipv6" - name: Copy rabbitmq erl_intr to kolla toolbox @@ -283,4 +284,5 @@ become: true when: - common_services['kolla-toolbox'] | service_enabled_and_mapped_to_host + - enable_rabbitmq | bool - api_address_family == "ipv6" diff --git a/ansible/roles/common/templates/kolla-toolbox.json.j2 b/ansible/roles/common/templates/kolla-toolbox.json.j2 index 79c69e92f3..3936f002f3 100644 --- a/ansible/roles/common/templates/kolla-toolbox.json.j2 +++ b/ansible/roles/common/templates/kolla-toolbox.json.j2 @@ -6,7 +6,7 @@ "dest": "/var/lib/rabbitmq/.erlang.cookie", "owner": "rabbitmq", "perm": "0600" - }{% endif %}{% if api_address_family == 'ipv6' %}, + }{% if api_address_family == 'ipv6' %}, { "source": "{{ container_config_directory }}/rabbitmq-env.conf", "dest": "/etc/rabbitmq/rabbitmq-env.conf", @@ -18,7 +18,7 @@ "dest": "/etc/rabbitmq/erl_inetrc", "owner": "rabbitmq", "perm": "0600" - }{% endif %} + }{% endif %}{% endif %} ], "permissions": [ { diff --git a/releasenotes/notes/bug-1939883-dbfca874b138cfe9.yaml b/releasenotes/notes/bug-1939883-dbfca874b138cfe9.yaml new file mode 100644 index 0000000000..ca1de8040e --- /dev/null +++ b/releasenotes/notes/bug-1939883-dbfca874b138cfe9.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixed broken ``kolla-toolbox`` container when RabbitMQ is disabled and + IPv6 is used. + `LP#1939883 `__