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
This commit is contained in:
Jeffrey Zhang 2016-07-08 10:47:54 +08:00
parent 5c2c0a9c2b
commit 998f8f7374

View File

@ -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 %}]
}
}