)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"10b302789661a4a87248f932a9ab421983757c18","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Co-authored-by: Lee Yarwood \u003clyarwood@redhat.com\u003e"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Related-Bug: #1808975"},{"line_number":29,"context_line":"Related-Bug: #1808951"},{"line_number":30,"context_line":"Change-Id: Id46e76666b553a10ec4654d4418a9884975b5b95"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9fdfeff1_4049a12e","line":29,"range":{"start_line":28,"start_character":0,"end_line":29,"end_character":21},"updated":"2019-01-30 15:48:06.000000000","message":"Why are these only related and not partial or closes?","commit_id":"3fbf336a38556db1fce2e9744a3c9712bf463614"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"77f7b42226c1ef9394b12b7903c2a51b5e57fa77","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Matthew Booth \u003cmbooth@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2019-03-18 17:32:10 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix SSL infinite recursion"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"We were seeing infinite recursion opening an ssl socket when running"},{"line_number":10,"context_line":"various combinations of python3, eventlet, and urllib3. It is not"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"5fc1f717_fff590cb","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":26},"updated":"2019-03-18 20:22:51.000000000","message":"Sort of wondering whether this should be more generic now.","commit_id":"68fa98e0a5d57ff0f30a259536c3f0fb4a3f3135"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"9fe8fb173794aeb2a0c047756e51c9afcebf0c08","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Matthew Booth \u003cmbooth@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2019-03-18 17:32:10 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix SSL infinite recursion"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"We were seeing infinite recursion opening an ssl socket when running"},{"line_number":10,"context_line":"various combinations of python3, eventlet, and urllib3. It is not"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"5fc1f717_8798ba1b","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":26},"in_reply_to":"5fc1f717_fff590cb","updated":"2019-03-19 10:55:16.000000000","message":"I\u0027m going to get that in a tatoo :/\n\nLooks like this needs a recheck anyway, so I\u0027ll mention monkey patching explicitly in the subject.","commit_id":"68fa98e0a5d57ff0f30a259536c3f0fb4a3f3135"}],"doc/source/conf.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"e884eb9f477a3ee4fc5e44d3d6ff65135dac633e","unresolved":false,"context_lines":[{"line_number":98,"context_line":"]"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"# NOTE(mdbooth): (2019-03-20) Sphinx loads policies defined in setup.cfg, which"},{"line_number":101,"context_line":"# includes the placement policy at nova/api/openstack/placement/policies.py."},{"line_number":102,"context_line":"# Loading this imports nova/api/openstack/__init__.py, which imports"},{"line_number":103,"context_line":"# nova.monkey_patch, which will do eventlet monkey patching to the sphinx"},{"line_number":104,"context_line":"# process. As well as being unnecessary and a bad idea, this breaks on"}],"source_content_type":"text/x-python","patch_set":11,"id":"5fc1f717_fd3a4e96","line":101,"updated":"2019-03-20 13:57:55.000000000","message":"you might want to make it explicit here that rm -rf nova/api/openstack/placement is coming in a few short weeks and at that time we can make adjustments?","commit_id":"0a91f3ce521c2ff165967fc99555cda118d23ed0"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"5457856c5c68a91d3884b83150c0e93b009f775c","unresolved":false,"context_lines":[{"line_number":98,"context_line":"]"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"# NOTE(mdbooth): (2019-03-20) Sphinx loads policies defined in setup.cfg, which"},{"line_number":101,"context_line":"# includes the placement policy at nova/api/openstack/placement/policies.py."},{"line_number":102,"context_line":"# Loading this imports nova/api/openstack/__init__.py, which imports"},{"line_number":103,"context_line":"# nova.monkey_patch, which will do eventlet monkey patching to the sphinx"},{"line_number":104,"context_line":"# process. As well as being unnecessary and a bad idea, this breaks on"}],"source_content_type":"text/x-python","patch_set":11,"id":"5fc1f717_fde00ecf","line":101,"in_reply_to":"5fc1f717_fd3a4e96","updated":"2019-03-20 14:05:35.000000000","message":"that may be one option but in a few weeks hopfully we can kill the use of eventlest in the wsgi path too.","commit_id":"0a91f3ce521c2ff165967fc99555cda118d23ed0"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"dd28f9d1a45934e38e071c8e752c3011a47e61cd","unresolved":false,"context_lines":[{"line_number":98,"context_line":"]"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"# NOTE(mdbooth): (2019-03-20) Sphinx loads policies defined in setup.cfg, which"},{"line_number":101,"context_line":"# includes the placement policy at nova/api/openstack/placement/policies.py."},{"line_number":102,"context_line":"# Loading this imports nova/api/openstack/__init__.py, which imports"},{"line_number":103,"context_line":"# nova.monkey_patch, which will do eventlet monkey patching to the sphinx"},{"line_number":104,"context_line":"# process. As well as being unnecessary and a bad idea, this breaks on"}],"source_content_type":"text/x-python","patch_set":11,"id":"5fc1f717_9020d19d","line":101,"in_reply_to":"5fc1f717_fde00ecf","updated":"2019-03-20 14:17:09.000000000","message":"Ack, will do, although honestly it would remain too fragile for my tastes. I\u0027d prefer to be shot of the whole thing.","commit_id":"0a91f3ce521c2ff165967fc99555cda118d23ed0"}],"nova/api/openstack/wsgi_app.py":[{"author":{"_account_id":13861,"name":"yatin","email":"ykarel@redhat.com","username":"yatinkarel"},"change_message_id":"68f7f006236d794a95a76bc27a34e6b322d1c3e3","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"# NOTE(lyarwood): workaround https://github.com/eventlet/eventlet/issues/371"},{"line_number":15,"context_line":"import eventlet"},{"line_number":16,"context_line":"eventlet.monkey_patch(os\u003dFalse)"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from oslo_utils import importutils"},{"line_number":19,"context_line":"from six.moves import reload_module"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f769fc5_23898422","line":16,"range":{"start_line":16,"start_character":0,"end_line":16,"end_character":31},"updated":"2018-12-31 06:23:44.000000000","message":"Tried this patch without this line in https://review.openstack.org/#/c/620561/15/run_tests.sh@222 (wsgi Fedora python3 deployment) and it\u0027s working(just 1 tempest test test_add_remove_fixed_ip is failing([1]) which seems regression of https://github.com/openstack/tempest/commit/d4cb10f1451af0d204722ea57eb52d46ebde783b), Seen 1 pass in CentOS so seems an intermittent but a valid issue.\n\nhttps://logs.rdoproject.org/61/620561/15/openstack-check-rdo/puppet-openstack-integration-5-scenario-py3-tempest-fedora-28/1af14f9/logs/testr_results.html.gz","commit_id":"cf7ee45e840925530d0f0a961ab8d6e1ccb481ca"}],"nova/cmd/__init__.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"64eedf0e8c1904649a603f5eb1c9849990ddd305","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from nova import utils"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"utils.monkey_patch()"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_40dbe17a","side":"PARENT","line":18,"range":{"start_line":18,"start_character":6,"end_line":18,"end_character":18},"updated":"2019-01-30 15:46:04.000000000","message":"Why don\u0027t you remove this method?","commit_id":"9fab7e73e31bac3cab26c5aaeb773054ee917161"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"96ade0c3d5f733732321c3fefcb080f456507007","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from nova import utils"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"utils.monkey_patch()"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_80b8e9e4","side":"PARENT","line":18,"range":{"start_line":18,"start_character":6,"end_line":18,"end_character":18},"in_reply_to":"9fdfeff1_40dbe17a","updated":"2019-01-30 15:57:46.000000000","message":"Forgot ;)","commit_id":"9fab7e73e31bac3cab26c5aaeb773054ee917161"}],"nova/monkey_patch.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"64eedf0e8c1904649a603f5eb1c9849990ddd305","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2010 United States Government as represented by the"},{"line_number":2,"context_line":"# Administrator of the National Aeronautics and Space Administration."},{"line_number":3,"context_line":"# Copyright 2011 Justin Santa Barbara"},{"line_number":4,"context_line":"# Copyright 2019 Red Hat, Inc."},{"line_number":5,"context_line":"# All Rights Reserved."},{"line_number":6,"context_line":"#"},{"line_number":7,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":8,"context_line":"#    not use this file except in compliance with the License. You may obtain"},{"line_number":9,"context_line":"#    a copy of the License at"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_0045d942","line":6,"range":{"start_line":1,"start_character":0,"end_line":6,"end_character":1},"updated":"2019-01-30 15:46:04.000000000","message":"Why all this? I guess because you copied nova.utils\n\nhttps://github.com/openstack/nova/blob/master/nova/utils.py\n\nand added Red Hat.","commit_id":"3fbf336a38556db1fce2e9744a3c9712bf463614"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"96ade0c3d5f733732321c3fefcb080f456507007","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2010 United States Government as represented by the"},{"line_number":2,"context_line":"# Administrator of the National Aeronautics and Space Administration."},{"line_number":3,"context_line":"# Copyright 2011 Justin Santa Barbara"},{"line_number":4,"context_line":"# Copyright 2019 Red Hat, Inc."},{"line_number":5,"context_line":"# All Rights Reserved."},{"line_number":6,"context_line":"#"},{"line_number":7,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":8,"context_line":"#    not use this file except in compliance with the License. You may obtain"},{"line_number":9,"context_line":"#    a copy of the License at"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_a0a2cdac","line":6,"range":{"start_line":1,"start_character":0,"end_line":6,"end_character":1},"in_reply_to":"9fdfeff1_0045d942","updated":"2019-01-30 15:57:46.000000000","message":"Yep. Wasn\u0027t sure of the provenance of the original code, so left it there.","commit_id":"3fbf336a38556db1fce2e9744a3c9712bf463614"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"64eedf0e8c1904649a603f5eb1c9849990ddd305","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"if debugger.enabled():"},{"line_number":34,"context_line":"    # turn off thread patching to enable the remote debugger"},{"line_number":35,"context_line":"    eventlet.monkey_patch(os\u003dFalse, thread\u003dFalse)"},{"line_number":36,"context_line":"else:"},{"line_number":37,"context_line":"    eventlet.monkey_patch(os\u003dFalse)"},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_40ad21e7","line":35,"range":{"start_line":35,"start_character":26,"end_line":35,"end_character":34},"updated":"2019-01-30 15:46:04.000000000","message":"Why is this added? It wasn\u0027t in nova.utils.monkey_patch().","commit_id":"3fbf336a38556db1fce2e9744a3c9712bf463614"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"64eedf0e8c1904649a603f5eb1c9849990ddd305","unresolved":false,"context_lines":[{"line_number":33,"context_line":"if debugger.enabled():"},{"line_number":34,"context_line":"    # turn off thread patching to enable the remote debugger"},{"line_number":35,"context_line":"    eventlet.monkey_patch(os\u003dFalse, thread\u003dFalse)"},{"line_number":36,"context_line":"else:"},{"line_number":37,"context_line":"    eventlet.monkey_patch(os\u003dFalse)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"# NOTE(rgerganov): oslo.context is storing a global thread-local variable"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_607b857a","line":36,"updated":"2019-01-30 15:46:04.000000000","message":"This misses the \u0027nt\u0027 condition from nova.utils.monkey_patch which is needed for hyper-v on nova-compute.\n\ni.e. you\u0027ve regressed I8b456676a04b9066cb2b570060c0d95cd4fe69f8 here and below.","commit_id":"3fbf336a38556db1fce2e9744a3c9712bf463614"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"96ade0c3d5f733732321c3fefcb080f456507007","unresolved":false,"context_lines":[{"line_number":33,"context_line":"if debugger.enabled():"},{"line_number":34,"context_line":"    # turn off thread patching to enable the remote debugger"},{"line_number":35,"context_line":"    eventlet.monkey_patch(os\u003dFalse, thread\u003dFalse)"},{"line_number":36,"context_line":"else:"},{"line_number":37,"context_line":"    eventlet.monkey_patch(os\u003dFalse)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"# NOTE(rgerganov): oslo.context is storing a global thread-local variable"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_4093e15b","line":36,"in_reply_to":"9fdfeff1_607b857a","updated":"2019-01-30 15:57:46.000000000","message":"Indeed. I\u0027ve cut/paste from the version of monkey_patch from Lee\u0027s original patch. I\u0027ll update.","commit_id":"3fbf336a38556db1fce2e9744a3c9712bf463614"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"64eedf0e8c1904649a603f5eb1c9849990ddd305","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    # turn off thread patching to enable the remote debugger"},{"line_number":35,"context_line":"    eventlet.monkey_patch(os\u003dFalse, thread\u003dFalse)"},{"line_number":36,"context_line":"else:"},{"line_number":37,"context_line":"    eventlet.monkey_patch(os\u003dFalse)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"# NOTE(rgerganov): oslo.context is storing a global thread-local variable"},{"line_number":40,"context_line":"# which keeps the request context for the current thread. If oslo.context"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_2099fdc2","line":37,"range":{"start_line":37,"start_character":26,"end_line":37,"end_character":34},"updated":"2019-01-30 15:46:04.000000000","message":"Why is this added back in?","commit_id":"3fbf336a38556db1fce2e9744a3c9712bf463614"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1926c1f8560dad24b0a5ae90f161b39e74462ca5","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    # pipes don\u0027t support non-blocking I/O"},{"line_number":40,"context_line":"    eventlet.monkey_patch(os\u003dFalse)"},{"line_number":41,"context_line":"else:"},{"line_number":42,"context_line":"    eventlet.monkey_patch()"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"# NOTE(rgerganov): oslo.context is storing a global thread-local variable"},{"line_number":45,"context_line":"# which keeps the request context for the current thread. If oslo.context"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_d50c7495","line":42,"updated":"2019-03-14 17:52:16.000000000","message":"My first reaction here was to object to moving this from a method to module scope. It kind of obscures the actual change here, especially since the bug is about nova-compute, but we don\u0027t change the import ordering visibly for cmd/* things.\n\nThe actual thing that is important is that this code runs super early, which could still happen if we just moved the monkey_patch utility here, decoupling it from utils.py which imports a bunch of other stuff before we get a chance to run the helper.\n\nWe could replicate that here, but we\u0027d either (a) just define and then call it, or (b) make all the users of this have two #noqa lines, as they import something out of order, and then run a statement before the rest of their imports.\n\nSo, what is here is probably better as it\u0027s more obvious that this definitely has to run at import time and it\u0027s harder to make it not do that.","commit_id":"3b53e1a1f177d1eedf329dd525a613b1f1ae22d1"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1926c1f8560dad24b0a5ae90f161b39e74462ca5","unresolved":false,"context_lines":[{"line_number":47,"context_line":"# be green. To workaround this, reload the module after calling"},{"line_number":48,"context_line":"# monkey_patch()"},{"line_number":49,"context_line":"# NOTE(mdbooth): Is this still true? If so, can we avoid it?"},{"line_number":50,"context_line":"reload_module(importutils.import_module(\u0027oslo_context.context\u0027))"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_157c3cea","line":50,"updated":"2019-03-14 17:52:16.000000000","message":"I don\u0027t think this is required if we\u0027re getting everything patched before any oslo_context loads. The reload was specifically working around the issue of having imported this module before the patching could take place because of the existing layout.\n\nI think it\u0027s safe to remove this and we probably should for clarity, although I don\u0027t think it\u0027s technically hurting anything other than performance.","commit_id":"3b53e1a1f177d1eedf329dd525a613b1f1ae22d1"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"056617261e9b7fa1a3ca23cbd552272d8fe8a00e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2010 United States Government as represented by the"},{"line_number":2,"context_line":"# Administrator of the National Aeronautics and Space Administration."},{"line_number":3,"context_line":"# Copyright 2011 Justin Santa Barbara"},{"line_number":4,"context_line":"# Copyright 2019 Red Hat, Inc."},{"line_number":5,"context_line":"# All Rights Reserved."},{"line_number":6,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_9171f3aa","line":3,"range":{"start_line":1,"start_character":0,"end_line":3,"end_character":37},"updated":"2019-03-18 11:15:30.000000000","message":"nit - Do we need all of this?","commit_id":"7705a55ffe107d139e3f70abe8516fbebe3d8c9b"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"5ea3642cdb37241b3cb6f440f9f9b22c07f0c578","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2010 United States Government as represented by the"},{"line_number":2,"context_line":"# Administrator of the National Aeronautics and Space Administration."},{"line_number":3,"context_line":"# Copyright 2011 Justin Santa Barbara"},{"line_number":4,"context_line":"# Copyright 2019 Red Hat, Inc."},{"line_number":5,"context_line":"# All Rights Reserved."},{"line_number":6,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_610fcc87","line":3,"range":{"start_line":1,"start_character":0,"end_line":3,"end_character":37},"in_reply_to":"5fc1f717_9171f3aa","updated":"2019-03-18 16:31:44.000000000","message":"I think Matt mentioned this before.\n\nI originally cut/paste this from a file with this header. It\u0027s arguable whether I cut/paste enough to justify retaining the header, but it\u0027s not important enough to ask the lawyers. Also we like NASA, so they can have a free shout-out.","commit_id":"7705a55ffe107d139e3f70abe8516fbebe3d8c9b"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"056617261e9b7fa1a3ca23cbd552272d8fe8a00e","unresolved":false,"context_lines":[{"line_number":21,"context_line":"# NOTE(mdbooth): Anything imported here will not be monkey patched. It is"},{"line_number":22,"context_line":"# important to take care not to import anything here which requires monkey"},{"line_number":23,"context_line":"# patching."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"import eventlet"},{"line_number":26,"context_line":"import os"},{"line_number":27,"context_line":"from oslo_utils import importutils"}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_115d0314","line":24,"updated":"2019-03-18 11:15:30.000000000","message":"super nit - whitespace","commit_id":"7705a55ffe107d139e3f70abe8516fbebe3d8c9b"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"056617261e9b7fa1a3ca23cbd552272d8fe8a00e","unresolved":false,"context_lines":[{"line_number":46,"context_line":"# is imported before calling monkey_patch(), then this thread-local won\u0027t"},{"line_number":47,"context_line":"# be green. To workaround this, reload the module after calling"},{"line_number":48,"context_line":"# monkey_patch()"},{"line_number":49,"context_line":"# NOTE(mdbooth): Is this still true? If so, can we avoid it?"},{"line_number":50,"context_line":"reload_module(importutils.import_module(\u0027oslo_context.context\u0027))"}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_b1d42f49","line":49,"range":{"start_line":49,"start_character":0,"end_line":49,"end_character":60},"updated":"2019-03-18 11:15:30.000000000","message":"AFAICT yes it is still doing this [1][2], maybe we can update this comment to be a bit more specific?\n\n[1] https://github.com/openstack/oslo.context/blob/76a07f9022f0fa967707c9f6cb5a4a24aac6b3ef/oslo_context/context.py#L40\n[2] https://review.openstack.org/#/c/135643/","commit_id":"7705a55ffe107d139e3f70abe8516fbebe3d8c9b"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"5ea3642cdb37241b3cb6f440f9f9b22c07f0c578","unresolved":false,"context_lines":[{"line_number":46,"context_line":"# is imported before calling monkey_patch(), then this thread-local won\u0027t"},{"line_number":47,"context_line":"# be green. To workaround this, reload the module after calling"},{"line_number":48,"context_line":"# monkey_patch()"},{"line_number":49,"context_line":"# NOTE(mdbooth): Is this still true? If so, can we avoid it?"},{"line_number":50,"context_line":"reload_module(importutils.import_module(\u0027oslo_context.context\u0027))"}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_c1e240a0","line":49,"range":{"start_line":49,"start_character":0,"end_line":49,"end_character":60},"in_reply_to":"5fc1f717_51f62bd9","updated":"2019-03-18 16:31:44.000000000","message":"I\u0027ve completely reworked this in the latest patch. As it happens, *yes* we do still need a version of this. I posted a follow-up patch to remove it, but it requires bumping eventlet:\n\nhttps://review.openstack.org/#/c/644237/","commit_id":"7705a55ffe107d139e3f70abe8516fbebe3d8c9b"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"070e58cb4eb6f7010cf0830fb51eff3dd49a65f7","unresolved":false,"context_lines":[{"line_number":46,"context_line":"# is imported before calling monkey_patch(), then this thread-local won\u0027t"},{"line_number":47,"context_line":"# be green. To workaround this, reload the module after calling"},{"line_number":48,"context_line":"# monkey_patch()"},{"line_number":49,"context_line":"# NOTE(mdbooth): Is this still true? If so, can we avoid it?"},{"line_number":50,"context_line":"reload_module(importutils.import_module(\u0027oslo_context.context\u0027))"}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_51f62bd9","line":49,"range":{"start_line":49,"start_character":0,"end_line":49,"end_character":60},"in_reply_to":"5fc1f717_b1d42f49","updated":"2019-03-18 11:19:13.000000000","message":"Sorry, I missed a comment from Dan about this on a previous PS [3], appears this is actually safe to remove now that we\u0027ve reordered things.\n\n[3] https://review.openstack.org/#/c/626952/3/nova/monkey_patch.py@50","commit_id":"7705a55ffe107d139e3f70abe8516fbebe3d8c9b"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"0e372f0470261c304b1ca5d71f3de3d39ab164cf","unresolved":false,"context_lines":[{"line_number":44,"context_line":"# should remove this when we can confirm that the original issue is fixed."},{"line_number":45,"context_line":"os.environ[\u0027EVENTLET_NO_GREENDNS\u0027] \u003d \u0027yes\u0027"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"if debugger.enabled():"},{"line_number":48,"context_line":"    # turn off thread patching to enable the remote debugger"},{"line_number":49,"context_line":"    eventlet.monkey_patch(thread\u003dFalse)"},{"line_number":50,"context_line":"elif os.name \u003d\u003d \u0027nt\u0027:"},{"line_number":51,"context_line":"    # for nova-compute running on Windows(Hyper-v)"},{"line_number":52,"context_line":"    # pipes don\u0027t support non-blocking I/O"},{"line_number":53,"context_line":"    eventlet.monkey_patch(os\u003dFalse)"},{"line_number":54,"context_line":"else:"},{"line_number":55,"context_line":"    eventlet.monkey_patch()"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"# NOTE(rpodolyaka): import oslo_service first, so that it makes eventlet hub"},{"line_number":58,"context_line":"# use a monotonic clock to avoid issues with drifts of system time (see"}],"source_content_type":"text/x-python","patch_set":8,"id":"5fc1f717_840c2a3c","line":55,"range":{"start_line":47,"start_character":0,"end_line":55,"end_character":27},"updated":"2019-03-19 16:43:14.000000000","message":"if we create a module level global flag so that this execute only once i think it might solve your issue.\n\nmy teroy is we try to monkey patch twich in the docs job due\nto one of the shpinx extention loading both the test and non test code paths.","commit_id":"229274154a6eca929981d2f43539bc491b13327e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"6edd9b1908164532160765fa69c4232950bae43a","unresolved":false,"context_lines":[{"line_number":44,"context_line":"# should remove this when we can confirm that the original issue is fixed."},{"line_number":45,"context_line":"os.environ[\u0027EVENTLET_NO_GREENDNS\u0027] \u003d \u0027yes\u0027"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"if debugger.enabled():"},{"line_number":48,"context_line":"    # turn off thread patching to enable the remote debugger"},{"line_number":49,"context_line":"    eventlet.monkey_patch(thread\u003dFalse)"},{"line_number":50,"context_line":"elif os.name \u003d\u003d \u0027nt\u0027:"},{"line_number":51,"context_line":"    # for nova-compute running on Windows(Hyper-v)"},{"line_number":52,"context_line":"    # pipes don\u0027t support non-blocking I/O"},{"line_number":53,"context_line":"    eventlet.monkey_patch(os\u003dFalse)"},{"line_number":54,"context_line":"else:"},{"line_number":55,"context_line":"    eventlet.monkey_patch()"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"# NOTE(rpodolyaka): import oslo_service first, so that it makes eventlet hub"},{"line_number":58,"context_line":"# use a monotonic clock to avoid issues with drifts of system time (see"}],"source_content_type":"text/x-python","patch_set":8,"id":"5fc1f717_c431d2a4","line":55,"range":{"start_line":47,"start_character":0,"end_line":55,"end_character":27},"in_reply_to":"5fc1f717_840c2a3c","updated":"2019-03-19 16:58:56.000000000","message":"hum so \n\n\n-if debugger.enabled():\n+#will be set once on first modle load\n+_is_patched \u003d False\n+\n+if debugger.enabled() and not _is_patched:\n     # turn off thread patching to enable the remote debugger\n     eventlet.monkey_patch(thread\u003dFalse)\n-elif os.name \u003d\u003d \u0027nt\u0027:\n+    _is_patched \u003d True\n+elif os.name \u003d\u003d \u0027nt\u0027 and not _is_patched:\n     # for nova-compute running on Windows(Hyper-v)\n     # pipes don\u0027t support non-blocking I/O\n     eventlet.monkey_patch(os\u003dFalse)\n-else:\n+    _is_patched \u003d True\n+elif not _is_patched:\n     eventlet.monkey_patch()\n+    _is_patched \u003d True\n\n\ndid not fix it.\nnor did \n\ndiff --git a/nova/monkey_patch.py b/nova/monkey_patch.py\nindex c5fc3cfa26..d955b2e933 100644\n--- a/nova/monkey_patch.py\n+++ b/nova/monkey_patch.py\n@@ -44,23 +44,28 @@ problems \u003d set([\u0027urllib3\u0027, \u0027oslo_context.context\u0027]) \u0026 set(sys.modules.keys())\n # should remove this when we can confirm that the original issue is fixed.\n os.environ[\u0027EVENTLET_NO_GREENDNS\u0027] \u003d \u0027yes\u0027\n \n-if debugger.enabled():\n-    # turn off thread patching to enable the remote debugger\n-    eventlet.monkey_patch(thread\u003dFalse)\n-elif os.name \u003d\u003d \u0027nt\u0027:\n-    # for nova-compute running on Windows(Hyper-v)\n-    # pipes don\u0027t support non-blocking I/O\n-    eventlet.monkey_patch(os\u003dFalse)\n-else:\n-    eventlet.monkey_patch()\n+#will be set once on first modle load\n+_is_patched \u003d False\n+if not _is_patched:\n+    if debugger.enabled():\n+        # turn off thread patching to enable the remote debugger\n+        eventlet.monkey_patch(thread\u003dFalse)\n+    elif os.name \u003d\u003d \u0027nt\u0027:\n+        # for nova-compute running on Windows(Hyper-v)\n+        # pipes don\u0027t support non-blocking I/O\n+        eventlet.monkey_patch(os\u003dFalse)\n+    else:\n+        eventlet.monkey_patch()\n \n-# NOTE(rpodolyaka): import oslo_service first, so that it makes eventlet hub\n-# use a monotonic clock to avoid issues with drifts of system time (see\n-# LP 1510234 for details)\n-# NOTE(mdbooth): This was fixed in eventlet 0.21.0. Remove when bumping\n-# eventlet version.\n-import oslo_service  # noqa\n-eventlet.hubs.use_hub(\"oslo_service:service_hub\")\n+    _is_patched \u003d True\n+\n+    # NOTE(rpodolyaka): import oslo_service first, so that it makes eventlet hub\n+    # use a monotonic clock to avoid issues with drifts of system time (see\n+    # LP 1510234 for details)\n+    # NOTE(mdbooth): This was fixed in eventlet 0.21.0. Remove when bumping\n+    # eventlet version.\n+    import oslo_service  # noqa\n+    eventlet.hubs.use_hub(\"oslo_service:service_hub\")\n \n # NOTE(mdbooth): Log here instead of earlier to avoid loading oslo logging\n # before monkey patching.\n\n\nso it looks like its not a double monkey patch issue unless we do eventlet.monkeypatch somewhere else.\n\ni dont think we do anymore with this patch so its something esle.\n\npresumable the issue is we didnt monky patch before and we are now","commit_id":"229274154a6eca929981d2f43539bc491b13327e"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"e884eb9f477a3ee4fc5e44d3d6ff65135dac633e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"5fc1f717_fd87ae60","side":"PARENT","updated":"2019-03-20 13:57:55.000000000","message":"omg","commit_id":"926e584136e7dce59f32065292aa4eb8120f628c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e3929855990123489a1d641a9678d31d45bdf577","unresolved":false,"context_lines":[{"line_number":90,"context_line":"                    \"imported prior to eventlet monkey patching: %s. This \""},{"line_number":91,"context_line":"                    \"warning can usually be ignored if the caller is only \""},{"line_number":92,"context_line":"                    \"importing and not executing nova code.\","},{"line_number":93,"context_line":"                    \u0027, \u0027.join(problems))"}],"source_content_type":"text/x-python","patch_set":12,"id":"5fc1f717_a70491c7","line":93,"updated":"2019-03-21 18:00:27.000000000","message":"Why is this giant if block not in a function we call if the variable is set?","commit_id":"a7888d13fb01f8b493ac4174bf6011c3e991b124"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"4ec2444a12463f119ae21a3342c737ad1e8d8001","unresolved":false,"context_lines":[{"line_number":90,"context_line":"                    \"imported prior to eventlet monkey patching: %s. This \""},{"line_number":91,"context_line":"                    \"warning can usually be ignored if the caller is only \""},{"line_number":92,"context_line":"                    \"importing and not executing nova code.\","},{"line_number":93,"context_line":"                    \u0027, \u0027.join(problems))"}],"source_content_type":"text/x-python","patch_set":12,"id":"5fc1f717_1f39203e","line":93,"in_reply_to":"5fc1f717_a70491c7","updated":"2019-03-22 09:24:09.000000000","message":"I can certainly do that.","commit_id":"a7888d13fb01f8b493ac4174bf6011c3e991b124"}]}
