[openstack-dev] [all][oslo] config generator default overrides and namespaces

Markus Zoeller mzoeller at de.ibm.com
Mon Mar 14 14:25:28 UTC 2016


Doug Hellmann <doug at doughellmann.com> wrote on 03/11/2016 10:01:44 PM:

> From: Doug Hellmann <doug at doughellmann.com>
> To: openstack-dev <openstack-dev at lists.openstack.org>
> Date: 03/11/2016 10:02 PM
> Subject: [openstack-dev] [all][oslo] config generator default 
> overrides and namespaces
> 
> rbradford found an issue in neutron today with the entry point for
> declaring overrides for defaults for options coming from the cors
> middleware. We then subsequently found the same problem in a bunch of
> other projects, and have submitted patches to fix them [1]. krotscheck
> is reviewing the pending patches to update those before the bad values
> land [2].
> 
> The tl;dr is: Do not name things in your project using names coming
> from other projects.
> 
> In this case, the entry points were named 'oslo.middleware.cors'
> instead of '$project' and so when the config generator was run on
> a system with all projects installed, all of the default override
> functions were being invoked because all versions of the
> oslo.middleware.cors entry point were loaded. As a result, some
> incompatible code was being imported, causing an exception, and so
> the sample file generation for solum failed with a traceback in
> neutron code. Weird.
> 
> If you end up with one of the patches in your project, please assign it
> high review priority but look at it carefully before merging to make
> sure I picked a valid name.
> 
> If you are using this feature in some other way, please check the
> names you're using for the entry points to ensure that they have
> the application name in them somewhere, and do not refer directly
> to the name of a library managed by another team or shared between
> projects.
> 
> I have updated the oslo.config documentation to be more clear about
> this naming restriction [3].
> 
> Doug
> 
> [1] https://review.openstack.org/#/q/topic:fix-config-default
> [2] https://review.openstack.org/#/q/branch:master+topic:bug/1551836
> [3] https://review.openstack.org/#/c/291904/

Thanks Doug and Robert for catching this and providing the fixes!

Regarding potential backports: Do you have information if this is 
something which came up in a specific version in "oslo.config"?

Regards, Markus Zoeller (markus_z)




More information about the OpenStack-dev mailing list