Endpoint handling broken on SQL backend by portable-identifiers changes

Bug #909255 reported by Ewan Mellor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Undecided
Ewan Mellor

Bug Description

The changes for the portable-identifiers blueprint have broken the endpoint calls endpoint_get_by_tenant_get_page, endpoint_get_by_tenant_get_page_markers, endpoint_add, endpoint_get, and endpoint_get_by_tenant.

All of these calls need to translate from uid to id or the reverse, and they are attempting to do so, but the condition under which they do the translation is wrong. All other calls are using hasattr(api.TENANT, 'uid_to_id') or similar, but the ones in endpoint_template.py are using isinstance(api.TENANT, models.Tenant). This latter test fails, the IDs aren't translated, and so the database inserts / lookups are all using a uid where they should be using an integer ID and vice versa.

Ewan Mellor (ewanmellor)
Changed in keystone:
status: New → In Progress
assignee: nobody → Ewan Mellor (ewanmellor)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

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

Revision history for this message
Ewan Mellor (ewanmellor) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/2645
Committed: http://github.com/openstack/keystone/commit/3f2b53586ca804115d8cf91e43f63ec7a300e82c
Submitter: Jenkins
Branch: master

commit 3f2b53586ca804115d8cf91e43f63ec7a300e82c
Author: Ewan Mellor <email address hidden>
Date: Tue Dec 27 22:45:36 2011 -0800

    Bug #909255: Endpoint handling broken on SQL backend by portable-identifiers changes

    When deciding whether to translate UIDs to integer IDs or vice versa, use
    hasattr(api.TENANT, 'uid_to_id') or hasattr(api.TENANT, 'id_to_uid') in place
    of isinstance(api.TENANT, models.Tenant). This matches the code elsewhere
    (e.g. user.py) and has the effect that the IDs will be translated correctly.

    Change-Id: Ia036bf310d48f8f8aa5739cb3e09d1f7364ad1a4

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: none → essex-3
Thierry Carrez (ttx)
Changed in keystone:
milestone: essex-3 → 2012.1
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.