Define paste entrypoints

Bug #1500509 reported by Brant Knudson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Wishlist
lei zhang
oslo.middleware
Fix Released
Undecided
Unassigned

Bug Description

oslo.middleware middlewares should define the entry points for the factories.

In setup.cfg:

[entry_points]
paste.filter_factory =
    request_id = oslo_middleware:RequestId.factory

(Or whatever you want to call the entrypoint)

Then we can use it in keystone instead of defining our own.

Here's how it's used in keystone:

[filter:request_id]
use = egg:keystone#request_id

So we'd change to "use = egg:oslo.middleware#request_id".

And then eventually we can remove the line from keystone-paste.ini.

Brant Knudson (blk-u)
Changed in keystone:
importance: Undecided → Wishlist
Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

We need to be careful about staging the upgrade for this in keystone. The grenade tests should fail if keystone removes the entry point setting in its setup.cfg, but it should be possible to update the paste file and add an entry point to oslo.middleware in the same cycle, then remove the entry point from keystone in the next cycle.

However, it's not clear what paste will do when it finds multiple entry points with the same name. We should test that, maybe it will work fine, but if not we might need to use a different name for the same factory in oslo.middlware to avoid the conflict.

Brant Knudson (blk-u)
description: updated
description: updated
Changed in oslo.middleware:
assignee: nobody → Tom Cocozzello (tjcocozz)
Revision history for this message
Tom Cocozzello (tjcocozz-deactivatedaccount) wrote :
Changed in oslo.middleware:
status: New → In Progress
Changed in oslo.middleware:
status: In Progress → Fix Released
lei zhang (zhang-lei)
Changed in keystone:
assignee: nobody → lei zhang (zhang-lei)
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/263155

Changed in keystone:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/263155
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=5fe12468cfd8445f7ebdd7d6ac940e2b4228a37c
Submitter: Jenkins
Branch: master

commit 5fe12468cfd8445f7ebdd7d6ac940e2b4228a37c
Author: zhang.lei <zhang.lei@99cloud.net>
Date: Mon Jan 4 14:48:25 2016 +0800

    Define paste entrypoints

    Define filter factories so other projects can reference them by name
    and can take advantage of the python egg instead of referencing
    by the direct path.

    Change-Id: I8f2b409e35b44323ef1a4488de5964a0f1bd7cdc
    Closes-Bug: 1500509

Changed in keystone:
status: In Progress → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/keystone 9.0.0.0b2

This issue was fixed in the openstack/keystone 9.0.0.0b2 development milestone.

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.