invalid error handling for keystone outage

Bug #871871 reported by Jesse Andrews on 2011-10-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Medium
Gabriel Hurley

Bug Description

If keystone is unreachable dashboard reports on login:

Error: Error authenticating with keystone: 'NoneType' object has no attribute 'makefile'

Repo:

1. setup openstack dash+nova+keystone (devstack or your favorite way)
2. kill keystone processes
3. try to login with any user/password

expected:

an error explaining that keystone is unreachable - try again later (and perhaps alert the admin - do we have an exception mailer?)

actual:

an obtuse error from the internal libraries?

Gabriel Hurley (gabriel-hurley) wrote :

Personally, I get "Unexpected error: n/a" but that's still unacceptably useless.

Changed in openstack-dashboard:
assignee: nobody → Gabriel Hurley (gabriel-hurley)
status: New → Confirmed
Gabriel Hurley (gabriel-hurley) wrote :

I can't replicate the "'NoneType' object has no attribute 'makefile'" message. Offhand that seems like a problem in your eventlet or paste modules. A clean install from devstack as of yesterday afternoon doesn't exhibit this behavior for me.

More broadly, the error handling here is dependent on the underlying libraries (openstackx and/or novaclient) returning usable error message, which in this case they basically don't. At best you see an "[Errno 111] ECONNREFUSED" message, or else you get an "n/a" (once auth gets switched to novaclient).

Longer-term we probably need to implement our own status code-based error handling. There's a larger issue of error messages (at login or in the dashboard when a service goes down, etc.) being vague and generally unusable. It then becomes a duplicate of #873125.

Devin Carlen (devcamcar) on 2011-10-20
Changed in horizon:
importance: Undecided → Medium
milestone: none → essex-2
Gabriel Hurley (gabriel-hurley) wrote :

I've added a better error message to python-keystoneclient when it is unable to establish proper communication with Keystone: https://github.com/4P/python-keystoneclient/commit/6c164d2fe01d4a7d2353967397287cc9fcc0c286

Changed in horizon:
status: Confirmed → In Progress

Reviewed: https://review.openstack.org/2158
Committed: http://github.com/openstack/horizon/commit/0cb30bf803f1b6761031aefb1fecf55b6ea5910c
Submitter: Jenkins
Branch: master

 status fixcommitted
 done

commit 0cb30bf803f1b6761031aefb1fecf55b6ea5910c
Author: Gabriel Hurley <email address hidden>
Date: Wed Dec 7 13:07:26 2011 -0800

    Cleanup of splash page error messages and keystone error handling.

    Removed several templates which have not been in use for some time.

    Moved messages tempalte snippet into horizon since we're using it
    there and it's generic anyway.

    Fixed bug 871871.

    Change-Id: I4c9aa22e022b41c5d353c05b0b32cf3e85c376ea

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2011-12-14
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in horizon:
milestone: essex-2 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers