From 4a43ebe21457b929240ab392f9dac86e3e3b0587 Mon Sep 17 00:00:00 2001 From: Jeffrey Zhang Date: Fri, 8 Jul 2016 10:47:54 +0800 Subject: [PATCH] Fix the memcached config in horizon local_settings When using multi memcached servers, a list of servers should be used rather than a comma joined servers string. Change-Id: I93ed68947465b3e6b0c7fa3cf6c8c4ac94ed0bf2 Closes-Bug: #1600082 (cherry picked from commit 998f8f73745367239a8a67d2c42b6267e7d60b34) --- ansible/roles/horizon/templates/local_settings.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/horizon/templates/local_settings.j2 b/ansible/roles/horizon/templates/local_settings.j2 index 03c2168641..17c6764bfe 100644 --- a/ansible/roles/horizon/templates/local_settings.j2 +++ b/ansible/roles/horizon/templates/local_settings.j2 @@ -132,7 +132,7 @@ SECRET_KEY='{{ horizon_secret_key }}' CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', - 'LOCATION': '{% for host in groups['memcached'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %}', + 'LOCATION': [{% for host in groups['memcached'] %}'{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ memcached_port }}'{% if not loop.last %},{% endif %}{% endfor %}] } }