intermittent errors and login page

Bug #968850 reported by Jason Brittain
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Invalid
Undecided
Gabriel Hurley
horizon (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

My horizon was installed from deb packages here:

https://launchpad.net/~openstack-ppa/+archive/milestone-proposed

Description of the problem:
I can log into the dashboard, but any click of any tab *might* bring me to the login page, showing me an error saying either that I do not have access to the tab I clicked, or that I'm not logged in, and it asks me to log in again. If I then log in, I go to the tab I had clicked (page loads fine). Then, if I click another tab it will either show that tab page or do the same thing: bring me back to the login page and make me log in again. On Firefox 11, I get sent back to the login page *every* click. On Chrome 18, often I can click around to different tabs as long as I do that quickly (like one click about every half second).. but eventually it will also show me an error and ask me to log in again.

This behavior is 100% reproducible in my current installation.

Revision history for this message
Jason Brittain (jason-brittain) wrote :

When I run the Horizon development server like this:

# cd /usr/share/openstack-dashboard
# python manage.py runserver 0.0.0.0:8000

.. it just works.. I don't see the login page all the time when I'm clicking around. Before, I was running it from Apache, so this bug must have to do with running Horizon through Apache.

Devin Carlen (devcamcar)
Changed in horizon:
milestone: none → essex-rc2
Revision history for this message
Gabriel Hurley (gabriel-hurley) wrote :

This is a config problem in the upstream debian package. Using the default "local memory" cache backend for sessions with Apache's multi-process worker model causes separate session data to be stored for each Apache worker. Devstack had this exact same problem months ago.

The upstream package should decide what it wants to use for an alternative session backend (memcached, database-backed, file-backed, or even cookie-based if Django 1.4 is installed) and update their config accordingly. I believe devstack chose to use an sqlite database backend for simplicity's sake.

I'm closing this for the core Horizon project since the changes need to happen upstream, but if you need help with settings on the fix, feel free to ask.

Changed in horizon:
status: New → Invalid
assignee: nobody → Gabriel Hurley (gabriel-hurley)
milestone: essex-rc2 → none
Revision history for this message
Jason Brittain (jason-brittain) wrote :

Alright.

".. if you need help with settings on the fix, feel free to ask."

Okay, yes, a URL to the web page describing what to configure to make this stop would certainly help.

Thanks!

Revision history for this message
Jason Brittain (jason-brittain) wrote :

This is apparently a URL for people to see, having a configuration fix that worked for me:

https://bugs.launchpad.net/ubuntu/+source/openstack-dashboard/+bug/960070

I edited /etc/openstack-dashboard/local_settings.py to make it look like this:

# We recommend you use memcached for development; otherwise after every reload
# of the django development server, you will have to login again. To use
# memcached set CACHE_BACKED to something like 'memcached://127.0.0.1:11211/'
# CACHE_BACKEND = 'locmem://'
CACHE_BACKEND = 'dummy://'
SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db'

Then I restarted apache HTTPD:

$ sudo service apache2 restart

After that, the error/login page behavior goes away.

Chuck Short (zulcss)
affects: openstack-dashboard (Ubuntu) → horizon (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in horizon (Ubuntu):
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package horizon - 2012.1-0ubuntu7

---------------
horizon (2012.1-0ubuntu7) precise; urgency=low

  * debian/patches/use-memcache.patch: Use memcache for session engine by
    default to avoid frequent logouts, as sessions are not shared across
    workers. LP: #968850
 -- Dave Walker (Daviey) <email address hidden> Wed, 25 Apr 2012 10:55:18 +0100

Changed in horizon (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.