Unable to get local config from wsgi middleware

Bug #1190978 reported by Alvaro Lopez on 2013-06-14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Alvaro Lopez

Bug Description

I am unable to get the local configuration for a wsgi middleware:

    factory = ...
    variable = foo

I am expecting to get the __init__ method called with kwargs = {"variable": "foo"} but it is not. This is because the keystone.common.wsgi.Middleware.factory() method returns cls(app) instead of cls(app, **local_config)

Alvaro Lopez (aloga) on 2013-06-14
Changed in keystone:
status: New → In Progress
assignee: nobody → Alvaro Lopez (aloga)
Dolph Mathews (dolph) on 2013-06-14
Changed in keystone:
importance: Undecided → Wishlist
Alvaro Lopez (aloga) wrote :

Hi Dolph.

This should not be tagged as wishlist, because the code states that this is the expected behaviour (see factory method of keystone.common.wsgi.Middleware) and because this was introduced only after this commit was merged: https://github.com/openstack/keystone/commit/feadf7576058f47f2bb1f0bc097d45101e8c1562

Dolph Mathews (dolph) on 2013-06-14
Changed in keystone:
importance: Wishlist → Low

Reviewed: https://review.openstack.org/33039
Committed: http://github.com/openstack/keystone/commit/a48488764a38961a66ad07c4bf629f220f80334c
Submitter: Jenkins
Branch: master

commit a48488764a38961a66ad07c4bf629f220f80334c
Author: Alvaro Lopez Garcia <email address hidden>
Date: Fri Jun 14 13:47:10 2013 +0200

    wsgi.Middleware factory should use **kwargs

    Fixes bug 1190978

    Change-Id: Ifb0673b7aab5292c13bf5c86c5cc2de8096f7e3e

Changed in keystone:
status: In Progress → Fix Committed
Dolph Mathews (dolph) wrote :

The same is applied to BaseApplication and Router in https://review.openstack.org/#/c/34174/

Reviewed: https://review.openstack.org/34174
Committed: http://github.com/openstack/keystone/commit/8f1c5840d9eb65e4dfa48e54710d42b18dadd77e
Submitter: Jenkins
Branch: master

commit 8f1c5840d9eb65e4dfa48e54710d42b18dadd77e
Author: Alvaro Lopez Garcia <email address hidden>
Date: Mon Jun 24 11:08:48 2013 +0200

    wsgi.BaseApplication and wsgi.Router factories should use **kwargs

    Also removed wrong references to nova in docstrings.

    This is related with bug 1190978

    Change-Id: I1b945596d4ebe39d03069b590b7f1a444eaef72f

Thierry Carrez (ttx) on 2013-07-17
Changed in keystone:
milestone: none → havana-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-10-17
Changed in keystone:
milestone: havana-2 → 2013.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers