Change beaker session backend to database

A memory backend isn't as suitable for production.
Switching the backend to database to see if we
can resolve from session issues we are having on
refstack.openstack.org. This will also allow sessions to
persist across apache restarts.

Change-Id: Iaf98d1f50adc5667a8e3a878b9c91fc9d65eb419
This commit is contained in:
Paul Van Eck 2015-10-12 12:47:45 -07:00
parent a87979a45c
commit 2eb73cb5bd
2 changed files with 7 additions and 2 deletions

View File

@ -213,7 +213,8 @@ def setup_app(config):
beaker_conf = {
'session.key': 'refstack',
'session.type': 'memory',
'session.type': 'ext:database',
'session.url': CONF.database.connection,
'session.timeout': 604800,
'session.validate_key': api_utils.get_token(),
}

View File

@ -196,6 +196,9 @@ class SetupAppTestCase(base.BaseTestCase):
self.CONF.set_override('static_root',
'fake_static_root',
'api')
self.CONF.set_override('connection',
'fake_connection',
'database')
os_join.return_value = 'fake_project_root'
@ -222,7 +225,8 @@ class SetupAppTestCase(base.BaseTestCase):
session_middleware.assert_called_once_with(
'fake_app',
{'session.key': 'refstack',
'session.type': 'memory',
'session.type': 'ext:database',
'session.url': 'fake_connection',
'session.timeout': 604800,
'session.validate_key': get_token.return_value}
)