Browse Source

Use memcached for storing sessions

murano doesn't work with signed_cookies backend
sqlite backend should not be used in case of several horizon's

Change-Id: Ibb5e8020388c7173a390a7f1d85bdc020cb038c5
Andrey Pavlov 2 years ago
parent
commit
658edf7f99
1 changed files with 2 additions and 4 deletions
  1. 2
    4
      docker/horizon/Dockerfile.j2

+ 2
- 4
docker/horizon/Dockerfile.j2 View File

@@ -27,8 +27,7 @@ RUN mkdir -p /etc/openstack-dashboard /home/horizon /var/www/cgi-bin/horizon \
27 27
     && cp /horizon/manage.py /var/lib/microservices/venv/bin/manage.py \
28 28
     && /var/lib/microservices/venv/bin/python /var/lib/microservices/venv/bin/manage.py collectstatic --noinput --clear \
29 29
     && chown -R horizon: /etc/openstack-dashboard /home/horizon /var/lib/microservices/venv/lib/python2.7/site-packages/static /horizon \
30
-    && /var/lib/microservices/venv/bin/python /var/lib/microservices/venv/bin/manage.py compress --force \
31
-    && cd /home/horizon ; /var/lib/microservices/venv/bin/python /var/lib/microservices/venv/bin/manage.py migrate --noinput
30
+    && /var/lib/microservices/venv/bin/python /var/lib/microservices/venv/bin/manage.py compress --force
32 31
 
33 32
 ENV PATH /var/lib/venv/bin:$PATH
34 33
 
@@ -36,8 +35,7 @@ ENV PATH /var/lib/venv/bin:$PATH
36 35
 RUN sed -i "s#'../..'#os.path.realpath('../..')#" /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/wsgi/django.wsgi
37 36
 
38 37
 # TODO (amogylchenko): remove ugly sed for session_engine
39
-# Seems related to https://bugs.launchpad.net/murano/+bug/1465767
40
-RUN sed -i "s/^SESSION_ENGINE = .*/SESSION_ENGINE = 'django.contrib.sessions.backends.signed_cookies'/g" /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/local/local_settings.d/_50_murano.py
38
+RUN sed -i "s/^SESSION_ENGINE = .*/SESSION_ENGINE = 'django.contrib.sessions.backends.cache'/g" /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/local/local_settings.d/_50_murano.py
41 39
 
42 40
 COPY daemon.sh /usr/local/bin/daemon.sh
43 41
 COPY horizon_sudoers /etc/sudoers.d/horizon_sudoers

Loading…
Cancel
Save