keystone client reports 500 error if database service is not running

Bug #1566188 reported by Sheel Rana
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Won't Fix
Wishlist
Unassigned

Bug Description

When running keystone command to authenticate from cinderclient, keystone reports 500 internal server error.

> /usr/local/lib/python2.7/dist-packages/keystoneclient/adapter.py(116)get_token()
-> return self.session.get_token(auth or self.auth)
(Pdb)
InternalServerError: Internal...24d54)',)
> /usr/local/lib/python2.7/dist-packages/keystoneclient/adapter.py(116)get_token()
-> return self.session.get_token(auth or self.auth)
(Pdb) locals()
{'self': <cinderclient.client.SessionClient object at 0x7fa4e5f9d5d0>, '__exception__': (<class 'keystoneauth1.exceptions.http.InternalServerError'>, InternalServerError(u'An unexpected error prevented the server from fulfilling your request. (HTTP 500) (Request-ID: req-e4fbb478-79f4-4529-b061-512b29324d54)',)), 'auth': None}

It should report 400 error with proper details..

Steps to reproduce:

1. stop mysql.
2. run cinder list or any command.(It internally call keystone client to authenticate the request)
3. check output..

Vishal (vishaldhanopia)
Changed in keystone:
assignee: nobody → Mark (rocky-asdf)
Revision history for this message
Boris Bobrov (bbobrov) wrote :

InternalServerError is exactly what's happening when database is not available. Keystone is not expected to run without database. This should be closed as wontfix.

Revision history for this message
Sheel Rana (ranasheel2000) wrote :

Actually we can say that this is actual error but should we show this to user or should we add some better description like database is not running due to which error occured?

Also, there is difference in output when we execute this with v2 and v3 of keystone.
Kindly check. (In V3, right output is shown to user.)

So, this should not be closed as wont fix..

Revision history for this message
Sheel Rana (ranasheel2000) wrote :

*update to last comment(some text is removed)*

Actually we can say that this is actual error but should we show this to user or should we add some better description like database is not running due to which error occured?

So, this should not be closed as wont fix..

Revision history for this message
Steve Martinelli (stevemar) wrote :

I suppose we could have an error message stating the database is offline / not connected. But as Boris said, this is a pretty broken setup, as such, marking it as wishlist.

Changed in keystone:
importance: Undecided → Wishlist
Vishal (vishaldhanopia)
Changed in keystone:
assignee: Mark (rocky-asdf) → nobody
Revision history for this message
Morgan Fainberg (mdrnstm) wrote :

The database being offline is both unexpected and totally an "ISE" (internal server error). This would in fact be what I'd expect from a web service.

I'm marking this as "wont fix"

Changed in keystone:
status: New → Won't Fix
Revision history for this message
Morgan Fainberg (mdrnstm) wrote :

This is an unrecoverable state, it is not a "bad request" HTTP 400. It is in-fact an internal server error.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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