)]}'
{"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"34f8dea0a82ac6ab9bf7d87da3d621f5d3aed1ec","unresolved":false,"context_lines":[{"line_number":695,"context_line":""},{"line_number":696,"context_line":"    # Serialize this operation with a semaphore in order to prevent undesired"},{"line_number":697,"context_line":"    # eventlet yields leading to \u0027lock wait timeout\u0027 errors"},{"line_number":698,"context_line":"    @lockutils.synchronized(\u0027db-access\u0027, \u0027neutron-\u0027)"},{"line_number":699,"context_line":"    def delete_port(self, context, id, l3_port_check\u003dTrue):"},{"line_number":700,"context_line":"        LOG.debug(_(\"Deleting port %s\"), id)"},{"line_number":701,"context_line":"        l3plugin \u003d manager.NeutronManager.get_service_plugins().get("}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2FurI%3D","line":698,"updated":"2014-03-14 06:43:00.000000000","message":"I wonder why stop here? Why not just add this synchronized() everywhere :) . I think this patch will help though but I don\u0027t necessarily thinks it\u0027s the right solution to these problems.","commit_id":"390cfa116d3e9dd307eb6785bead28282cabd643"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"6778d3980585f81027edec258cc1c3eecccf51d0","unresolved":false,"context_lines":[{"line_number":695,"context_line":""},{"line_number":696,"context_line":"    # Serialize this operation with a semaphore in order to prevent undesired"},{"line_number":697,"context_line":"    # eventlet yields leading to \u0027lock wait timeout\u0027 errors"},{"line_number":698,"context_line":"    @lockutils.synchronized(\u0027db-access\u0027, \u0027neutron-\u0027)"},{"line_number":699,"context_line":"    def delete_port(self, context, id, l3_port_check\u003dTrue):"},{"line_number":700,"context_line":"        LOG.debug(_(\"Deleting port %s\"), id)"},{"line_number":701,"context_line":"        l3plugin \u003d manager.NeutronManager.get_service_plugins().get("}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2FuMY%3D","line":698,"updated":"2014-03-14 08:18:16.000000000","message":"nit: can use synchronized from neutron.common.utils which adds \u0027neutron-\u0027 lock_file_prefix by default","commit_id":"390cfa116d3e9dd307eb6785bead28282cabd643"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"5eafd3caa58c01643842cdd1a470ac0a9c9c8129","unresolved":false,"context_lines":[{"line_number":695,"context_line":""},{"line_number":696,"context_line":"    # Serialize this operation with a semaphore in order to prevent undesired"},{"line_number":697,"context_line":"    # eventlet yields leading to \u0027lock wait timeout\u0027 errors"},{"line_number":698,"context_line":"    @lockutils.synchronized(\u0027db-access\u0027, \u0027neutron-\u0027)"},{"line_number":699,"context_line":"    def delete_port(self, context, id, l3_port_check\u003dTrue):"},{"line_number":700,"context_line":"        LOG.debug(_(\"Deleting port %s\"), id)"},{"line_number":701,"context_line":"        l3plugin \u003d manager.NeutronManager.get_service_plugins().get("}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2Ft3E%3D","line":698,"in_reply_to":"AAAAWH%2F%2FuMY%3D","updated":"2014-03-14 09:11:31.000000000","message":"@Oleg: I use this as a form of rebellion against a pointless method! I will use the neutron wrapper\n\n@Aaron: It\u0027s a lot better than what we\u0027ve been doing so far. The approach we adopted, which was to put sleeps within transactions, worked because we ended up making the system more chaotic thus giving more chances to transactions to complete without stalling on eventlet.\nHowever, if you are a proponent of chaos injection, I\u0027m up for it!\n\nAlso, I decided to apply the synchronized decorator only to the methods where deadlock was witnessed. I know of two other instances (ipallocate/deallocate and updatevipstatus/deletevip) which can be addressed as separate patches.","commit_id":"390cfa116d3e9dd307eb6785bead28282cabd643"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"eb27a9dea3c4b79567d45875524b21d33be44edf","unresolved":false,"context_lines":[{"line_number":693,"context_line":"        return updated_port"},{"line_number":694,"context_line":""},{"line_number":695,"context_line":"    # Serialize this operation with a semaphore in order to prevent undesired"},{"line_number":696,"context_line":"    # eventlet yields leading to \u0027lock wait timeout\u0027 errors"},{"line_number":697,"context_line":"    @lockutils.synchronized(\u0027db-access\u0027, \u0027neutron-\u0027)"},{"line_number":698,"context_line":"    def delete_port(self, context, id, l3_port_check\u003dTrue):"},{"line_number":699,"context_line":"        LOG.debug(_(\"Deleting port %s\"), id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FKpc%3D","line":696,"updated":"2014-03-19 19:25:30.000000000","message":"I\u0027d suggest changing these comments (moved with the locking) to REVISITs, since we really aren\u0027t sure they fix the underlying issue, and since they won\u0027t necessarily prevent timeouts waiting for update locks held by other server processes to be released.","commit_id":"a1477c2110ef728cf83178d365553b92b0116cef"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"a2e9eddfbe31219ddb29bbe8530e14b3a33ae1aa","unresolved":false,"context_lines":[{"line_number":703,"context_line":"            l3plugin.prevent_l3_port_deletion(context, id)"},{"line_number":704,"context_line":""},{"line_number":705,"context_line":"        session \u003d context.session"},{"line_number":706,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":707,"context_line":"            try:"},{"line_number":708,"context_line":"                port_db \u003d (session.query(models_v2.Port)."},{"line_number":709,"context_line":"                           enable_eagerloads(False)."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FKzc%3D","line":706,"updated":"2014-03-19 18:59:23.000000000","message":"Can we lock the semaphore around this with clause instead of this entire function? That would avoid the semaphore being locked during the delete_port_postcommit() call on line 731 below, in which mechanism drivers might make blocking remote calls to controllers or devices.","commit_id":"a1477c2110ef728cf83178d365553b92b0116cef"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"d47fd1d9c8eacf5f96550255553bb3a4bf98526b","unresolved":false,"context_lines":[{"line_number":703,"context_line":"            l3plugin.prevent_l3_port_deletion(context, id)"},{"line_number":704,"context_line":""},{"line_number":705,"context_line":"        session \u003d context.session"},{"line_number":706,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":707,"context_line":"            try:"},{"line_number":708,"context_line":"                port_db \u003d (session.query(models_v2.Port)."},{"line_number":709,"context_line":"                           enable_eagerloads(False)."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FKvE%3D","line":706,"in_reply_to":"AAAAWH%2F%2FKzc%3D","updated":"2014-03-19 19:10:44.000000000","message":"This should work. \n\nChange to \n\nwith lockutils.lock(\u0027db-access\u0027), session.begin(subtransactions\u003dTrue):","commit_id":"a1477c2110ef728cf83178d365553b92b0116cef"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"a2e9eddfbe31219ddb29bbe8530e14b3a33ae1aa","unresolved":false,"context_lines":[{"line_number":738,"context_line":""},{"line_number":739,"context_line":"    def update_port_status(self, context, port_id, status):"},{"line_number":740,"context_line":"        updated \u003d False"},{"line_number":741,"context_line":"        session \u003d context.session"},{"line_number":742,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":743,"context_line":"            port \u003d db.get_port(session, port_id)"},{"line_number":744,"context_line":"            if not port:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FK1Q%3D","line":741,"updated":"2014-03-19 18:59:23.000000000","message":"Can we lock the semaphore around this with clause instead of around the RPC functions that call this function? That would avoid the semaphore being locked during the update_port_postcommit() call on line 761 below, in which mechanism drivers might make blocking remote calls to controllers or devices.","commit_id":"a1477c2110ef728cf83178d365553b92b0116cef"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"d47fd1d9c8eacf5f96550255553bb3a4bf98526b","unresolved":false,"context_lines":[{"line_number":738,"context_line":""},{"line_number":739,"context_line":"    def update_port_status(self, context, port_id, status):"},{"line_number":740,"context_line":"        updated \u003d False"},{"line_number":741,"context_line":"        session \u003d context.session"},{"line_number":742,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":743,"context_line":"            port \u003d db.get_port(session, port_id)"},{"line_number":744,"context_line":"            if not port:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FKuU%3D","line":741,"in_reply_to":"AAAAWH%2F%2FK1Q%3D","updated":"2014-03-19 19:10:44.000000000","message":"ditto","commit_id":"a1477c2110ef728cf83178d365553b92b0116cef"}],"neutron/plugins/ml2/rpc.py":[{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"256d776e40ad16492dc8d6de2624dbdaa7d5de0e","unresolved":false,"context_lines":[{"line_number":90,"context_line":"    # Serialize this operation with a semaphore in order to prevent undesired"},{"line_number":91,"context_line":"    # eventlet yields leading to \u0027lock wait timeout\u0027 errors"},{"line_number":92,"context_line":"    @lockutils.synchronized(\u0027db-access\u0027, \u0027neutron-\u0027)"},{"line_number":93,"context_line":"    def get_device_details(self, rpc_context, **kwargs):"},{"line_number":94,"context_line":"        \"\"\"Agent requests device details.\"\"\""},{"line_number":95,"context_line":"        agent_id \u003d kwargs.get(\u0027agent_id\u0027)"},{"line_number":96,"context_line":"        device \u003d kwargs.get(\u0027device\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FLN4%3D","line":93,"updated":"2014-03-19 17:59:24.000000000","message":"The patch I\u0027m working on to move port binding outside of transactions will introduce a possible loop within this function that has remote calls and transactions in it. I don\u0027t think a semaphore around all of this is a good idea.","commit_id":"a1477c2110ef728cf83178d365553b92b0116cef"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"e340112906d9c7046c734947aa11fd677a3f9936","unresolved":false,"context_lines":[{"line_number":90,"context_line":"    # Serialize this operation with a semaphore in order to prevent undesired"},{"line_number":91,"context_line":"    # eventlet yields leading to \u0027lock wait timeout\u0027 errors"},{"line_number":92,"context_line":"    @lockutils.synchronized(\u0027db-access\u0027, \u0027neutron-\u0027)"},{"line_number":93,"context_line":"    def get_device_details(self, rpc_context, **kwargs):"},{"line_number":94,"context_line":"        \"\"\"Agent requests device details.\"\"\""},{"line_number":95,"context_line":"        agent_id \u003d kwargs.get(\u0027agent_id\u0027)"},{"line_number":96,"context_line":"        device \u003d kwargs.get(\u0027device\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FIwc%3D","line":93,"in_reply_to":"AAAAWH%2F%2FLN4%3D","updated":"2014-03-20 00:45:10.000000000","message":"I\u0027m equally scared by a change which introduces a possible loop in this function.\nBut I will wait for the actual patch to make a judgment and I will definitely not complain if it should interfere with another patch I\u0027m working on.","commit_id":"a1477c2110ef728cf83178d365553b92b0116cef"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"a2e9eddfbe31219ddb29bbe8530e14b3a33ae1aa","unresolved":false,"context_lines":[{"line_number":145,"context_line":"            if port.status !\u003d new_status:"},{"line_number":146,"context_line":"                plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":147,"context_line":"                plugin.update_port_status(rpc_context,"},{"line_number":148,"context_line":"                                          port_id,"},{"line_number":149,"context_line":"                                          new_status)"},{"line_number":150,"context_line":"                port.status \u003d new_status"},{"line_number":151,"context_line":"            entry \u003d {\u0027device\u0027: device,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FK3g%3D","line":148,"updated":"2014-03-19 18:59:23.000000000","message":"In addition to my concern in the comment above, the update_port_status() call also contains a transaction and mechanism driver port_update_postcommit() calls that potentially make blocking calls to controllers.","commit_id":"a1477c2110ef728cf83178d365553b92b0116cef"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"d47fd1d9c8eacf5f96550255553bb3a4bf98526b","unresolved":false,"context_lines":[{"line_number":145,"context_line":"            if port.status !\u003d new_status:"},{"line_number":146,"context_line":"                plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":147,"context_line":"                plugin.update_port_status(rpc_context,"},{"line_number":148,"context_line":"                                          port_id,"},{"line_number":149,"context_line":"                                          new_status)"},{"line_number":150,"context_line":"                port.status \u003d new_status"},{"line_number":151,"context_line":"            entry \u003d {\u0027device\u0027: device,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FKtw%3D","line":148,"in_reply_to":"AAAAWH%2F%2FK3g%3D","updated":"2014-03-19 19:10:44.000000000","message":"would putting the lock in update_port_status() work?","commit_id":"a1477c2110ef728cf83178d365553b92b0116cef"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"eb27a9dea3c4b79567d45875524b21d33be44edf","unresolved":false,"context_lines":[{"line_number":145,"context_line":"            if port.status !\u003d new_status:"},{"line_number":146,"context_line":"                plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":147,"context_line":"                plugin.update_port_status(rpc_context,"},{"line_number":148,"context_line":"                                          port_id,"},{"line_number":149,"context_line":"                                          new_status)"},{"line_number":150,"context_line":"                port.status \u003d new_status"},{"line_number":151,"context_line":"            entry \u003d {\u0027device\u0027: device,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FKrA%3D","line":148,"in_reply_to":"AAAAWH%2F%2FKtw%3D","updated":"2014-03-19 19:25:30.000000000","message":"That\u0027s what I was suggesting in my comment there.","commit_id":"a1477c2110ef728cf83178d365553b92b0116cef"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"a2e9eddfbe31219ddb29bbe8530e14b3a33ae1aa","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                    \u0027exists\u0027: port_exists}"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        port_exists \u003d plugin.update_port_status(rpc_context, port_id,"},{"line_number":189,"context_line":"                                                q_const.PORT_STATUS_DOWN)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"        return {\u0027device\u0027: device,"},{"line_number":192,"context_line":"                \u0027exists\u0027: port_exists}"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FK3c%3D","line":189,"updated":"2014-03-19 18:59:23.000000000","message":"Same here.","commit_id":"a1477c2110ef728cf83178d365553b92b0116cef"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"a2e9eddfbe31219ddb29bbe8530e14b3a33ae1aa","unresolved":false,"context_lines":[{"line_number":209,"context_line":"                      {\u0027device\u0027: device, \u0027host\u0027: host})"},{"line_number":210,"context_line":"            return"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        plugin.update_port_status(rpc_context, port_id,"},{"line_number":213,"context_line":"                                  q_const.PORT_STATUS_ACTIVE)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FK3E%3D","line":212,"updated":"2014-03-19 18:59:23.000000000","message":"And here.","commit_id":"a1477c2110ef728cf83178d365553b92b0116cef"}]}
