From 48b4b158286c4490117c2abfd07c700208e36663 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Thu, 12 May 2016 13:59:57 -0400 Subject: [PATCH] Avoid _ in rabbitmq_clusterer.config Trying to use ConfigMap's in Kubernetes leads to an interesting problem. We use the file name as the key and the contents of the file as the text value. The ConfigMap is mounted on the container as a volume and the key is then used as the name of the file. The problem is that kubernetes has a limitation on the name of the key https://github.com/kubernetes/kubernetes/blob/release-1.2/docs/design/identifiers.md Which means we cannot use '_' in the name of the file. Closes-Bug: #1581162 Change-Id: I2d9ec80f989c30893b019954fe18b3623d27a076 --- ansible/roles/rabbitmq/tasks/config.yml | 2 +- ...bitmq_clusterer.config.j2 => rabbitmq-clusterer.config.j2} | 0 ansible/roles/rabbitmq/templates/rabbitmq.config.j2 | 2 +- ansible/roles/rabbitmq/templates/rabbitmq.json.j2 | 4 ++-- 4 files changed, 4 insertions(+), 4 deletions(-) rename ansible/roles/rabbitmq/templates/{rabbitmq_clusterer.config.j2 => rabbitmq-clusterer.config.j2} (100%) diff --git a/ansible/roles/rabbitmq/tasks/config.yml b/ansible/roles/rabbitmq/tasks/config.yml index f0f6144a94..28b29ea97c 100644 --- a/ansible/roles/rabbitmq/tasks/config.yml +++ b/ansible/roles/rabbitmq/tasks/config.yml @@ -21,4 +21,4 @@ with_items: - "rabbitmq-env.conf" - "rabbitmq.config" - - "rabbitmq_clusterer.config" + - "rabbitmq-clusterer.config" diff --git a/ansible/roles/rabbitmq/templates/rabbitmq_clusterer.config.j2 b/ansible/roles/rabbitmq/templates/rabbitmq-clusterer.config.j2 similarity index 100% rename from ansible/roles/rabbitmq/templates/rabbitmq_clusterer.config.j2 rename to ansible/roles/rabbitmq/templates/rabbitmq-clusterer.config.j2 diff --git a/ansible/roles/rabbitmq/templates/rabbitmq.config.j2 b/ansible/roles/rabbitmq/templates/rabbitmq.config.j2 index 213a32453d..50c931ef4c 100644 --- a/ansible/roles/rabbitmq/templates/rabbitmq.config.j2 +++ b/ansible/roles/rabbitmq/templates/rabbitmq.config.j2 @@ -18,6 +18,6 @@ {port, {{ rabbitmq_management_port }}} ]} ]}, - {rabbitmq_clusterer, [{config, "/etc/rabbitmq/rabbitmq_clusterer.config"}]} + {rabbitmq_clusterer, [{config, "/etc/rabbitmq/rabbitmq-clusterer.config"}]} ]. % EOF diff --git a/ansible/roles/rabbitmq/templates/rabbitmq.json.j2 b/ansible/roles/rabbitmq/templates/rabbitmq.json.j2 index 82d7ad0bb7..9aef3c6911 100644 --- a/ansible/roles/rabbitmq/templates/rabbitmq.json.j2 +++ b/ansible/roles/rabbitmq/templates/rabbitmq.json.j2 @@ -14,8 +14,8 @@ "perm": "0600" }, { - "source": "{{ container_config_directory }}/rabbitmq_clusterer.config", - "dest": "/etc/rabbitmq/rabbitmq_clusterer.config", + "source": "{{ container_config_directory }}/rabbitmq-clusterer.config", + "dest": "/etc/rabbitmq/rabbitmq-clusterer.config", "owner": "rabbitmq", "perm": "0600" }