[openstack-dev] [oslo][keystone] oslo_config and wsgi middlewares

Julien Danjou julien at danjou.info
Thu Aug 6 17:03:28 UTC 2015


On Thu, Aug 06 2015, Mehdi Abaakouk wrote:

> This is confusing for developer to have some middlewares that need pre-setup,
> enforce them to rely on global python object, and some others not.
> This is confusing for deployer their can't do the configuration of middlewares
> in the same way for each middlewares and each projects.

Agreed, this is a terrible design.

> Do you agree:
>
> * all openstack middlewares should load their options with oslo.config ?
>  this permits type checking and all other features it provides, it's cool :)
>  configuration in paste-deploy conf is thing of past

That sounds like a good idea.

> * we must support local AND global oslo.config object ?
>  This is an application choice not something enforced by middleware.
>  The deployer experience should be the same in both case.

Well, I guess if you support local you can anyway use the global as
local. :)

> * the middleware must be responsible of the section name in the oslo.config ?
>  Gnocchi/Zaqar hack have to hardcode the section name in their code, this
> doesn't looks good.

I'd think so.

> * we must support legacy python signature for WSGI object, MyMiddleware(app,
> options_as_dict) ? To be able to use paste for
>  application/deployer that want it and not break already deployed
> things.

Definitely agreed.

> Possible solution:
> ------------------
>
> I have already started to work on something that do all of that for all
> middlewares [5], [6]
>

[…]

> I have already tested that in Gnocchi and Aodh, and that solves all of my
> issues. Remove all hacks, the application doesn't need special pre
> setup. All our middleware become normal middleware but still can use
> oslo.config.
> WDYT ?

I already +2 some of the patches, I think the approach is good and sane,
and I honestly don't have anything better so thank you Mehdi. :)

Cheers,
-- 
Julien Danjou
;; Free Software hacker
;; http://julien.danjou.info
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 800 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150806/1d42e801/attachment.pgp>


More information about the OpenStack-dev mailing list