)]}'
{"specs/eventlet-best-practices.rst":[{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"329f4f5acae0afdd0f7e8fea9a65a3418b7b18ad","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"It is worth noting that while there has been a push from some members of the"},{"line_number":13,"context_line":"community to move away from eventlet entirely, there is currently no concrete"},{"line_number":14,"context_line":"plan to do so.  Even if there were, it will likely take a long time to"},{"line_number":15,"context_line":"implement, so eventlet will be something we have to care about for at least"},{"line_number":16,"context_line":"the short and medium term."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"da86d52c_d0005fad","line":14,"updated":"2015-02-11 14:03:46.000000000","message":"Well, there is now https://review.openstack.org/#/c/153298/2/specs/asyncio.rst which is concrete. I agree that it\u0027s a long term plan and you have to enhance eventlet right now. For example, I\u0027m still working on finishing eventlet port to Python 3.","commit_id":"b9246b3bd4f0fc13de0db1f1d113eb8d31fc56a5"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"f51a50ea70c3a8e44e7b2a116523e6e2254613cd","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"It is worth noting that while there has been a push from some members of the"},{"line_number":13,"context_line":"community to move away from eventlet entirely, there is currently no concrete"},{"line_number":14,"context_line":"plan to do so.  Even if there were, it will likely take a long time to"},{"line_number":15,"context_line":"implement, so eventlet will be something we have to care about for at least"},{"line_number":16,"context_line":"the short and medium term."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"da86d52c_83c76811","line":14,"in_reply_to":"da86d52c_58f6375e","updated":"2015-02-18 17:44:55.000000000","message":"Even after the plan is approved, implementation will take some time. So we want to have these guidelines around until all projects have been updated. It\u0027s also likely that some of the data APIs (vs the control APIs like nova) will continue to use async tools like eventlet even after most of the control APIs have changed to something else.","commit_id":"b9246b3bd4f0fc13de0db1f1d113eb8d31fc56a5"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"a6c052f70c79cfb0fc1aee227d0dee4d4e4edea6","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"It is worth noting that while there has been a push from some members of the"},{"line_number":13,"context_line":"community to move away from eventlet entirely, there is currently no concrete"},{"line_number":14,"context_line":"plan to do so.  Even if there were, it will likely take a long time to"},{"line_number":15,"context_line":"implement, so eventlet will be something we have to care about for at least"},{"line_number":16,"context_line":"the short and medium term."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"da86d52c_58f6375e","line":14,"in_reply_to":"da86d52c_d0005fad","updated":"2015-02-11 21:56:46.000000000","message":"Yeah, maybe I should have said there\u0027s no approved plan yet.  I can tweak that in the next patch set.","commit_id":"b9246b3bd4f0fc13de0db1f1d113eb8d31fc56a5"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"49f81f9978ddfc89b6bf723ac26b3b14f0a6c009","unresolved":false,"context_lines":[{"line_number":27,"context_line":"Proposed change"},{"line_number":28,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Guidelines for using eventlet:"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"* When using eventlet.monkey_patch, do it first or not at all.  In practice,"},{"line_number":33,"context_line":"  this means monkey patching in a top-level __init__.py which is guaranteed"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da86d52c_49967df1","line":30,"updated":"2015-02-11 15:33:11.000000000","message":"maybe we should also suggest separate monkey-patching from WSGI app creation, so that at least for APIs we would have a choice, if we want to run them with eventlet/uwsgi/mos_wsgi/etc?\n\ne.g. like keystone does by providing an \u0027eventet binary\u0027 - keystone-all","commit_id":"b9246b3bd4f0fc13de0db1f1d113eb8d31fc56a5"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"a6c052f70c79cfb0fc1aee227d0dee4d4e4edea6","unresolved":false,"context_lines":[{"line_number":27,"context_line":"Proposed change"},{"line_number":28,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Guidelines for using eventlet:"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"* When using eventlet.monkey_patch, do it first or not at all.  In practice,"},{"line_number":33,"context_line":"  this means monkey patching in a top-level __init__.py which is guaranteed"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da86d52c_18759fca","line":30,"in_reply_to":"da86d52c_49967df1","updated":"2015-02-11 21:56:46.000000000","message":"I suspect (and I may be wrong) that this is why Nova does it in cmd as opposed to the top-level __init__.py.  If nobody corrects me on that I can add a note in the next patch set.","commit_id":"b9246b3bd4f0fc13de0db1f1d113eb8d31fc56a5"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"34db1c40eca9b68212a313610810b6af338ef44c","unresolved":false,"context_lines":[{"line_number":27,"context_line":"Proposed change"},{"line_number":28,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Guidelines for using eventlet:"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"* When using eventlet.monkey_patch, do it first or not at all.  In practice,"},{"line_number":33,"context_line":"  this means monkey patching in a top-level __init__.py which is guaranteed"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da86d52c_bd5485fe","line":30,"in_reply_to":"da86d52c_49967df1","updated":"2015-02-11 21:05:27.000000000","message":"This might make sense but it\u0027s probably not applicable to all projects. I\u0027m afraid it won\u0027t work with neutron for instance, where the WSGI APP calls directly into the plugin - and some of them explicitly use eventlet constructs.","commit_id":"b9246b3bd4f0fc13de0db1f1d113eb8d31fc56a5"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"329f4f5acae0afdd0f7e8fea9a65a3418b7b18ad","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Guidelines for using eventlet:"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"* When using eventlet.monkey_patch, do it first or not at all.  In practice,"},{"line_number":33,"context_line":"  this means monkey patching in a top-level __init__.py which is guaranteed"},{"line_number":34,"context_line":"  to be run before any other project code.  As an example, Nova monkey patches"},{"line_number":35,"context_line":"  in nova/cmd/__init__.py and nova/tests/unit/__init__.py so that in both the"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da86d52c_d0177fec","line":32,"updated":"2015-02-11 14:03:46.000000000","message":"\"When using eventlet.monkey_patch, do it first.\" is enough :) Usually, not using monkey-patching is not really an option. Except if you have some recipies to use eventlet without monkey-patching ?","commit_id":"b9246b3bd4f0fc13de0db1f1d113eb8d31fc56a5"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"f51a50ea70c3a8e44e7b2a116523e6e2254613cd","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Guidelines for using eventlet:"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"* When using eventlet.monkey_patch, do it first or not at all.  In practice,"},{"line_number":33,"context_line":"  this means monkey patching in a top-level __init__.py which is guaranteed"},{"line_number":34,"context_line":"  to be run before any other project code.  As an example, Nova monkey patches"},{"line_number":35,"context_line":"  in nova/cmd/__init__.py and nova/tests/unit/__init__.py so that in both the"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da86d52c_03b0d889","line":32,"in_reply_to":"da86d52c_18a11f94","updated":"2015-02-18 17:44:55.000000000","message":"Keystone does recommend deploying the API service with mod_wsgi and without using eventlet.","commit_id":"b9246b3bd4f0fc13de0db1f1d113eb8d31fc56a5"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"a6c052f70c79cfb0fc1aee227d0dee4d4e4edea6","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Guidelines for using eventlet:"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"* When using eventlet.monkey_patch, do it first or not at all.  In practice,"},{"line_number":33,"context_line":"  this means monkey patching in a top-level __init__.py which is guaranteed"},{"line_number":34,"context_line":"  to be run before any other project code.  As an example, Nova monkey patches"},{"line_number":35,"context_line":"  in nova/cmd/__init__.py and nova/tests/unit/__init__.py so that in both the"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da86d52c_18a11f94","line":32,"in_reply_to":"da86d52c_d0177fec","updated":"2015-02-11 21:56:46.000000000","message":"Yeah, I was thinking of something like the Keystone case where I believe it can run without eventlet in Apache.  Unless I misunderstood some of the discussion we had around that.","commit_id":"b9246b3bd4f0fc13de0db1f1d113eb8d31fc56a5"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"48fb14b72d2d09ac00ac027ab2f137b600633146","unresolved":false,"context_lines":[{"line_number":34,"context_line":"  to be run before any other project code.  As an example, Nova monkey patches"},{"line_number":35,"context_line":"  in nova/cmd/__init__.py and nova/tests/unit/__init__.py so that in both the"},{"line_number":36,"context_line":"  runtime and test scenarios the monkey patching happens before any Nova code"},{"line_number":37,"context_line":"  executes."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"  The reasoning behind this is that unpatched stdlib modules may not play"},{"line_number":40,"context_line":"  nicely with eventlet monkey patched ones.  For example, if thread A is"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da86d52c_0d475178","line":37,"updated":"2015-02-10 22:17:11.000000000","message":"Maybe it\u0027s worth noting that currently monkey_patching + flake8 on multicore do not work and require a hack like: https://review.openstack.org/#/c/153699/4/neutron/__init__.py to be able to store hacking rules for flake8 inside the package that invokes monkey_patch() in its __init__.py.","commit_id":"b9246b3bd4f0fc13de0db1f1d113eb8d31fc56a5"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"a6c052f70c79cfb0fc1aee227d0dee4d4e4edea6","unresolved":false,"context_lines":[{"line_number":34,"context_line":"  to be run before any other project code.  As an example, Nova monkey patches"},{"line_number":35,"context_line":"  in nova/cmd/__init__.py and nova/tests/unit/__init__.py so that in both the"},{"line_number":36,"context_line":"  runtime and test scenarios the monkey patching happens before any Nova code"},{"line_number":37,"context_line":"  executes."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"  The reasoning behind this is that unpatched stdlib modules may not play"},{"line_number":40,"context_line":"  nicely with eventlet monkey patched ones.  For example, if thread A is"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da86d52c_cca7c809","line":37,"in_reply_to":"da86d52c_0d475178","updated":"2015-02-11 21:56:46.000000000","message":"I heard this mentioned, but I wasn\u0027t clear on what the issue was.  Basically it sounds like if you have local hacking checks in the project that would fall under the module where you are performing monkey patching, you need a way to disable monkey patching during flake8 runs?\n\nI can certainly add something to that effect in the next patch set.","commit_id":"b9246b3bd4f0fc13de0db1f1d113eb8d31fc56a5"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"ca48862cdcc56f1397bc96d8feaf22f64113f90f","unresolved":false,"context_lines":[{"line_number":34,"context_line":"  to be run before any other project code.  As an example, Nova monkey patches"},{"line_number":35,"context_line":"  in nova/cmd/__init__.py and nova/tests/unit/__init__.py so that in both the"},{"line_number":36,"context_line":"  runtime and test scenarios the monkey patching happens before any Nova code"},{"line_number":37,"context_line":"  executes."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"  The reasoning behind this is that unpatched stdlib modules may not play"},{"line_number":40,"context_line":"  nicely with eventlet monkey patched ones.  For example, if thread A is"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da86d52c_b01a106d","line":37,"in_reply_to":"da86d52c_0d475178","updated":"2015-02-11 08:12:03.000000000","message":"that\u0027s a good thing to note, I believe","commit_id":"b9246b3bd4f0fc13de0db1f1d113eb8d31fc56a5"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"329f4f5acae0afdd0f7e8fea9a65a3418b7b18ad","unresolved":false,"context_lines":[{"line_number":34,"context_line":"  to be run before any other project code.  As an example, Nova monkey patches"},{"line_number":35,"context_line":"  in nova/cmd/__init__.py and nova/tests/unit/__init__.py so that in both the"},{"line_number":36,"context_line":"  runtime and test scenarios the monkey patching happens before any Nova code"},{"line_number":37,"context_line":"  executes."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"  The reasoning behind this is that unpatched stdlib modules may not play"},{"line_number":40,"context_line":"  nicely with eventlet monkey patched ones.  For example, if thread A is"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da86d52c_d57be9bb","line":37,"in_reply_to":"da86d52c_b01a106d","updated":"2015-02-11 14:03:46.000000000","message":"FYI Oslo Messaging calls eventlet.monkey_patch() in tests/__init__.py. By the way, the import eventlet is currently optional, because there are still eventlet issues in Oslo Messaging with eventlet and monkey-patching.","commit_id":"b9246b3bd4f0fc13de0db1f1d113eb8d31fc56a5"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"8d76d306b471c62f5323851e310b85d88fcb42aa","unresolved":false,"context_lines":[{"line_number":34,"context_line":"  to be run before any other project code.  As an example, Nova monkey patches"},{"line_number":35,"context_line":"  in nova/cmd/__init__.py and nova/tests/unit/__init__.py so that in both the"},{"line_number":36,"context_line":"  runtime and test scenarios the monkey patching happens before any Nova code"},{"line_number":37,"context_line":"  executes."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"  The reasoning behind this is that unpatched stdlib modules may not play"},{"line_number":40,"context_line":"  nicely with eventlet monkey patched ones.  For example, if thread A is"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da86d52c_f4c1a14e","line":37,"in_reply_to":"da86d52c_cca7c809","updated":"2015-02-12 11:05:14.000000000","message":"It seems that if there are multiple flake8 workers (either -j 2 or just multicore), and stdlib is monkey_patched, flake8 just hangs. No idea about internal mechanics.","commit_id":"b9246b3bd4f0fc13de0db1f1d113eb8d31fc56a5"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"446261f5197e195ae2b2bcc7ac81fa014671890a","unresolved":false,"context_lines":[{"line_number":34,"context_line":"  to be run before any other project code.  As an example, Nova monkey patches"},{"line_number":35,"context_line":"  in nova/cmd/__init__.py and nova/tests/unit/__init__.py so that in both the"},{"line_number":36,"context_line":"  runtime and test scenarios the monkey patching happens before any Nova code"},{"line_number":37,"context_line":"  executes."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"  The reasoning behind this is that unpatched stdlib modules may not play"},{"line_number":40,"context_line":"  nicely with eventlet monkey patched ones.  For example, if thread A is"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da86d52c_55d61850","line":37,"in_reply_to":"da86d52c_d57be9bb","updated":"2015-02-11 14:04:41.000000000","message":"Oops, I forgot to mention: issues *with Python 3*! See for example my pull request:\nhttps://github.com/eventlet/eventlet/pull/187","commit_id":"b9246b3bd4f0fc13de0db1f1d113eb8d31fc56a5"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"b56554323567bb819b6c0d9838f39ab2a4acbd96","unresolved":false,"context_lines":[{"line_number":46,"context_line":"  possible race conditions during development or review, and in fact it is"},{"line_number":47,"context_line":"  impossible because the race condition could be introduced by code we"},{"line_number":48,"context_line":"  consume from another library.  Because of this, it is safest to"},{"line_number":49,"context_line":"  simply eliminate the races by monkey patching before any other code is run."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"* There is a green thread-aware subprocess module in eventlet, but it does"},{"line_number":52,"context_line":"  *not* get patched in by eventlet.monkey_patch.  Code that has interactions"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da86d52c_99d46b21","line":49,"updated":"2015-02-10 20:24:32.000000000","message":"+1\n\nAlthough it does seem mixed in what people patch and what they don\u0027t (which is not a good thing to do).\n\nI see glance uses the following:\n\nhttps://github.com/openstack/glance/blob/master/glance/cmd/api.py#L31\n\n    eventlet.patcher.monkey_patch(all\u003dFalse, socket\u003dTrue, time\u003dTrue,\n                                  select\u003dTrue, thread\u003dTrue, os\u003dTrue)\n\nBut then nova is doing the following:\n\nhttps://github.com/openstack/nova/blob/master/nova/cmd/__init__.py\n\n    if debugger.enabled():\n        # turn off thread patching to enable the remote debugger\n        eventlet.monkey_patch(os\u003dFalse, thread\u003dFalse)\n    else:\n        eventlet.monkey_patch(os\u003dFalse)\n\nImho doing \u0027thread\u003dFalse\u0027 is bound to not work out...\n\nTry running the following:\n\nhttp://paste.ubuntu.com/10163391/ (it will lock up), now imagine some library\nis doing something similar (expecting this to work out just as it would\nnormally, but now it locks up, great when nova debugger is enabled; sounds like\nthe debugging problem just got much worse, haha...)\n\nAnd neutron is doing the following:\n\nhttps://github.com/openstack/neutron/blob/master/neutron/server/__init__.py#L24\n\n    eventlet.monkey_patch()\n\nSeems totally inconsistent imho ;)","commit_id":"b9246b3bd4f0fc13de0db1f1d113eb8d31fc56a5"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"da11fff821a3c50245d51f03763ca421f637139a","unresolved":false,"context_lines":[{"line_number":46,"context_line":"  possible race conditions during development or review, and in fact it is"},{"line_number":47,"context_line":"  impossible because the race condition could be introduced by code we"},{"line_number":48,"context_line":"  consume from another library.  Because of this, it is safest to"},{"line_number":49,"context_line":"  simply eliminate the races by monkey patching before any other code is run."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"* There is a green thread-aware subprocess module in eventlet, but it does"},{"line_number":52,"context_line":"  *not* get patched in by eventlet.monkey_patch.  Code that has interactions"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da86d52c_b2091486","line":49,"in_reply_to":"da86d52c_30f0dbfd","updated":"2015-02-11 20:52:02.000000000","message":"Interdependencies make me sad :-/","commit_id":"b9246b3bd4f0fc13de0db1f1d113eb8d31fc56a5"},{"author":{"_account_id":13478,"name":"Boris Bobrov","email":"b.bobrov@sap.com","username":"bbobrov"},"change_message_id":"f5db324968ea0387b413232533ac8f507d1c8112","unresolved":false,"context_lines":[{"line_number":46,"context_line":"  possible race conditions during development or review, and in fact it is"},{"line_number":47,"context_line":"  impossible because the race condition could be introduced by code we"},{"line_number":48,"context_line":"  consume from another library.  Because of this, it is safest to"},{"line_number":49,"context_line":"  simply eliminate the races by monkey patching before any other code is run."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"* There is a green thread-aware subprocess module in eventlet, but it does"},{"line_number":52,"context_line":"  *not* get patched in by eventlet.monkey_patch.  Code that has interactions"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da86d52c_30f0dbfd","line":49,"in_reply_to":"da86d52c_99d46b21","updated":"2015-02-11 10:39:22.000000000","message":"\"if debugger.enabled():\" might also depend on oslo_config to parse options passed from cli. In Keystone we use that to determine if pydev is enabled.","commit_id":"b9246b3bd4f0fc13de0db1f1d113eb8d31fc56a5"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"a6c052f70c79cfb0fc1aee227d0dee4d4e4edea6","unresolved":false,"context_lines":[{"line_number":46,"context_line":"  possible race conditions during development or review, and in fact it is"},{"line_number":47,"context_line":"  impossible because the race condition could be introduced by code we"},{"line_number":48,"context_line":"  consume from another library.  Because of this, it is safest to"},{"line_number":49,"context_line":"  simply eliminate the races by monkey patching before any other code is run."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"* There is a green thread-aware subprocess module in eventlet, but it does"},{"line_number":52,"context_line":"  *not* get patched in by eventlet.monkey_patch.  Code that has interactions"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da86d52c_0cdba07c","line":49,"in_reply_to":"da86d52c_99d46b21","updated":"2015-02-11 21:56:46.000000000","message":"Yeah, it would be nice if someone from Nova or Glance could comment on why they patch what they do.  As you noted, selective monkey patching seems fraught with peril.\n\nThey problem is, I don\u0027t know why they\u0027re doing that so I can\u0027t really come up with a best practice recommendation.  I know someone mentioned patching thread caused issues under a debugger, but as you point out that just won\u0027t work right. :-/","commit_id":"b9246b3bd4f0fc13de0db1f1d113eb8d31fc56a5"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"b56554323567bb819b6c0d9838f39ab2a4acbd96","unresolved":false,"context_lines":[{"line_number":53,"context_line":"  between green threads and the subprocess module must be sure to use the"},{"line_number":54,"context_line":"  green subprocess module explicitly.  A simpler alternative is to use"},{"line_number":55,"context_line":"  processutils from oslo.concurrency, which selects the appropriate module"},{"line_number":56,"context_line":"  depending on the status of eventlet\u0027s monkey patching."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Alternatives"},{"line_number":59,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da86d52c_79c25754","line":56,"updated":"2015-02-10 20:24:32.000000000","message":"Is the a eventlet bug to fix this? It seems like ummm, a bug that they should fix (so that all the libraries/apps in the world get to benefit from the change, and not those that just happen to use oslo.concurrency).","commit_id":"b9246b3bd4f0fc13de0db1f1d113eb8d31fc56a5"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"a6c052f70c79cfb0fc1aee227d0dee4d4e4edea6","unresolved":false,"context_lines":[{"line_number":53,"context_line":"  between green threads and the subprocess module must be sure to use the"},{"line_number":54,"context_line":"  green subprocess module explicitly.  A simpler alternative is to use"},{"line_number":55,"context_line":"  processutils from oslo.concurrency, which selects the appropriate module"},{"line_number":56,"context_line":"  depending on the status of eventlet\u0027s monkey patching."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Alternatives"},{"line_number":59,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da86d52c_cc28a835","line":56,"in_reply_to":"da86d52c_79c25754","updated":"2015-02-11 21:56:46.000000000","message":"Yeah, we should probably at least raise the question with them.  I\u0027m not actually sure why that isn\u0027t monkey patched automatically (maybe because it\u0027s a full module, and the other monkey patching is only replacing classes/functions?).","commit_id":"b9246b3bd4f0fc13de0db1f1d113eb8d31fc56a5"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"ca48862cdcc56f1397bc96d8feaf22f64113f90f","unresolved":false,"context_lines":[{"line_number":54,"context_line":"  green subprocess module explicitly.  A simpler alternative is to use"},{"line_number":55,"context_line":"  processutils from oslo.concurrency, which selects the appropriate module"},{"line_number":56,"context_line":"  depending on the status of eventlet\u0027s monkey patching."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Alternatives"},{"line_number":59,"context_line":"------------"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"da86d52c_306c60d0","line":57,"updated":"2015-02-11 08:12:03.000000000","message":"Another thing important to document about eventlet is to be careful about what might trigger a context switch, and that this can cause deadlocks especially when a context switch happens within a DB transaction.\n\nThis bug is an instance of this issue: https://bugs.launchpad.net/neutron/+bug/1330638\n\nIt appears as a deadlock but actually it\u0027s just an issue triggered by an eventlet greenthread doing an untimely yield to another thread.","commit_id":"b9246b3bd4f0fc13de0db1f1d113eb8d31fc56a5"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"34db1c40eca9b68212a313610810b6af338ef44c","unresolved":false,"context_lines":[{"line_number":54,"context_line":"  green subprocess module explicitly.  A simpler alternative is to use"},{"line_number":55,"context_line":"  processutils from oslo.concurrency, which selects the appropriate module"},{"line_number":56,"context_line":"  depending on the status of eventlet\u0027s monkey patching."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Alternatives"},{"line_number":59,"context_line":"------------"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"da86d52c_ddf5b9ed","line":57,"in_reply_to":"da86d52c_100bdc8e","updated":"2015-02-11 21:05:27.000000000","message":"I don\u0027t understand immediately how this switch would fix this issue. Do you have any pointer?","commit_id":"b9246b3bd4f0fc13de0db1f1d113eb8d31fc56a5"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7dcfc82388990212a7dba4f58bc82ddfdcf9fa87","unresolved":false,"context_lines":[{"line_number":54,"context_line":"  green subprocess module explicitly.  A simpler alternative is to use"},{"line_number":55,"context_line":"  processutils from oslo.concurrency, which selects the appropriate module"},{"line_number":56,"context_line":"  depending on the status of eventlet\u0027s monkey patching."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Alternatives"},{"line_number":59,"context_line":"------------"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"da86d52c_100bdc8e","line":57,"in_reply_to":"da86d52c_306c60d0","updated":"2015-02-11 08:35:22.000000000","message":"Yeah, should be fixed by mysql db driver switch to pymysql.","commit_id":"b9246b3bd4f0fc13de0db1f1d113eb8d31fc56a5"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a46ddd1662d4c46dc488c0d47a2382f0f6b1ec97","unresolved":false,"context_lines":[{"line_number":54,"context_line":"  green subprocess module explicitly.  A simpler alternative is to use"},{"line_number":55,"context_line":"  processutils from oslo.concurrency, which selects the appropriate module"},{"line_number":56,"context_line":"  depending on the status of eventlet\u0027s monkey patching."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Alternatives"},{"line_number":59,"context_line":"------------"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"da86d52c_343259a7","line":57,"in_reply_to":"da86d52c_987fcfdf","updated":"2015-02-12 11:02:52.000000000","message":"https://wiki.openstack.org/wiki/OpenStack_and_SQLAlchemy#MySQLdb_.2B_eventlet_.3D_sad","commit_id":"b9246b3bd4f0fc13de0db1f1d113eb8d31fc56a5"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"a6c052f70c79cfb0fc1aee227d0dee4d4e4edea6","unresolved":false,"context_lines":[{"line_number":54,"context_line":"  green subprocess module explicitly.  A simpler alternative is to use"},{"line_number":55,"context_line":"  processutils from oslo.concurrency, which selects the appropriate module"},{"line_number":56,"context_line":"  depending on the status of eventlet\u0027s monkey patching."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Alternatives"},{"line_number":59,"context_line":"------------"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"da86d52c_987fcfdf","line":57,"in_reply_to":"da86d52c_ddf5b9ed","updated":"2015-02-11 21:56:46.000000000","message":"pymysql is native Python as opposed to a C extension, so apparently it plays nicer with eventlet.  See also https://wiki.openstack.org/wiki/PyMySQL_evaluation#MySQL_DB_Drivers_Comparison","commit_id":"b9246b3bd4f0fc13de0db1f1d113eb8d31fc56a5"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"b56554323567bb819b6c0d9838f39ab2a4acbd96","unresolved":false,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":"Audit the use of eventlet in OpenStack projects and make any changes necessary"},{"line_number":77,"context_line":"to abide by these guidelines."},{"line_number":78,"context_line":""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"Dependencies"},{"line_number":81,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da86d52c_f99ba763","line":78,"updated":"2015-02-10 20:24:32.000000000","message":"Perhaps use https://review.openstack.org/#/c/149730/ where desireable? and tell people that if they see the warnings that thing emits; then they are likely in for a bad time, ha.","commit_id":"b9246b3bd4f0fc13de0db1f1d113eb8d31fc56a5"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"a6c052f70c79cfb0fc1aee227d0dee4d4e4edea6","unresolved":false,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":"Audit the use of eventlet in OpenStack projects and make any changes necessary"},{"line_number":77,"context_line":"to abide by these guidelines."},{"line_number":78,"context_line":""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"Dependencies"},{"line_number":81,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da86d52c_6cbb3ce5","line":78,"in_reply_to":"da86d52c_f99ba763","updated":"2015-02-11 21:56:46.000000000","message":"My thought was that that\u0027s more for libs, since the applications themselves have full control over what does and doesn\u0027t get patched.  It wouldn\u0027t hurt to mention it though in case someone wants to know how to make their new lib work nicely with eventlet.","commit_id":"b9246b3bd4f0fc13de0db1f1d113eb8d31fc56a5"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"69b78bc827a12ac6dbc090e1ab351754812b75b2","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"* Monkey patching should also be done in a way that allows services to run"},{"line_number":55,"context_line":"  without it, such as when an API service runs under Apache.  This is the"},{"line_number":56,"context_line":"  reason for Nova not simply monkey patching in nova/__init__.py."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"  Another example is Keystone, which recommends running under Apache but also"},{"line_number":59,"context_line":"  supports eventlet.  They have a separate eventlet binary \u0027keystone-all\u0027 which"}],"source_content_type":"text/x-rst","patch_set":2,"id":"ba3cc151_8958fdfb","line":56,"updated":"2015-07-07 14:35:18.000000000","message":"\\o/","commit_id":"a4e96ea539b1c3fbf53c99d28d3b777f235967e1"}]}
