[openstack-dev] [docs][neutron] checking link integrity in the gate
Tim Burke
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
>>> documentation?
>> 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
> eventlet.monkey_patch().
>
> If neither of those options work, we can continue thinking of other
> ideas.
>
> Doug
Hey, this sounds familiar! We hit a similar problem in swift [1] 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 [2]. Our fix [3] 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?
Tim
[1] https://bugs.launchpad.net/swift/+bug/1710328
[2] https://github.com/eventlet/eventlet/blob/b756447/eventlet/patcher.py#L338-L362
[3] https://github.com/openstack/swift/commit/6d16079
More information about the OpenStack-dev
mailing list