diff options
| author | Paul Bourke <paul.bourke@oracle.com> | 2016-10-05 11:07:15 +0100 |
|---|---|---|
| committer | Paul Bourke <paul.bourke@oracle.com> | 2016-10-05 12:12:35 +0100 |
| commit | 792f16cc9f1d30eb4aaa8f0e8218e4cfc82ae572 (patch) | |
| tree | 8340bf36d3a88b1ffa1ccb590539ee479cb6fd8f | |
| parent | cc0709792ba0d9fa03e53307f3fa833d4e44552b (diff) | |
| download | kolla-792f16cc9f1d30eb4aaa8f0e8218e4cfc82ae572.tar.gz kolla-792f16cc9f1d30eb4aaa8f0e8218e4cfc82ae572.zip | |
Fix horizon to use cache
Horizon was missing SESSION_ENGINE from it's conf which means it was not
making use of memcached.
Change-Id: I450aee05f59e344902f1e92d913f4c1ce9e8dcc6
Closes-Bug: 1630509
| -rw-r--r-- | ansible/roles/horizon/templates/local_settings.j2 | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ansible/roles/horizon/templates/local_settings.j2 b/ansible/roles/horizon/templates/local_settings.j2 index cabaf99af..c5abb28d3 100644 --- a/ansible/roles/horizon/templates/local_settings.j2 +++ b/ansible/roles/horizon/templates/local_settings.j2 @@ -158,6 +158,8 @@ SECRET_KEY='{{ horizon_secret_key }}' # }, #} +{% if groups['memcached'] | length > 0 and horizon_backend_database | bool == False %} +SESSION_ENGINE = 'django.contrib.sessions.backends.cache' CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', @@ -169,6 +171,7 @@ CACHES = { {%- endif %} } } +{% endif %} # Send email to the console by default EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' |
