no keystone endpoint gives bad error message

Bug #1208991 reported by Jay Buffington
26
This bug affects 6 people
Affects Status Importance Assigned to Milestone
python-keystoneclient
Fix Released
Medium
Steve Martinelli

Bug Description

If you try to list endpoints when there is no keystone

    $ keystone endpoint-list
    OS Password:
    +----------------------------------+--------+---------------------------------------------------------------+---------------------------------------------------------------+---------------------------------------------------------------+----------------------------------+
    | id | region | publicurl | internalurl | adminurl | service_id |
    +----------------------------------+--------+---------------------------------------------------------------+---------------------------------------------------------------+---------------------------------------------------------------+----------------------------------+
    | 2782708b08ac4cb39c5c50db186557da | mr | http://neutron-open.example.com:9696 | http://neutron-open.example.com:9696 | http://neutron-open.example.com:9696 | bd0f191fb7bc4beeaf0cfe782b6675be |
    | 2f7ddb958ce74838ab32bf502678c0ea | mr | http://nova-controller-open.example.com:8774/v2/%(tenant_id)s | http://nova-controller-open.example.com:8774/v2/%(tenant_id)s | http://nova-controller-open.example.com:8774/v2/%(tenant_id)s | a8c47f64f591492692c23938a2729310 |
    | 4adad8a5ff9c47f5a3508a091cf8aca1 | mr | https://keystone-open.example.com:5000/v2.0 | https://keystone-open.example.com:5000/v2.0 | https://keystone-open.example.com:35357/v2.0 | fdceaf0ae994434388b0c867ab833e33 |
    | ad6cf1833b304c28bf11e4c6f1f52791 | mr | http://glance-open.example.com:9292 | http://glance-open.example.com:9292 | http://glance-open.example.com:9292 | fc0e9fdab0c449b8b36335ca0f276c93 |
    +----------------------------------+--------+---------------------------------------------------------------+---------------------------------------------------------------+---------------------------------------------------------------+----------------------------------+

    $ keystone endpoint-delete 4adad8a5ff9c47f5a3508a091cf8aca1
    OS Password:
    Endpoint has been deleted.

    $ keystone endpoint-list
    OS Password:
    Unable to authorize user

A better error message would be "No keystone endpoint defined"

Revision history for this message
Dolph Mathews (dolph) wrote :

That is *really* bad feedback. It should either specify that "no admin identity endpoint could be found in the returned service catalog", or (possibly) attempt to use the auth_url as a management_url.

Can you reproduce with --debug in that last command, e.g. `keystone --debug endpoint-list`, and post the output here? I just want to ensure that it wasn't actually a 401 (in which case, this would be expected feedback).

affects: keystone → python-keystoneclient
Changed in python-keystoneclient:
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Jay Buffington (jaybuff) wrote :
Revision history for this message
Dolph Mathews (dolph) wrote :

Should this be considered an instance of bug 1210625?

Changed in python-keystoneclient:
status: Incomplete → Triaged
Revision history for this message
Jay Buffington (jaybuff) wrote :

It could be considered an instance of 1210625, but maybe not because AuthorizationFailure is what is being thrown and caught in this instance:

From "keystoneclient/shell.py" line 432 of git commit 7eb6f8051:
        except exc.AuthorizationFailure:
            raise exc.CommandError("Unable to authorize user")

So I'd argue that AuthorizationFailure shouldn't be thrown when (for instance) there is an HTTP connection issue, making this a separate issue.

Changed in python-keystoneclient:
assignee: nobody → Jorge Edgar Valderrama Romero (jorge-valderrama)
Revision history for this message
Jorge Edgar Valderrama Romero (jorge-valderrama) wrote :

This is the implementation to the solution proposed by Dolph Mathews that is attempt to use the auth_url as a management url when no admin identity enpoint is not found, covering the wrong message error that currently does.
https://review.openstack.org/#/c/55405/

Changed in python-keystoneclient:
status: Triaged → In Progress
rajiv (rajiv-kumar)
Changed in python-keystoneclient:
assignee: Jorge Edgar Valderrama Romero (jorge-valderrama) → rajiv (rajiv-kumar)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-keystoneclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/155260

Changed in python-keystoneclient:
assignee: rajiv (rajiv-kumar) → David Stanek (dstanek)
Changed in python-keystoneclient:
assignee: David Stanek (dstanek) → Steve Martinelli (stevemar)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-keystoneclient (master)

Reviewed: https://review.openstack.org/155260
Committed: https://git.openstack.org/cgit/openstack/python-keystoneclient/commit/?id=1d17c70315a6f372b93f58973b10a3244a9a8b85
Submitter: Jenkins
Branch: master

commit 1d17c70315a6f372b93f58973b10a3244a9a8b85
Author: rajiv <email address hidden>
Date: Thu Feb 12 16:38:12 2015 +0530

    No keystone Endpoint now gives a valid Error Message

    When no valid keystone endpoint exist, EndpointNotFound exception
    is raised with an error message

    Change-Id: I75b00cb73b18bc19261c061e0ae217ef251f8853
    Closes-Bug: #1208991

Changed in python-keystoneclient:
status: In Progress → Fix Committed
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/python-keystoneclient 2.0.0

This issue was fixed in openstack/python-keystoneclient 2.0.0 release.

Changed in python-keystoneclient:
status: Fix Committed → Fix Released
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.