Earlier  
Posted Nick Remark
#openstack-nova - 2019-03-19
15:56:01 mdbooth artom: Running in WSL. However, I'd expect to see that *I* don't have poll()
15:56:06 mdbooth Linux definitely has poll.
15:56:12 artom mdbooth, true.
15:56:29 jangutter mdbooth: It's not a Windows CI worker - the pre jobs installed some bindep packages in Ubuntu: http://logs.openstack.org/52/626952/8/check/openstack-tox-docs/0876468/ara-report/result/9863769a-0d01-4a5a-b45a-345628504cbf/
15:57:05 mdbooth jangutter: Surely we don't have any Windows CI workers! ?
15:57:34 sean-k-mooney mdbooth: we proably do for hyperv
15:57:40 sean-k-mooney but not for docs
15:57:56 mriedem lyarwood: dansmith: can one of you fast approve https://review.openstack.org/#/c/643011/ ?
15:59:03 mriedem bauzas: you want to get this rocky backport https://review.openstack.org/#/c/643098/ ?
15:59:10 mdbooth Linux is a bazillion times faster than WSL.
15:59:21 bauzas mriedem: sure, looking
15:59:33 sean-k-mooney mdbooth: cygwin was faster the WSL the last time i tried WSL
15:59:37 openstackgerrit Merged openstack/nova master: Remove unnecessary default provider_tree when getting traits https://review.openstack.org/644452
16:00:15 mriedem once we get those in i think we can do a rocky release
16:00:26 mriedem melwitt: ^
16:02:04 jangutter mdbooth, sean-k-mooney: do the tox docs jobs normally run without the "Modules with known eventlet monkey patching issues were imported prior to eventlet monkey patching: oslo_context.context, urllib3." warning?
16:02:25 lyarwood mriedem: done
16:02:41 mdbooth jangutter: I just added that message
16:02:42 sean-k-mooney jangutter: we should not be monkeypatch for docs
16:02:56 mdbooth jangutter: However, we have always monkey patched for docs
16:03:10 sean-k-mooney jangutter: that said we might be
16:03:17 mdbooth That warning message simply points it out
16:03:42 mdbooth Ok, I can't run tox -edocs on Linux with or without my patch
16:03:44 sean-k-mooney mdbooth: so i get the same error locally
16:03:47 mdbooth That's annoying
16:04:03 mdbooth Ah, that will be a pyc thing
16:04:25 sean-k-mooney i had to recreate the env with "tox -e docs -vv -r"
16:04:38 sean-k-mooney but i got the same
16:04:40 sean-k-mooney Exception occurred:
16:04:42 sean-k-mooney File "/usr/lib/python3.6/selectors.py", line 348, in __init__
16:04:44 sean-k-mooney self._poll = select.poll()
16:04:46 sean-k-mooney AttributeError: module 'select' has no attribute 'poll'
16:04:48 sean-k-mooney error
16:05:02 sean-k-mooney that works too
16:05:10 sean-k-mooney ill try it on a centos vm
16:05:51 mdbooth So, the only thing my patching is changing is where we monkey patch
16:06:16 sean-k-mooney mdbooth: ya so i dont think we used to monkey patch docs
16:06:34 mdbooth sean-k-mooney: Why do you think that?
16:06:37 sean-k-mooney docs only installed stuff for the vrsion number and then config stuff
16:07:03 sean-k-mooney mdbooth: i dont think shinix loaded an entrypoint that incldued a path that invokded monky pataching
16:07:16 mdbooth Do you know what entrypoints it loads?
16:07:20 sean-k-mooney it just opened the nova/conf subtree i think
16:07:44 sean-k-mooney that is a stephenfin question but ill see if i can find out quickly
16:07:54 mdbooth Ok, I can't reproduce locally on F29
16:08:08 mdbooth sean-k-mooney: What eventlet version do you have?
16:08:22 sean-k-mooney https://github.com/openstack/nova/blob/master/doc/source/conf.py#L22
16:08:41 mdbooth Although that's tox installed, so should be the same
16:09:00 sean-k-mooney eventlet==0.24.1
16:09:06 mdbooth Hmm, same
16:09:37 sean-k-mooney am why do we do https://github.com/openstack/nova/blob/master/doc/source/conf.py#L201
16:10:30 mdbooth I don't know, but as that's not eventlet I assume that's ok
16:10:31 sean-k-mooney anyway the only thing we import form nova is nova.version
16:10:38 mdbooth sean-k-mooney: Where do you see that?
16:10:41 sean-k-mooney so before that would not have monkeypatch anything
16:10:59 sean-k-mooney where do i see what?
16:11:12 mdbooth <sean-k-mooney> anyway the only thing we import form nova is nova.version
16:11:22 mdbooth What's your basis for that?
16:11:55 sean-k-mooney oh well i just looked at the conf.py file that sphinx uses i think that is the only pyton file it uses to build the docs
16:12:03 sean-k-mooney im going to do a code search in a second
16:15:24 sean-k-mooney mdbooth: so assuming my github foo hasnt failed me this is the only hit https://github.com/openstack/nova/search?l=Python&q=%22from+nova%22+path%3A%2Fdoc%2Fsource
16:15:55 mdbooth sean-k-mooney: that link doesn't work.
16:16:00 mdbooth What are you looking for?
16:16:26 sean-k-mooney this was the search query in the nova github '"from nova" path:/doc/source'
16:16:49 stephenfin sean-k-mooney: Huh? Context?
16:16:54 mdbooth Ok, sphinx does load_extension()
16:17:01 lyarwood http://codesearch.openstack.org/ - might be easier to search with
16:17:10 mdbooth mod = __import__(extname, None, None, ['setup'])
16:17:26 sean-k-mooney stephenfin: we are trying to figur out what monkeypatch in the toplevel nova module would break the docs job
16:17:28 mdbooth That ends up loading nova/tests/__init__.py, which in my patch does monkey patching
16:17:43 mdbooth Whereas previously it was lower down separately in both unit and functional
16:17:52 sean-k-mooney lyarwood: tried that first but its harder to make look a a single directory
16:18:08 mdbooth Although, why the hell would it load tests and not, for eg nova.cmd or nova.api.openstack?
16:18:18 stephenfin Not an answer but various Sphinx extensions do load the nova source
16:18:29 lyarwood sean-k-mooney: kk
16:18:39 stephenfin sphinx.autodoc and oslo_config.sphinxext jump to mind
16:18:41 mdbooth stephenfin: I'd expect them to load the *whole* nova source though, right?
16:19:09 stephenfin mdbooth: What are they loading?
16:19:27 stephenfin eventlet monkeypatching?
16:19:32 stephenfin or monkeypatching of other things
16:19:43 sean-k-mooney mdbooth: we dont generate docs for the code directly so ingeneral i would have assuemd it should not load the nova code.
16:19:48 mdbooth stephenfin: eventlet. It's done just by loading certain modules.
16:20:04 mdbooth stephenfin: If we import everything, we do monkey patching eventually.
16:20:20 stephenfin We can monkeypatch the monkeypatch though...
16:20:32 stephenfin if that was actually what was happening
16:20:44 stephenfin stub out eventlet, so to speak
16:20:45 sean-k-mooney stephenfin: ew
16:21:09 stephenfin sean-k-mooney: That comment also applies to eventlet itself ;)
16:21:12 mdbooth stephenfin: If it was acceptable we could define an environment variable which, if set, would disable monkey patching
16:21:19 mdbooth However, I'd assumed that was not acceptable
16:21:28 stephenfin you'd have to load the os module to do that
16:21:28 jangutter it would be really funny if rendering the docs accidentally caused an entire Nova deployment to spring up.
16:21:44 stephenfin which I assume eventlet needs to monkeypatch
16:21:45 sean-k-mooney we should not be executing any of the code so we should not need to monkeypatch as monkeypatch should never change any of the api signiture and therefor should nto change the docs
16:21:51 sean-k-mooney in the eventlet case
16:22:05 mdbooth sean-k-mooney: coulda shoulda isn't relevant, though, as it's done at import time
16:22:09 sean-k-mooney mdbooth: we do that for debug right
16:22:27 stephenfin sean-k-mooney: Any code outside a function and not within a 'if __name__ == "__main__"' conditional is going to be executed tho
16:22:37 mdbooth sean-k-mooney: that's done with config
16:22:56 mdbooth sean-k-mooney: Actually by inspecting command line arguments
16:23:01 sean-k-mooney yes but you can now set config values via the environment

Earlier   Later