nondeterministic ordering of entry points from ExtensionManager

Bug #1619725 reported by Brian Rosmaita
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
stevedore
Expired
Undecided
Unassigned

Bug Description

I don't know if this is something to be fixed or maybe just the subject of a "best practice" doc for using stevedore+oslo.config generator.

The issue came up in a glance_store bug [0] where oslo.config generator appeared to be changing the ordering of some config options from run to run (it was changing the order of the driver options). Turned out that glance_store was calling ExtensionManager to get a list of entry points and using that to gather the options. If the list is sorted, the problem goes away [1].

I'm bringing it up here, because it was hard to track down. All the relevant data structures in Stevedore are ordered; I think the nondeterminism is coming from pkg_resources, maybe [2]. I don't know whether it makes sense for Stevedore to sort the list [3] or not. (I'm starting to think not, but after typing all this, I'm going to submit and let you decide.)

[0] https://bugs.launchpad.net/glance-store/+bug/1619487
[1] https://review.openstack.org/#/c/364586/3/glance_store/backend.py
[2] https://github.com/pypa/setuptools/blob/7f8144544f23f4fd84d339d846b91d4e3b703dd4/pkg_resources/__init__.py#L731
[3] https://github.com/openstack/stevedore/blob/c27ce0b878302e4894ff67bcf2df6c83812d0ba5/stevedore/extension.py#L149

Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

Yes, the pkg_resources does not guarantee that plugins are loaded in a particular order. Sorting at the application layer is the correct solution. I suppose we could do that in stevedore, though. How big of an issue is this?

Changed in python-stevedore:
status: New → Incomplete
Revision history for this message
Brian Rosmaita (brian-rosmaita) wrote :

Not a big issue at all. We fixed it in the application layer in glance_store 0.19.0. It looks like no one else has run into it, so definitely not a big issue. I think you can close this as a "won't fix".

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for stevedore because there has been no activity for 60 days.]

Changed in python-stevedore:
status: Incomplete → Expired
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.