[openstack-dev] [docs][neutron] checking link integrity in the gate
tim at swiftstack.com
Tue Sep 5 18:28:19 UTC 2017
On Sep 5, 2017, at 10:53 AM, Doug Hellmann <doug at doughellmann.com> wrote:
> Excerpts from Boden Russell's message of 2017-09-05 11:25:34 -0600:
>> On 9/5/17 11:03 AM, Doug Hellmann wrote:
>>> Is eventlet being initialized (or partially initialized) when a module
>>> from the application is imported for the auto-generated API
>> More than likely :)
>> But even if they are, what's the fix/workaround?
> Ensure that it is fully initialized, or not initialized at all, I would
> think. I'm sure Sphinx does not expect to be running under eventlet.
> I see a comment in neutron's doc/source/conf.py about another issue with
> eventlet and some of the test code. I would start by configuring pbr to
> ignore the test code when generating class documentation and see if that
> eliminates both problems. See "autodoc_tree_excludes" in
> https://docs.openstack.org/pbr/latest/user/using.html#pbr for details.
> If that doesn't help, then I would try to find a way to avoid
> initializing eventlet at all. For example, set an environment variable
> in doc/source/conf.py and then look for it in
> neutron/common/eventlet_utils.py and skip the call to
> If neither of those options work, we can continue thinking of other
Hey, this sounds familiar! We hit a similar problem in swift  where eventlet patched out threading.RLock (which gets used by logging) to be green, but we still wanted to log from separate posix threads. This patching even happens for RLocks that were created *before* monkey_patch was called . Our fix  involved writing a mutex that would be green- *and* posix-thread friendly, but I'm not sure how you might fit that into a doc build. Maybe it'd be easier (as Doug suggests) to have the module-import stop monkey-patching?
More information about the OpenStack-dev