)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"3f48d25dd416aac7e8b83d3548d2990a46987792","unresolved":false,"context_lines":[{"line_number":27,"context_line":"port is unlikely, the strategy is to allow concurrent attempts to bind"},{"line_number":28,"context_line":"the same port, and resolve which results are used in the transaction"},{"line_number":29,"context_line":"after the binding attempt."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Closes-Bug: 1276391"},{"line_number":32,"context_line":"Change-Id: I65dafc330d6e812dad0667d2383858504d0ba299"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAAWH%2F9ktM%3D","line":30,"updated":"2014-04-03 15:50:28.000000000","message":"Your change is also affecting bug 1253896, it\u0027s probably worth mentioning in the commit message","commit_id":"eeb289ac0201e15f44ca5056181d1780c56ba40f"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"6ae3f32e960ecbf25333993df06a0f220989e1a0","unresolved":false,"context_lines":[{"line_number":27,"context_line":"port is unlikely, the strategy is to allow concurrent attempts to bind"},{"line_number":28,"context_line":"the same port, and resolve which results are used in the transaction"},{"line_number":29,"context_line":"after the binding attempt."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Closes-Bug: 1276391"},{"line_number":32,"context_line":"Change-Id: I65dafc330d6e812dad0667d2383858504d0ba299"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAAW3%2F%2F%2FG4%3D","line":30,"in_reply_to":"AAAAWH%2F9ktM%3D","updated":"2014-04-10 14:58:57.000000000","message":"Since the L2 agent issuing the get_device_details RPC on startup will now trigger binding if the port isn\u0027t already bound, it seemed that agent startup race conditions might be addressed by this patch. Rossella tested this, and unfortunately it doesn\u0027t help. Nova can\u0027t plug the VIF until ML2 has succeeded in binding, so it gives up immediately rather than waiting for notification. This might be addressed by having nova sleep and try calling port_update again a couple times in a loop while binding:vif_type is binding_failed.","commit_id":"eeb289ac0201e15f44ca5056181d1780c56ba40f"},{"author":{"_account_id":704,"name":"Edgar Magana","email":"emagana@gmail.com","username":"emagana"},"change_message_id":"0ef8b5b35bafffd5a60c0c7e92229ad50242b8fe","unresolved":false,"context_lines":[{"line_number":19,"context_line":"plugin outside of any enclosing DB transaction. Ports are created or"},{"line_number":20,"context_line":"updated in one transaction, then a binding is established if possible,"},{"line_number":21,"context_line":"and finally a 2nd transation commits the binding result."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"With [re]binding moved outside the DB transaction that triggered it,"},{"line_number":24,"context_line":"its now possibile that multiple threads or processes will concurrently"},{"line_number":25,"context_line":"try to bind the same port, or that the port will be updated"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"1ae5cdf2_8fcc3c63","line":22,"updated":"2014-06-10 17:27:07.000000000","message":"I do appreciate the detailed description here but most of this text is a copy of the bug description. I do not think we need this information again, you should describe the changes done within this commit only.\nIs there any DocImpact? I think there is or at least the port binding should be documented/updated","commit_id":"e92198585f22567c18466447b30be5ff220e5729"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"27d0f155318e999531821cfb914e7321ad2b89c2","unresolved":false,"context_lines":[{"line_number":19,"context_line":"plugin outside of any enclosing DB transaction. Ports are created or"},{"line_number":20,"context_line":"updated in one transaction, then a binding is established if possible,"},{"line_number":21,"context_line":"and finally a 2nd transation commits the binding result."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"With [re]binding moved outside the DB transaction that triggered it,"},{"line_number":24,"context_line":"its now possibile that multiple threads or processes will concurrently"},{"line_number":25,"context_line":"try to bind the same port, or that the port will be updated"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"baada198_f7431e6a","line":22,"in_reply_to":"1ae5cdf2_8fcc3c63","updated":"2014-07-09 05:04:27.000000000","message":"Done","commit_id":"e92198585f22567c18466447b30be5ff220e5729"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"d7194bd9015eff16832d60c2f60295dd5ffeea86","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Robert Kukura \u003ckukura@noironetworks.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-07-09 00:54:45 -0400"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"ML2: Bind ports outside transactions"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The ML2 plugin now calls the bind_port() operation on the registered"},{"line_number":10,"context_line":"mechanism drivers outside of any enclosing DB transaction. Ports are"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"baada198_fdb3ff07","line":7,"updated":"2014-07-09 06:21:51.000000000","message":"is this change a workaround for mysql+eventlet problem?","commit_id":"1f9fa40642ccef6eb9ee4c28b6d474d81ffe1e0d"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"67a6097c61c8649d0f56e8449e6c822a86d3bee0","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Robert Kukura \u003ckukura@noironetworks.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-07-09 00:54:45 -0400"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"ML2: Bind ports outside transactions"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The ML2 plugin now calls the bind_port() operation on the registered"},{"line_number":10,"context_line":"mechanism drivers outside of any enclosing DB transaction. Ports are"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"baada198_151dd873","line":7,"in_reply_to":"baada198_fdb3ff07","updated":"2014-07-09 17:57:33.000000000","message":"Not specifically, but it may help with that. In general, we don\u0027t want to do anything that blocks within transactions. This fix is needed so that ML2 mechanism drivers can make remote calls on controllers or devices in their bind_port() implementations.","commit_id":"1f9fa40642ccef6eb9ee4c28b6d474d81ffe1e0d"}],"neutron/plugins/ml2/db.py":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"d7194bd9015eff16832d60c2f60295dd5ffeea86","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        # REVISIT(rkukura): We need the Port and PortBinding records"},{"line_number":73,"context_line":"        # to both be added to the session and locked for update. A"},{"line_number":74,"context_line":"        # single joined query should work, but the combination of left"},{"line_number":75,"context_line":"        # outer joins and postgresql doesn\u0027t seem to work."},{"line_number":76,"context_line":"        port \u003d (session.query(models_v2.Port)."},{"line_number":77,"context_line":"                enable_eagerloads(False)."},{"line_number":78,"context_line":"                filter_by(id\u003dport_id)."}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_7d028fb5","line":75,"updated":"2014-07-09 06:21:51.000000000","message":"why don\u0027t you use use inner join?","commit_id":"1f9fa40642ccef6eb9ee4c28b6d474d81ffe1e0d"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"67a6097c61c8649d0f56e8449e6c822a86d3bee0","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        # REVISIT(rkukura): We need the Port and PortBinding records"},{"line_number":73,"context_line":"        # to both be added to the session and locked for update. A"},{"line_number":74,"context_line":"        # single joined query should work, but the combination of left"},{"line_number":75,"context_line":"        # outer joins and postgresql doesn\u0027t seem to work."},{"line_number":76,"context_line":"        port \u003d (session.query(models_v2.Port)."},{"line_number":77,"context_line":"                enable_eagerloads(False)."},{"line_number":78,"context_line":"                filter_by(id\u003dport_id)."}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_ad0224b2","line":75,"in_reply_to":"baada198_7d028fb5","updated":"2014-07-09 17:57:33.000000000","message":"I had tried many join variations when developing the patch a couple months ago, but kept running into various issues. This was the only approach I found that actually works in all cases. For one thing, there didn\u0027t seem to be any way to get the join to actually lock both records returned from the DB for update.","commit_id":"1f9fa40642ccef6eb9ee4c28b6d474d81ffe1e0d"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"48c7934e5452e0abbbe891d00dec3541bb80c004","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        port \u003d (session.query(models_v2.Port)."},{"line_number":77,"context_line":"                enable_eagerloads(False)."},{"line_number":78,"context_line":"                filter_by(id\u003dport_id)."},{"line_number":79,"context_line":"                with_lockmode(\u0027update\u0027)."},{"line_number":80,"context_line":"                one())"},{"line_number":81,"context_line":"        binding \u003d (session.query(models.PortBinding)."},{"line_number":82,"context_line":"                   enable_eagerloads(False)."}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_ab3ca1c0","line":79,"updated":"2014-07-10 16:40:17.000000000","message":"What about the issue with Galera clusters and the fact that SELECT FOR UPDATE is not supported? Wouldn\u0027t this approach add further complication to the way that needs to be addressed?","commit_id":"8fec5f06619a7c883e45660e6c34d83826c863a6"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"af2cc509906918acf3faae4f6899c9b028c0491d","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        port \u003d (session.query(models_v2.Port)."},{"line_number":77,"context_line":"                enable_eagerloads(False)."},{"line_number":78,"context_line":"                filter_by(id\u003dport_id)."},{"line_number":79,"context_line":"                with_lockmode(\u0027update\u0027)."},{"line_number":80,"context_line":"                one())"},{"line_number":81,"context_line":"        binding \u003d (session.query(models.PortBinding)."},{"line_number":82,"context_line":"                   enable_eagerloads(False)."}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_d0e1472b","line":79,"in_reply_to":"baada198_ab3ca1c0","updated":"2014-07-11 20:19:00.000000000","message":"I believe we should address (i.e. remove) the locking in a separate patch, following this one. This patch just continues the current locking approach. \n\nIs there a bug for eliminating the SELECT FOR UPDATE? \n\nI\u0027m hoping we can use the binding retry loop introduced in this patch to also retry when exceptions are raised due to DB commit conflicts, and then remove all the with_lockmode(\u0027update\u0027) calls within the loop. Does this make sense to you?","commit_id":"8fec5f06619a7c883e45660e6c34d83826c863a6"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"ad27eedf2bc0701ab40726576055c215f6acca65","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        port \u003d (session.query(models_v2.Port)."},{"line_number":77,"context_line":"                enable_eagerloads(False)."},{"line_number":78,"context_line":"                filter_by(id\u003dport_id)."},{"line_number":79,"context_line":"                with_lockmode(\u0027update\u0027)."},{"line_number":80,"context_line":"                one())"},{"line_number":81,"context_line":"        binding \u003d (session.query(models.PortBinding)."},{"line_number":82,"context_line":"                   enable_eagerloads(False)."}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_21cdcd31","line":79,"in_reply_to":"baada198_d0e1472b","updated":"2014-07-12 20:50:20.000000000","message":"Removing SELECT FOR UPDATE could imply lots of rework, so doing it in a separate patch seems better.","commit_id":"8fec5f06619a7c883e45660e6c34d83826c863a6"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"48c7934e5452e0abbbe891d00dec3541bb80c004","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        binding \u003d (session.query(models.PortBinding)."},{"line_number":82,"context_line":"                   enable_eagerloads(False)."},{"line_number":83,"context_line":"                   filter_by(port_id\u003dport_id)."},{"line_number":84,"context_line":"                   with_lockmode(\u0027update\u0027)."},{"line_number":85,"context_line":"                   one())"},{"line_number":86,"context_line":"        return port, binding"},{"line_number":87,"context_line":"    except exc.NoResultFound:"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_cbb9d52f","line":84,"updated":"2014-07-10 16:40:17.000000000","message":"ditto","commit_id":"8fec5f06619a7c883e45660e6c34d83826c863a6"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"48c7934e5452e0abbbe891d00dec3541bb80c004","unresolved":false,"context_lines":[{"line_number":152,"context_line":"                      {\u0027port_id\u0027: port_id})"},{"line_number":153,"context_line":"            return"},{"line_number":154,"context_line":"        except exc.MultipleResultsFound:"},{"line_number":155,"context_line":"            LOG.error(_(\"Multiple ports have port_id starting with %s\"),"},{"line_number":156,"context_line":"                      port_id)"},{"line_number":157,"context_line":"            return"},{"line_number":158,"context_line":"    return query.host"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_6bec4990","line":155,"updated":"2014-07-10 16:40:17.000000000","message":"why the excutils were not used here?","commit_id":"8fec5f06619a7c883e45660e6c34d83826c863a6"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"af2cc509906918acf3faae4f6899c9b028c0491d","unresolved":false,"context_lines":[{"line_number":152,"context_line":"                      {\u0027port_id\u0027: port_id})"},{"line_number":153,"context_line":"            return"},{"line_number":154,"context_line":"        except exc.MultipleResultsFound:"},{"line_number":155,"context_line":"            LOG.error(_(\"Multiple ports have port_id starting with %s\"),"},{"line_number":156,"context_line":"                      port_id)"},{"line_number":157,"context_line":"            return"},{"line_number":158,"context_line":"    return query.host"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_b0a7734f","line":155,"in_reply_to":"baada198_6bec4990","updated":"2014-07-11 20:19:00.000000000","message":"We are not re-raising the exception, so I\u0027m not sure what would be applicable from excutils?","commit_id":"8fec5f06619a7c883e45660e6c34d83826c863a6"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"5e764d6e7d37b8c366853cbdf3c8ce47adb62d8d","unresolved":false,"context_lines":[{"line_number":152,"context_line":"                      {\u0027port_id\u0027: port_id})"},{"line_number":153,"context_line":"            return"},{"line_number":154,"context_line":"        except exc.MultipleResultsFound:"},{"line_number":155,"context_line":"            LOG.error(_(\"Multiple ports have port_id starting with %s\"),"},{"line_number":156,"context_line":"                      port_id)"},{"line_number":157,"context_line":"            return"},{"line_number":158,"context_line":"    return query.host"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_f9e97ae3","line":155,"updated":"2014-07-15 15:03:02.000000000","message":"can you please use the translations hint _LE","commit_id":"b1677dcb80ce8b83aadb2180efad3527a96bd3bc"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"f4b892f4201f52fa71638eda1edd89e5ffbe26dc","unresolved":false,"context_lines":[{"line_number":152,"context_line":"                      {\u0027port_id\u0027: port_id})"},{"line_number":153,"context_line":"            return"},{"line_number":154,"context_line":"        except exc.MultipleResultsFound:"},{"line_number":155,"context_line":"            LOG.error(_(\"Multiple ports have port_id starting with %s\"),"},{"line_number":156,"context_line":"                      port_id)"},{"line_number":157,"context_line":"            return"},{"line_number":158,"context_line":"    return query.host"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_ca5f760d","line":155,"in_reply_to":"baada198_f9e97ae3","updated":"2014-07-15 15:47:18.000000000","message":"I\u0027m pretty sure the translation hints aren\u0027t being (consistently) used in other recent patches.  Maybe updating all of ML2 in a separate patch would make more sense.","commit_id":"b1677dcb80ce8b83aadb2180efad3527a96bd3bc"}],"neutron/plugins/ml2/driver_api.py":[{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"50cf662e53910341a69284467bd48791bcda94df","unresolved":false,"context_lines":[{"line_number":588,"context_line":""},{"line_number":589,"context_line":"        :param context: PortContext instance describing the port"},{"line_number":590,"context_line":""},{"line_number":591,"context_line":"        Called outside any transaction to attempt to establish a port"},{"line_number":592,"context_line":"        binding using this mechanism driver. If the driver is able to"},{"line_number":593,"context_line":"        bind the port, it must call context.set_binding() with the"},{"line_number":594,"context_line":"        binding details. Binding results being committed will be seen"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAXH%2F%2FSA0%3D","line":591,"updated":"2014-04-22 19:36:40.000000000","message":"(As good a place as any to add this comment.)\nmech_agent.py also has \"Called inside ...\" comments. Not sure it they need to be changed also.","commit_id":"cbfc338cd8191527758a77020f7f6f559a4442d9"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"ddec23416ae54c9406c6f9206c7613835f4d7c58","unresolved":false,"context_lines":[{"line_number":588,"context_line":""},{"line_number":589,"context_line":"        :param context: PortContext instance describing the port"},{"line_number":590,"context_line":""},{"line_number":591,"context_line":"        Called outside any transaction to attempt to establish a port"},{"line_number":592,"context_line":"        binding using this mechanism driver. If the driver is able to"},{"line_number":593,"context_line":"        bind the port, it must call context.set_binding() with the"},{"line_number":594,"context_line":"        binding details. Binding results being committed will be seen"}],"source_content_type":"text/x-python","patch_set":8,"id":"7adec928_fe75d6fa","line":591,"in_reply_to":"AAAAXH%2F%2FSA0%3D","updated":"2014-05-24 01:55:07.000000000","message":"Fixed in mech_agent.py and managers.py.","commit_id":"cbfc338cd8191527758a77020f7f6f559a4442d9"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"c1bb1e73fcb7e1a9d993776336552b02014c7ea7","unresolved":false,"context_lines":[{"line_number":593,"context_line":"        bind the port, it must call context.set_binding() with the"},{"line_number":594,"context_line":"        binding details. Binding results being committed will be seen"},{"line_number":595,"context_line":"        after bind_port() returns by all mechanism drivers as"},{"line_number":596,"context_line":"        update_port_precommit() and update_port_postcommit() calls."},{"line_number":597,"context_line":""},{"line_number":598,"context_line":"        Note that if some other thread or process asynchronously binds"},{"line_number":599,"context_line":"        or updates the port, these binding results will not be"}],"source_content_type":"text/x-python","patch_set":9,"id":"1ae5cdf2_7014ba9f","line":596,"updated":"2014-06-13 16:09:53.000000000","message":"the last sentence is not very clear for the general public (including me).\nThat is probably my problem, but I think it\u0027s worth trying to have a clearer explanation of when the results of bind_port operation should be committed to the database.","commit_id":"e92198585f22567c18466447b30be5ff220e5729"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"27d0f155318e999531821cfb914e7321ad2b89c2","unresolved":false,"context_lines":[{"line_number":593,"context_line":"        bind the port, it must call context.set_binding() with the"},{"line_number":594,"context_line":"        binding details. Binding results being committed will be seen"},{"line_number":595,"context_line":"        after bind_port() returns by all mechanism drivers as"},{"line_number":596,"context_line":"        update_port_precommit() and update_port_postcommit() calls."},{"line_number":597,"context_line":""},{"line_number":598,"context_line":"        Note that if some other thread or process asynchronously binds"},{"line_number":599,"context_line":"        or updates the port, these binding results will not be"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_1bfe0239","line":596,"in_reply_to":"1ae5cdf2_7014ba9f","updated":"2014-07-09 05:04:27.000000000","message":"Done","commit_id":"e92198585f22567c18466447b30be5ff220e5729"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"1a061ee5902f71097cd0dc4c69444f7ef32df727","unresolved":false,"context_lines":[{"line_number":603,"context_line":"        discarded rather than committed, drivers should avoid making"},{"line_number":604,"context_line":"        persistent state changes in bind_port(), or else must ensure"},{"line_number":605,"context_line":"        that such state changes are eventually cleaned up."},{"line_number":606,"context_line":""},{"line_number":607,"context_line":"        \"\"\""},{"line_number":608,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ae8d1ca_7b1358b8","line":606,"updated":"2014-05-28 17:36:41.000000000","message":"blank line not required. ignore if only change.","commit_id":"e92198585f22567c18466447b30be5ff220e5729"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"27d0f155318e999531821cfb914e7321ad2b89c2","unresolved":false,"context_lines":[{"line_number":603,"context_line":"        discarded rather than committed, drivers should avoid making"},{"line_number":604,"context_line":"        persistent state changes in bind_port(), or else must ensure"},{"line_number":605,"context_line":"        that such state changes are eventually cleaned up."},{"line_number":606,"context_line":""},{"line_number":607,"context_line":"        \"\"\""},{"line_number":608,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_3bfbc648","line":606,"in_reply_to":"3ae8d1ca_7b1358b8","updated":"2014-07-09 05:04:27.000000000","message":"Done","commit_id":"e92198585f22567c18466447b30be5ff220e5729"}],"neutron/plugins/ml2/drivers/cisco/nexus/mech_cisco_nexus.py":[{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"50cf662e53910341a69284467bd48791bcda94df","unresolved":false,"context_lines":[{"line_number":169,"context_line":"        # create a binding, so port actions must be processed when"},{"line_number":170,"context_line":"        # binding fails. Either the unit tests should include a"},{"line_number":171,"context_line":"        # mechanism driver (such as TestMechanismDriver) that binds,"},{"line_number":172,"context_line":"        # or they should mock something to similate a binding."},{"line_number":173,"context_line":"        #"},{"line_number":174,"context_line":"        # REVISIT(rkukura): Reconsider whether these states really are"},{"line_number":175,"context_line":"        # exceptions that should be returned to the client. Valid"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAXH%2F%2FSAU%3D","line":172,"updated":"2014-04-22 19:36:40.000000000","message":"We decided to create the latter test environment. Didn\u0027t want to add additional testing for a \"fake\" or \"test\" MD to the cisco test UT suite.","commit_id":"cbfc338cd8191527758a77020f7f6f559a4442d9"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"50cf662e53910341a69284467bd48791bcda94df","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        # REVISIT(rkukura): Reconsider whether these states really are"},{"line_number":175,"context_line":"        # exceptions that should be returned to the client. Valid"},{"line_number":176,"context_line":"        # bindings that do not involve a VLAN should probably be"},{"line_number":177,"context_line":"        # silently ignored by this driver."},{"line_number":178,"context_line":"        #"},{"line_number":179,"context_line":"        if port[portbindings.VIF_TYPE] !\u003d portbindings.VIF_TYPE_UNBOUND:"},{"line_number":180,"context_line":"            if vlan_id and device_id and host_id:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAXH%2F%2FR8Q%3D","line":177,"updated":"2014-04-22 19:36:40.000000000","message":"Until the general MD error handling/recovery gets solved, I think an MD should be able to raise an exception. I don\u0027t like having failures inside the cisco_nexus MD just being logged. A network admin specifically configured \"mechanim_drivers\u003d...cisco_nexus\" with the expectations that the nexus switch would be configured on certain neutron events. If the correct actions are not taken then I\u0027d think the admin would want to be aware of these failures (even if these end up being \"cock pit\" type errors).","commit_id":"cbfc338cd8191527758a77020f7f6f559a4442d9"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"ddec23416ae54c9406c6f9206c7613835f4d7c58","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        # REVISIT(rkukura): Reconsider whether these states really are"},{"line_number":175,"context_line":"        # exceptions that should be returned to the client. Valid"},{"line_number":176,"context_line":"        # bindings that do not involve a VLAN should probably be"},{"line_number":177,"context_line":"        # silently ignored by this driver."},{"line_number":178,"context_line":"        #"},{"line_number":179,"context_line":"        if port[portbindings.VIF_TYPE] !\u003d portbindings.VIF_TYPE_UNBOUND:"},{"line_number":180,"context_line":"            if vlan_id and device_id and host_id:"}],"source_content_type":"text/x-python","patch_set":8,"id":"7adec928_d9ad94ec","line":177,"in_reply_to":"AAAAXH%2F%2FR8Q%3D","updated":"2014-05-24 01:55:07.000000000","message":"I agree the MD should be able to raise an exception. One of the use cases for ML2 is to support heterogeneous deployments, so MDs should not assume every node is connected to devices they manage. Also, if vlan networks are used in the same deployment with vxlan or gre networks (or even flat networks), it seems MDs should configure the switch for vlan segments, but do nothing for vxlan or gre (or flat) segments. But this is not directly related to the bug this patch addresses, so I\u0027ve removed this REVISIT comment.","commit_id":"cbfc338cd8191527758a77020f7f6f559a4442d9"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"50cf662e53910341a69284467bd48791bcda94df","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        # bindings that do not involve a VLAN should probably be"},{"line_number":177,"context_line":"        # silently ignored by this driver."},{"line_number":178,"context_line":"        #"},{"line_number":179,"context_line":"        if port[portbindings.VIF_TYPE] !\u003d portbindings.VIF_TYPE_UNBOUND:"},{"line_number":180,"context_line":"            if vlan_id and device_id and host_id:"},{"line_number":181,"context_line":"                func(vlan_id, device_id, host_id)"},{"line_number":182,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAXH%2F%2FR6c%3D","line":179,"updated":"2014-04-22 19:36:40.000000000","message":"Do you want to commit this workaround and then have me make the permanent fix using a different bug? (I sent you a diff set that would eliminate this unnecessary conditional check a few weeks back. This did result in the cisco UT\u0027s changing more than what you have in this review. Didn\u0027t know if that was why you didn\u0027t update this review to contain the long term fix.)","commit_id":"cbfc338cd8191527758a77020f7f6f559a4442d9"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"ddec23416ae54c9406c6f9206c7613835f4d7c58","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        # bindings that do not involve a VLAN should probably be"},{"line_number":177,"context_line":"        # silently ignored by this driver."},{"line_number":178,"context_line":"        #"},{"line_number":179,"context_line":"        if port[portbindings.VIF_TYPE] !\u003d portbindings.VIF_TYPE_UNBOUND:"},{"line_number":180,"context_line":"            if vlan_id and device_id and host_id:"},{"line_number":181,"context_line":"                func(vlan_id, device_id, host_id)"},{"line_number":182,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"7adec928_59d139cc","line":179,"in_reply_to":"AAAAXH%2F%2FR6c%3D","updated":"2014-05-24 01:55:07.000000000","message":"I\u0027ve included the permanent fix from Rich.","commit_id":"cbfc338cd8191527758a77020f7f6f559a4442d9"}],"neutron/plugins/ml2/drivers/mech_bigswitch/driver.py":[{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"1a061ee5902f71097cd0dc4c69444f7ef32df727","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        # update port on the network controller"},{"line_number":85,"context_line":"        port \u003d self._prepare_port_for_controller(context)"},{"line_number":86,"context_line":"        if port:"},{"line_number":87,"context_line":"            # REVISIT(rkukura): This previously called"},{"line_number":88,"context_line":"            # rest_update_port(), which called rest_create_port(). But"},{"line_number":89,"context_line":"            # now that update_port_postcommit() is called during port"},{"line_number":90,"context_line":"            # creation when binding has been attempted, this is the"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ae8d1ca_bb9a4061","line":87,"updated":"2014-05-28 17:36:41.000000000","message":"What exactly do you want to REVISIT? Clear explanation of how this worked but do you think this is going to change?\nHopefully someone from bigswitch can comment and ignore if you\u0027ve already been in touch w/ the md owner.","commit_id":"e92198585f22567c18466447b30be5ff220e5729"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"1a52a2bed71a4b881011354b54f1a176dadc8b3a","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        # update port on the network controller"},{"line_number":85,"context_line":"        port \u003d self._prepare_port_for_controller(context)"},{"line_number":86,"context_line":"        if port:"},{"line_number":87,"context_line":"            # REVISIT(rkukura): This previously called"},{"line_number":88,"context_line":"            # rest_update_port(), which called rest_create_port(). But"},{"line_number":89,"context_line":"            # now that update_port_postcommit() is called during port"},{"line_number":90,"context_line":"            # creation when binding has been attempted, this is the"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ae8d1ca_e5f7c1f3","line":87,"in_reply_to":"3ae8d1ca_bb9a4061","updated":"2014-05-28 19:58:49.000000000","message":"This change is fine with me. You can remove the REVISIT.","commit_id":"e92198585f22567c18466447b30be5ff220e5729"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"27d0f155318e999531821cfb914e7321ad2b89c2","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        # update port on the network controller"},{"line_number":85,"context_line":"        port \u003d self._prepare_port_for_controller(context)"},{"line_number":86,"context_line":"        if port:"},{"line_number":87,"context_line":"            # REVISIT(rkukura): This previously called"},{"line_number":88,"context_line":"            # rest_update_port(), which called rest_create_port(). But"},{"line_number":89,"context_line":"            # now that update_port_postcommit() is called during port"},{"line_number":90,"context_line":"            # creation when binding has been attempted, this is the"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_9b085293","line":87,"in_reply_to":"3ae8d1ca_e5f7c1f3","updated":"2014-07-09 05:04:27.000000000","message":"Done","commit_id":"e92198585f22567c18466447b30be5ff220e5729"}],"neutron/plugins/ml2/managers.py":[{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"1a061ee5902f71097cd0dc4c69444f7ef32df727","unresolved":false,"context_lines":[{"line_number":441,"context_line":""},{"line_number":442,"context_line":"        Called outside any transaction to attempt to establish a port"},{"line_number":443,"context_line":"        binding."},{"line_number":444,"context_line":"        \"\"\""},{"line_number":445,"context_line":"        binding \u003d context._binding"},{"line_number":446,"context_line":"        LOG.debug(_(\"Attempting to bind port %(port)s on host %(host)s \""},{"line_number":447,"context_line":"                    \"for vnic_type %(vnic_type)s with profile %(profile)s\"),"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ae8d1ca_fb3f6823","line":444,"updated":"2014-05-28 17:36:41.000000000","message":"blank line above isn\u0027t needed. ignore if this is the only change.","commit_id":"e92198585f22567c18466447b30be5ff220e5729"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"27d0f155318e999531821cfb914e7321ad2b89c2","unresolved":false,"context_lines":[{"line_number":441,"context_line":""},{"line_number":442,"context_line":"        Called outside any transaction to attempt to establish a port"},{"line_number":443,"context_line":"        binding."},{"line_number":444,"context_line":"        \"\"\""},{"line_number":445,"context_line":"        binding \u003d context._binding"},{"line_number":446,"context_line":"        LOG.debug(_(\"Attempting to bind port %(port)s on host %(host)s \""},{"line_number":447,"context_line":"                    \"for vnic_type %(vnic_type)s with profile %(profile)s\"),"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_7bbb7e75","line":444,"in_reply_to":"3ae8d1ca_fb3f6823","updated":"2014-07-09 05:04:27.000000000","message":"Done","commit_id":"e92198585f22567c18466447b30be5ff220e5729"}],"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"da154ea47c94d29452fb65cb35b42d60eb2ae8dd","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        port_id \u003d orig_context._port[\u0027id\u0027]"},{"line_number":252,"context_line":"        network_id \u003d orig_context._port[\u0027network_id\u0027]"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"        while True:"},{"line_number":255,"context_line":"            orig_binding \u003d orig_context._binding"},{"line_number":256,"context_line":"            if (orig_binding.vif_type !\u003d portbindings.VIF_TYPE_UNBOUND"},{"line_number":257,"context_line":"                or not orig_binding.host):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F92Ho%3D","line":254,"updated":"2014-04-01 17:50:26.000000000","message":"Why is this not bounded?","commit_id":"eeb289ac0201e15f44ca5056181d1780c56ba40f"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"e3f0326444004fff4a859afc23f1a32a230e3963","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        port_id \u003d orig_context._port[\u0027id\u0027]"},{"line_number":252,"context_line":"        network_id \u003d orig_context._port[\u0027network_id\u0027]"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"        while True:"},{"line_number":255,"context_line":"            orig_binding \u003d orig_context._binding"},{"line_number":256,"context_line":"            if (orig_binding.vif_type !\u003d portbindings.VIF_TYPE_UNBOUND"},{"line_number":257,"context_line":"                or not orig_binding.host):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F9mQ0%3D","line":254,"in_reply_to":"AAAAWH%2F92Ao%3D","updated":"2014-04-03 13:40:59.000000000","message":"I am fine with these loops, but having a log every 10 or 100 times around is definitely a good idea for all of them.","commit_id":"eeb289ac0201e15f44ca5056181d1780c56ba40f"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"77678385cbc52965a74268b1ffb4aaf8e17be4e9","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        port_id \u003d orig_context._port[\u0027id\u0027]"},{"line_number":252,"context_line":"        network_id \u003d orig_context._port[\u0027network_id\u0027]"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"        while True:"},{"line_number":255,"context_line":"            orig_binding \u003d orig_context._binding"},{"line_number":256,"context_line":"            if (orig_binding.vif_type !\u003d portbindings.VIF_TYPE_UNBOUND"},{"line_number":257,"context_line":"                or not orig_binding.host):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F92Ao%3D","line":254,"in_reply_to":"AAAAWH%2F92Ho%3D","updated":"2014-04-01 18:43:16.000000000","message":"I could add a counter and fail if a limit is exceeded, but the only way this loop repeats more than once is if some other thread makes updates to the same port concurrently. Do we really want to bound that? If so, what\u0027s a good limit, and should it be configurable? Alternatively, we could log a warning each 10 or 100 times around, or something, so any infinite loop would be obvious.\n\nNote that there are already similar loops in delete_network() and delete_subnet(). Do we need to address those similarly?","commit_id":"eeb289ac0201e15f44ca5056181d1780c56ba40f"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"6ae3f32e960ecbf25333993df06a0f220989e1a0","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        port_id \u003d orig_context._port[\u0027id\u0027]"},{"line_number":252,"context_line":"        network_id \u003d orig_context._port[\u0027network_id\u0027]"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"        while True:"},{"line_number":255,"context_line":"            orig_binding \u003d orig_context._binding"},{"line_number":256,"context_line":"            if (orig_binding.vif_type !\u003d portbindings.VIF_TYPE_UNBOUND"},{"line_number":257,"context_line":"                or not orig_binding.host):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAW3%2F%2F%2FGs%3D","line":254,"in_reply_to":"AAAAWH%2F9mQ0%3D","updated":"2014-04-10 14:58:57.000000000","message":"I\u0027m adding a limit of 100 tries, which is way more than should ever be needed when things are operating normally. An error is logged if this limit is exceeded and the operation returns the unbound port. I\u0027m also having it log any binding attempt after the first at info level so admins can see if concurrent modifications are forcing retries. Normally, the 1st attempt will get committed, and nothing will be logged.","commit_id":"eeb289ac0201e15f44ca5056181d1780c56ba40f"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"3f48d25dd416aac7e8b83d3548d2990a46987792","unresolved":false,"context_lines":[{"line_number":823,"context_line":"            LOG.error(_(\"mechanism_manager.delete_port_postcommit failed\"))"},{"line_number":824,"context_line":"        self.notify_security_groups_member_updated(context, port)"},{"line_number":825,"context_line":""},{"line_number":826,"context_line":"    def get_port_context(self, plugin_context, port_id):"},{"line_number":827,"context_line":"        session \u003d plugin_context.session"},{"line_number":828,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":829,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F9kxs%3D","line":826,"updated":"2014-04-03 15:50:28.000000000","message":"I think renaming the method get_port_context_and_bind_if_needed or something like that would make more evident the fact that if the port is not bound, the code will try to bind it","commit_id":"eeb289ac0201e15f44ca5056181d1780c56ba40f"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"6ae3f32e960ecbf25333993df06a0f220989e1a0","unresolved":false,"context_lines":[{"line_number":823,"context_line":"            LOG.error(_(\"mechanism_manager.delete_port_postcommit failed\"))"},{"line_number":824,"context_line":"        self.notify_security_groups_member_updated(context, port)"},{"line_number":825,"context_line":""},{"line_number":826,"context_line":"    def get_port_context(self, plugin_context, port_id):"},{"line_number":827,"context_line":"        session \u003d plugin_context.session"},{"line_number":828,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":829,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAW3%2F%2F%2FGg%3D","line":826,"in_reply_to":"AAAAWH%2F9kxs%3D","updated":"2014-04-10 14:58:57.000000000","message":"I renamed it to get_bound_port_context().","commit_id":"eeb289ac0201e15f44ca5056181d1780c56ba40f"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"50cf662e53910341a69284467bd48791bcda94df","unresolved":false,"context_lines":[{"line_number":303,"context_line":"            # prevent deadlock waiting to acquire a DB lock held by"},{"line_number":304,"context_line":"            # another thread in the same process, leading to \u0027lock"},{"line_number":305,"context_line":"            # wait timeout\u0027 errors."},{"line_number":306,"context_line":"            with contextlib.nested(lockutils.lock(\u0027db-access\u0027),"},{"line_number":307,"context_line":"                                   session.begin(subtransactions\u003dTrue)):"},{"line_number":308,"context_line":"                # Get the current port state and build a new"},{"line_number":309,"context_line":"                # PortContext reflecting this state as original state"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAXH%2F%2FR4o%3D","line":306,"updated":"2014-04-22 19:36:40.000000000","message":"Hopefully you\u0027ll get more eyes on this module change since this is the crux of the review. Specifically engs that are familiar w/ the MD bind port requirements. (Kyle was one, hopefully you get more.)\nI\u0027m not really one of them. :-) However, you may want to consider moving some of the logic in this method to another internal method. This method is a bit on the long side.","commit_id":"cbfc338cd8191527758a77020f7f6f559a4442d9"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"ddec23416ae54c9406c6f9206c7613835f4d7c58","unresolved":false,"context_lines":[{"line_number":303,"context_line":"            # prevent deadlock waiting to acquire a DB lock held by"},{"line_number":304,"context_line":"            # another thread in the same process, leading to \u0027lock"},{"line_number":305,"context_line":"            # wait timeout\u0027 errors."},{"line_number":306,"context_line":"            with contextlib.nested(lockutils.lock(\u0027db-access\u0027),"},{"line_number":307,"context_line":"                                   session.begin(subtransactions\u003dTrue)):"},{"line_number":308,"context_line":"                # Get the current port state and build a new"},{"line_number":309,"context_line":"                # PortContext reflecting this state as original state"}],"source_content_type":"text/x-python","patch_set":8,"id":"7adec928_5987c412","line":306,"in_reply_to":"AAAAXH%2F%2FR4o%3D","updated":"2014-05-24 01:55:07.000000000","message":"I split out a separate method called _commit_port_binding(). I think that helps make the control flow in _bind_port_if_needed() more obvious.","commit_id":"cbfc338cd8191527758a77020f7f6f559a4442d9"},{"author":{"_account_id":2888,"name":"Mathieu Rohon","email":"mathieu.rohon@gmail.com","username":"mathieu-rohon"},"change_message_id":"63e8021b4181bda8a701a1a7ae2d40e163046eb2","unresolved":false,"context_lines":[{"line_number":901,"context_line":"            try:"},{"line_number":902,"context_line":"                port_db \u003d (session.query(models_v2.Port)."},{"line_number":903,"context_line":"                           enable_eagerloads(False)."},{"line_number":904,"context_line":"                           filter_by(id\u003dport_id).one())"},{"line_number":905,"context_line":"            except sa_exc.NoResultFound:"},{"line_number":906,"context_line":"                return"},{"line_number":907,"context_line":"            port \u003d self._make_port_dict(port_db)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAXX%2F%2F44I%3D","line":904,"updated":"2014-04-25 14:37:15.000000000","message":"please use filter(models_v2.Port.id.startswith(port_id)).one()) to be compatible with linuxbridge agent","commit_id":"cbfc338cd8191527758a77020f7f6f559a4442d9"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"ddec23416ae54c9406c6f9206c7613835f4d7c58","unresolved":false,"context_lines":[{"line_number":901,"context_line":"            try:"},{"line_number":902,"context_line":"                port_db \u003d (session.query(models_v2.Port)."},{"line_number":903,"context_line":"                           enable_eagerloads(False)."},{"line_number":904,"context_line":"                           filter_by(id\u003dport_id).one())"},{"line_number":905,"context_line":"            except sa_exc.NoResultFound:"},{"line_number":906,"context_line":"                return"},{"line_number":907,"context_line":"            port \u003d self._make_port_dict(port_db)"}],"source_content_type":"text/x-python","patch_set":8,"id":"7adec928_9d9e5cb7","line":904,"in_reply_to":"AAAAXX%2F%2F44I%3D","updated":"2014-05-24 01:55:07.000000000","message":"Done","commit_id":"cbfc338cd8191527758a77020f7f6f559a4442d9"},{"author":{"_account_id":10310,"name":"Mandeep Dhami","email":"dhami@noironetworks.com","username":"mandeepdhami"},"change_message_id":"e33a49979f75b1bcf215558edb87c1d0d475484e","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"MAX_BIND_TRIES \u003d 100"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"# REVISIT(rkukura): Move this and other network_type constants to"},{"line_number":63,"context_line":"# providernet.py?"}],"source_content_type":"text/x-python","patch_set":9,"id":"5adbc538_86cf30b0","line":60,"updated":"2014-05-24 02:26:08.000000000","message":"As currently used, it should not be needed for more than a few attempts at rebind (say 2 or 3). Once you have reached any number higher than single digits, it is probably an error and this is only causing info logs to grow. I\u0027d recommend a smaller number (\u003c\u003d 10). I agree that it is a magic number, but I think for the context of this usage, it is probably OK.","commit_id":"e92198585f22567c18466447b30be5ff220e5729"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"27d0f155318e999531821cfb914e7321ad2b89c2","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"MAX_BIND_TRIES \u003d 100"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"# REVISIT(rkukura): Move this and other network_type constants to"},{"line_number":63,"context_line":"# providernet.py?"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_3b80268b","line":60,"in_reply_to":"5adbc538_0c033f10","updated":"2014-07-09 05:04:27.000000000","message":"OK, I changed the value to 10. But I\u0027m leaving the log at INFO level to make sure its obvious if deployments get anywhere near to hitting this limit.","commit_id":"e92198585f22567c18466447b30be5ff220e5729"},{"author":{"_account_id":10310,"name":"Mandeep Dhami","email":"dhami@noironetworks.com","username":"mandeepdhami"},"change_message_id":"fba1be1b7d99d1f3e79f8216d8e2b1fd3832d570","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"MAX_BIND_TRIES \u003d 100"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"# REVISIT(rkukura): Move this and other network_type constants to"},{"line_number":63,"context_line":"# providernet.py?"}],"source_content_type":"text/x-python","patch_set":9,"id":"5adbc538_0c033f10","line":60,"in_reply_to":"5adbc538_4cd8e753","updated":"2014-05-24 16:26:03.000000000","message":"I am not comfortable adding delay to the bind operation, I prefer the \"spinlock like\" model. If you do add a delay, I don\u0027t think it will help in reducing the probability of this conflict unless the delay is random.","commit_id":"e92198585f22567c18466447b30be5ff220e5729"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"d2e8c3785886c63dfb4c3d1753f411092c0bbec8","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"MAX_BIND_TRIES \u003d 100"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"# REVISIT(rkukura): Move this and other network_type constants to"},{"line_number":63,"context_line":"# providernet.py?"}],"source_content_type":"text/x-python","patch_set":9,"id":"5adbc538_4cd8e753","line":60,"in_reply_to":"5adbc538_86cf30b0","updated":"2014-05-24 12:39:13.000000000","message":"This was originally a potentially-infinite loop, but the limit and the logging were added based on earlier review input. As you say, no more than 2 or 3 attempts should ever occur in practice. But if we set a limit that low, we are potentially causing failures that wouldn\u0027t occur if the limit were slightly higher, and then we need to make the limit tunable. The intent with 100 was to avoid any need to add a new config variable, but eliminate the potentially-infinite loop. I\u0027d be comfortable with something like 20, but don\u0027t really think this is worth changing. If we do change to a smaller limit, should we add a delay in the loop to reduce the risk of two threads battling each other until the limit is hit?","commit_id":"e92198585f22567c18466447b30be5ff220e5729"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"c1bb1e73fcb7e1a9d993776336552b02014c7ea7","unresolved":false,"context_lines":[{"line_number":226,"context_line":"            binding.vnic_type \u003d vnic_type"},{"line_number":227,"context_line":"            changes \u003d True"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"        # CLI can\u0027t send {}, so treat None as {}."},{"line_number":230,"context_line":"        profile \u003d attrs and attrs.get(portbindings.PROFILE) or {}"},{"line_number":231,"context_line":"        if (profile is not attributes.ATTR_NOT_SPECIFIED and"},{"line_number":232,"context_line":"            self._get_profile(binding) !\u003d profile):"}],"source_content_type":"text/x-python","patch_set":9,"id":"1ae5cdf2_10fff634","line":229,"updated":"2014-06-13 16:09:53.000000000","message":"agreed on treating none as {} but surely the server should not be dependent on the CLI...","commit_id":"e92198585f22567c18466447b30be5ff220e5729"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"27d0f155318e999531821cfb914e7321ad2b89c2","unresolved":false,"context_lines":[{"line_number":226,"context_line":"            binding.vnic_type \u003d vnic_type"},{"line_number":227,"context_line":"            changes \u003d True"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"        # CLI can\u0027t send {}, so treat None as {}."},{"line_number":230,"context_line":"        profile \u003d attrs and attrs.get(portbindings.PROFILE) or {}"},{"line_number":231,"context_line":"        if (profile is not attributes.ATTR_NOT_SPECIFIED and"},{"line_number":232,"context_line":"            self._get_profile(binding) !\u003d profile):"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_a7e17fd2","line":229,"in_reply_to":"1ae5cdf2_10fff634","updated":"2014-07-09 05:04:27.000000000","message":"This comment isn\u0027t new in this patch, just moved from line 221. Are you sure you want me to remove it in this patch?","commit_id":"e92198585f22567c18466447b30be5ff220e5729"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"c1bb1e73fcb7e1a9d993776336552b02014c7ea7","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        # CLI can\u0027t send {}, so treat None as {}."},{"line_number":230,"context_line":"        profile \u003d attrs and attrs.get(portbindings.PROFILE) or {}"},{"line_number":231,"context_line":"        if (profile is not attributes.ATTR_NOT_SPECIFIED and"},{"line_number":232,"context_line":"            self._get_profile(binding) !\u003d profile):"},{"line_number":233,"context_line":"            binding.profile \u003d jsonutils.dumps(profile)"},{"line_number":234,"context_line":"            if len(binding.profile) \u003e models.BINDING_PROFILE_LEN:"},{"line_number":235,"context_line":"                msg \u003d _(\"binding:profile value too large\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"1ae5cdf2_906866f6","line":232,"updated":"2014-06-13 16:09:53.000000000","message":"Here we have a slight change in the method logic, I guess aimed at avoiding unnecessary bindings.\n\nThe \u0027profile\u0027 is a composite attribute - how does the port binding extension behave wrt patch semantics? If the semantics for an update are PATCH then the API request might specify only a subset of profile attributes. This will make this check true, even if the values specified are exactly the same as those stored in the db.\n\nAlso - if changes is already true perhaps we don\u0027t need this check? (unless one needs to perform the LEN check as well anytime.","commit_id":"e92198585f22567c18466447b30be5ff220e5729"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"27d0f155318e999531821cfb914e7321ad2b89c2","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        # CLI can\u0027t send {}, so treat None as {}."},{"line_number":230,"context_line":"        profile \u003d attrs and attrs.get(portbindings.PROFILE) or {}"},{"line_number":231,"context_line":"        if (profile is not attributes.ATTR_NOT_SPECIFIED and"},{"line_number":232,"context_line":"            self._get_profile(binding) !\u003d profile):"},{"line_number":233,"context_line":"            binding.profile \u003d jsonutils.dumps(profile)"},{"line_number":234,"context_line":"            if len(binding.profile) \u003e models.BINDING_PROFILE_LEN:"},{"line_number":235,"context_line":"                msg \u003d _(\"binding:profile value too large\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_c79e7307","line":232,"in_reply_to":"1ae5cdf2_906866f6","updated":"2014-07-09 05:04:27.000000000","message":"Updates to this attribute replace the entire value, at least in the ML2 plugin. If patch semantics are documented for this attribute, then a separate ML2 bug should be filed. I don\u0027t think this patch changes the behavior with regard to updates to this attribute triggering rebinding. The entire new value is compared with the entire old value.","commit_id":"e92198585f22567c18466447b30be5ff220e5729"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"c1bb1e73fcb7e1a9d993776336552b02014c7ea7","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        # thread commits its results, the already commited results are"},{"line_number":260,"context_line":"        # used.  If attributes such as binding:host_id,"},{"line_number":261,"context_line":"        # binding:profile, or binding:vnic_type are updated"},{"line_number":262,"context_line":"        # asynchronously, this loop retries binding using the new"},{"line_number":263,"context_line":"        # values."},{"line_number":264,"context_line":"        count \u003d 0"},{"line_number":265,"context_line":"        while True:"}],"source_content_type":"text/x-python","patch_set":9,"id":"1ae5cdf2_bb5543fb","line":262,"updated":"2014-06-13 16:09:53.000000000","message":"pedant me says it should be concurrently, but maybe just ignore this comment.","commit_id":"e92198585f22567c18466447b30be5ff220e5729"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"27d0f155318e999531821cfb914e7321ad2b89c2","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        # thread commits its results, the already commited results are"},{"line_number":260,"context_line":"        # used.  If attributes such as binding:host_id,"},{"line_number":261,"context_line":"        # binding:profile, or binding:vnic_type are updated"},{"line_number":262,"context_line":"        # asynchronously, this loop retries binding using the new"},{"line_number":263,"context_line":"        # values."},{"line_number":264,"context_line":"        count \u003d 0"},{"line_number":265,"context_line":"        while True:"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_76fe3307","line":262,"in_reply_to":"1ae5cdf2_bb5543fb","updated":"2014-07-09 05:04:27.000000000","message":"Done","commit_id":"e92198585f22567c18466447b30be5ff220e5729"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"c1bb1e73fcb7e1a9d993776336552b02014c7ea7","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                # We either don\u0027t need to bind the port, or can\u0027t, so"},{"line_number":272,"context_line":"                # notify if needed and return."},{"line_number":273,"context_line":"                if allow_notify and need_notify:"},{"line_number":274,"context_line":"                    self._notify_port_updated(context)"},{"line_number":275,"context_line":"                return context"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"            # Limit binding attempts to avoid any possibility of"}],"source_content_type":"text/x-python","patch_set":9,"id":"1ae5cdf2_9b87a760","line":274,"updated":"2014-06-13 16:09:53.000000000","message":"If a user passes need_notify\u003dTrue to this function this will notify at every attempt. Is this by design?\n\nSome drivers probably do not react to notifications in an idempotent fashion, so this might be something to worry about.","commit_id":"e92198585f22567c18466447b30be5ff220e5729"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"27d0f155318e999531821cfb914e7321ad2b89c2","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                # We either don\u0027t need to bind the port, or can\u0027t, so"},{"line_number":272,"context_line":"                # notify if needed and return."},{"line_number":273,"context_line":"                if allow_notify and need_notify:"},{"line_number":274,"context_line":"                    self._notify_port_updated(context)"},{"line_number":275,"context_line":"                return context"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"            # Limit binding attempts to avoid any possibility of"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_275acf50","line":274,"in_reply_to":"1ae5cdf2_9b87a760","updated":"2014-07-09 05:04:27.000000000","message":"Actually, the notification only occurs after we\u0027ve finished binding. Notice the return on the next line.","commit_id":"e92198585f22567c18466447b30be5ff220e5729"},{"author":{"_account_id":10310,"name":"Mandeep Dhami","email":"dhami@noironetworks.com","username":"mandeepdhami"},"change_message_id":"e33a49979f75b1bcf215558edb87c1d0d475484e","unresolved":false,"context_lines":[{"line_number":287,"context_line":"                return context"},{"line_number":288,"context_line":"            if count \u003e 1:"},{"line_number":289,"context_line":"                LOG.info(_(\"Attempt %(count) to bind port %(port)\"),"},{"line_number":290,"context_line":"                         {\u0027port\u0027: port_id, \u0027count\u0027: count})"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"            # The port isn\u0027t already bound and the necessary"},{"line_number":293,"context_line":"            # information is available, so attempt to bind the port."}],"source_content_type":"text/x-python","patch_set":9,"id":"5adbc538_66ca24a3","line":290,"updated":"2014-05-24 02:26:08.000000000","message":"I am not sure that this is an INFO level notification. I do not know about the neutron guidelines about this, but in past I have used INFO level only for events of interest to the end-user. This is purely internal to deal with multiple writers, so this is a debug log. It is expected to happen once in a while, and the user does not have to care about it.","commit_id":"e92198585f22567c18466447b30be5ff220e5729"},{"author":{"_account_id":6558,"name":"Sukhdev Kapur","email":"sukhdevkapur@gmail.com","username":"sukhdev-8"},"change_message_id":"c35ceee9b3ed161d410a3394f6733c05c8a2ccf2","unresolved":false,"context_lines":[{"line_number":287,"context_line":"                return context"},{"line_number":288,"context_line":"            if count \u003e 1:"},{"line_number":289,"context_line":"                LOG.info(_(\"Attempt %(count) to bind port %(port)\"),"},{"line_number":290,"context_line":"                         {\u0027port\u0027: port_id, \u0027count\u0027: count})"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"            # The port isn\u0027t already bound and the necessary"},{"line_number":293,"context_line":"            # information is available, so attempt to bind the port."}],"source_content_type":"text/x-python","patch_set":9,"id":"5adbc538_919e8c55","line":290,"in_reply_to":"5adbc538_66ca24a3","updated":"2014-05-24 07:33:16.000000000","message":"I am not sure what the concern is. Are you suggesting not to log this event at all?  or are you suggesting the log level should be different? I think it is appropriate to log.","commit_id":"e92198585f22567c18466447b30be5ff220e5729"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"27d0f155318e999531821cfb914e7321ad2b89c2","unresolved":false,"context_lines":[{"line_number":287,"context_line":"                return context"},{"line_number":288,"context_line":"            if count \u003e 1:"},{"line_number":289,"context_line":"                LOG.info(_(\"Attempt %(count) to bind port %(port)\"),"},{"line_number":290,"context_line":"                         {\u0027port\u0027: port_id, \u0027count\u0027: count})"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"            # The port isn\u0027t already bound and the necessary"},{"line_number":293,"context_line":"            # information is available, so attempt to bind the port."}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_762553ad","line":290,"in_reply_to":"5adbc538_6cfe836d","updated":"2014-07-09 05:04:27.000000000","message":"Given that I\u0027ve reduced MAX_BIND_TRIES to 10, I\u0027m leaving this at INFO level.","commit_id":"e92198585f22567c18466447b30be5ff220e5729"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"d2e8c3785886c63dfb4c3d1753f411092c0bbec8","unresolved":false,"context_lines":[{"line_number":287,"context_line":"                return context"},{"line_number":288,"context_line":"            if count \u003e 1:"},{"line_number":289,"context_line":"                LOG.info(_(\"Attempt %(count) to bind port %(port)\"),"},{"line_number":290,"context_line":"                         {\u0027port\u0027: port_id, \u0027count\u0027: count})"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"            # The port isn\u0027t already bound and the necessary"},{"line_number":293,"context_line":"            # information is available, so attempt to bind the port."}],"source_content_type":"text/x-python","patch_set":9,"id":"5adbc538_ec19b323","line":290,"in_reply_to":"5adbc538_919e8c55","updated":"2014-05-24 12:39:13.000000000","message":"Logging is for operators to be able diagnose problems as well as assess whether their systems are behaving as expected. Occasional retries are expected, but significant numbers of them would indicate something is going wrong or there is some usage pattern that wasn\u0027t anticipated. I want to make sure operators do notice if multiple tries become a regular occurrence, and was actually debating between info and warning levels. If we used debug level, operators would never notice because debug level is way too verbose for regular use. I think info level is a good compromise, and won\u0027t generate too much verbosity relative to what is already logged by default.","commit_id":"e92198585f22567c18466447b30be5ff220e5729"},{"author":{"_account_id":10310,"name":"Mandeep Dhami","email":"dhami@noironetworks.com","username":"mandeepdhami"},"change_message_id":"81d3865dd738a11da92495888d7ba3bdbf26d132","unresolved":false,"context_lines":[{"line_number":287,"context_line":"                return context"},{"line_number":288,"context_line":"            if count \u003e 1:"},{"line_number":289,"context_line":"                LOG.info(_(\"Attempt %(count) to bind port %(port)\"),"},{"line_number":290,"context_line":"                         {\u0027port\u0027: port_id, \u0027count\u0027: count})"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"            # The port isn\u0027t already bound and the necessary"},{"line_number":293,"context_line":"            # information is available, so attempt to bind the port."}],"source_content_type":"text/x-python","patch_set":9,"id":"5adbc538_6cfe836d","line":290,"in_reply_to":"5adbc538_919e8c55","updated":"2014-05-24 14:18:30.000000000","message":"My preference would have been to log this at DEBUG level, and if we reach some limit, then log at WARNING level. But if based on author\u0027s response, I am OK with it.","commit_id":"e92198585f22567c18466447b30be5ff220e5729"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"c1bb1e73fcb7e1a9d993776336552b02014c7ea7","unresolved":false,"context_lines":[{"line_number":368,"context_line":"                        portbindings.VIF_TYPE_BINDING_FAILED]) and"},{"line_number":369,"context_line":"                      orig_binding.host \u003d\u003d cur_binding.host and"},{"line_number":370,"context_line":"                      orig_binding.vnic_type \u003d\u003d cur_binding.vnic_type and"},{"line_number":371,"context_line":"                      orig_binding.profile \u003d\u003d cur_binding.profile)"},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"            if commit:"},{"line_number":374,"context_line":"                # Update the port\u0027s binding state with our binding"}],"source_content_type":"text/x-python","patch_set":9,"id":"1ae5cdf2_9bbfa7cf","line":371,"updated":"2014-06-13 16:09:53.000000000","message":"I have a very ignorant question.\nIf the port was bound concurrently, then we decided to not commit the results of this binding operation. This method will return to the caller with commit\u003dFalse, and an updated context which will tell the caller to exit the binding loop.\n\nThis is totally fine to me, but beyond a deadlock among several processes trying to do the same operation at the same time, what would be the need for a retry?","commit_id":"e92198585f22567c18466447b30be5ff220e5729"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"27d0f155318e999531821cfb914e7321ad2b89c2","unresolved":false,"context_lines":[{"line_number":368,"context_line":"                        portbindings.VIF_TYPE_BINDING_FAILED]) and"},{"line_number":369,"context_line":"                      orig_binding.host \u003d\u003d cur_binding.host and"},{"line_number":370,"context_line":"                      orig_binding.vnic_type \u003d\u003d cur_binding.vnic_type and"},{"line_number":371,"context_line":"                      orig_binding.profile \u003d\u003d cur_binding.profile)"},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"            if commit:"},{"line_number":374,"context_line":"                # Update the port\u0027s binding state with our binding"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_8afe4204","line":371,"in_reply_to":"1ae5cdf2_9bbfa7cf","updated":"2014-07-09 05:04:27.000000000","message":"In the case where a valid binding has been committed concurrently by some other thread/process, the results of that binding are used by this thread. We don\u0027t retry in that case, we just exit the loop.\n\nWe would need to retry if the binding input attributes have changed.","commit_id":"e92198585f22567c18466447b30be5ff220e5729"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"c1bb1e73fcb7e1a9d993776336552b02014c7ea7","unresolved":false,"context_lines":[{"line_number":823,"context_line":"        # REVISIT: Serialize this operation with a semaphore to"},{"line_number":824,"context_line":"        # prevent deadlock waiting to acquire a DB lock held by"},{"line_number":825,"context_line":"        # another thread in the same process, leading to \u0027lock wait"},{"line_number":826,"context_line":"        # timeout\u0027 errors."},{"line_number":827,"context_line":"        with contextlib.nested(lockutils.lock(\u0027db-access\u0027),"},{"line_number":828,"context_line":"                               session.begin(subtransactions\u003dTrue)):"},{"line_number":829,"context_line":"            port_db, binding \u003d db.get_locked_port_and_binding(session, id)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1ae5cdf2_9b040716","line":826,"updated":"2014-06-13 16:09:53.000000000","message":"In which way would would like to serialize it? You\u0027re already using the db-access lock - that makes it serialized, I think, doesn\u0027t it?","commit_id":"e92198585f22567c18466447b30be5ff220e5729"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"27d0f155318e999531821cfb914e7321ad2b89c2","unresolved":false,"context_lines":[{"line_number":823,"context_line":"        # REVISIT: Serialize this operation with a semaphore to"},{"line_number":824,"context_line":"        # prevent deadlock waiting to acquire a DB lock held by"},{"line_number":825,"context_line":"        # another thread in the same process, leading to \u0027lock wait"},{"line_number":826,"context_line":"        # timeout\u0027 errors."},{"line_number":827,"context_line":"        with contextlib.nested(lockutils.lock(\u0027db-access\u0027),"},{"line_number":828,"context_line":"                               session.begin(subtransactions\u003dTrue)):"},{"line_number":829,"context_line":"            port_db, binding \u003d db.get_locked_port_and_binding(session, id)"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_ca6d9ace","line":826,"in_reply_to":"1ae5cdf2_9b040716","updated":"2014-07-09 05:04:27.000000000","message":"This is just the boiler plate comment used for all of these db-access locks. Personally, I\u0027d like to revisit/eliminate all of them using an optimistic+retry approach instead.\n\nFor now, do you want me to remove \"REVISIT: \" from all of these comments?","commit_id":"e92198585f22567c18466447b30be5ff220e5729"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"1a061ee5902f71097cd0dc4c69444f7ef32df727","unresolved":false,"context_lines":[{"line_number":934,"context_line":"        try:"},{"line_number":935,"context_line":"            return self._bind_port_if_needed(port_context)"},{"line_number":936,"context_line":"        except ml2_exc.MechanismDriverError:"},{"line_number":937,"context_line":"            return None"},{"line_number":938,"context_line":""},{"line_number":939,"context_line":"    def update_port_status(self, context, port_id, status):"},{"line_number":940,"context_line":"        updated \u003d False"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ae8d1ca_bb6ec0ff","line":937,"updated":"2014-05-28 17:36:41.000000000","message":"I take it there is no need for a LOG.xxx message here? i.e. calling function will LOG enough info on error conditions.","commit_id":"e92198585f22567c18466447b30be5ff220e5729"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"27d0f155318e999531821cfb914e7321ad2b89c2","unresolved":false,"context_lines":[{"line_number":934,"context_line":"        try:"},{"line_number":935,"context_line":"            return self._bind_port_if_needed(port_context)"},{"line_number":936,"context_line":"        except ml2_exc.MechanismDriverError:"},{"line_number":937,"context_line":"            return None"},{"line_number":938,"context_line":""},{"line_number":939,"context_line":"    def update_port_status(self, context, port_id, status):"},{"line_number":940,"context_line":"        updated \u003d False"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_f6c24385","line":937,"in_reply_to":"3ae8d1ca_bb6ec0ff","updated":"2014-07-09 05:04:27.000000000","message":"No need to even catch the exception since MechanismManager.bind_port() catches and logs any exception raised by an MD, so I\u0027ve removed the try/except.","commit_id":"e92198585f22567c18466447b30be5ff220e5729"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"48c7934e5452e0abbbe891d00dec3541bb80c004","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"MAX_BIND_TRIES \u003d 10"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"# REVISIT(rkukura): Move this and other network_type constants to"},{"line_number":64,"context_line":"# providernet.py?"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_6b452916","line":61,"updated":"2014-07-10 16:40:17.000000000","message":"this number is too high in my opinion","commit_id":"8fec5f06619a7c883e45660e6c34d83826c863a6"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"bed7c026881875edca9ef2ede41112d826ac2d71","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"MAX_BIND_TRIES \u003d 10"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"# REVISIT(rkukura): Move this and other network_type constants to"},{"line_number":64,"context_line":"# providernet.py?"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_7c981f75","line":61,"in_reply_to":"baada198_21186dd2","updated":"2014-07-14 19:13:28.000000000","message":"The referenced constant is similar, but the situations resulting in binding retries are not just DB-related, so I don\u0027t think we should share a constant.","commit_id":"8fec5f06619a7c883e45660e6c34d83826c863a6"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"af2cc509906918acf3faae4f6899c9b028c0491d","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"MAX_BIND_TRIES \u003d 10"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"# REVISIT(rkukura): Move this and other network_type constants to"},{"line_number":64,"context_line":"# providernet.py?"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_ebeae00d","line":61,"in_reply_to":"baada198_6b452916","updated":"2014-07-11 20:19:00.000000000","message":"It was 100 in the previous version, and I was convinced to reduce it to 10. But I really don\u0027t want to see unnecessary failures introduced by too small a value. I also don\u0027t want to have to make this configurable. Are you OK if we stick with 10 initially, and then, ideally, see from logs if more than 1 or 2 tries are ever needed in real deployments? A high limit here is not really hurting anything if things work as expected.","commit_id":"8fec5f06619a7c883e45660e6c34d83826c863a6"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"ad27eedf2bc0701ab40726576055c215f6acca65","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"MAX_BIND_TRIES \u003d 10"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"# REVISIT(rkukura): Move this and other network_type constants to"},{"line_number":64,"context_line":"# providernet.py?"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_21186dd2","line":61,"in_reply_to":"baada198_ebeae00d","updated":"2014-07-12 20:50:20.000000000","message":"@Armando,  in nova, the same constant is defined and equals to 30.\n\n[1] defines quite the same constant perhaps we should define a unique one?\n\n[1] https://review.openstack.org/#/c/71904/21/neutron/plugins/ml2/drivers/helpers.py","commit_id":"8fec5f06619a7c883e45660e6c34d83826c863a6"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"48c7934e5452e0abbbe891d00dec3541bb80c004","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        # concurrently, this loop retries binding using the new"},{"line_number":264,"context_line":"        # values."},{"line_number":265,"context_line":"        count \u003d 0"},{"line_number":266,"context_line":"        while True:"},{"line_number":267,"context_line":"            # First, determine whether it is necessary and possible to"},{"line_number":268,"context_line":"            # bind the port."},{"line_number":269,"context_line":"            binding \u003d context._binding"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_2b3b319d","line":266,"updated":"2014-07-10 16:40:17.000000000","message":"do we want to yield between failed attempts?","commit_id":"8fec5f06619a7c883e45660e6c34d83826c863a6"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"bed7c026881875edca9ef2ede41112d826ac2d71","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        # concurrently, this loop retries binding using the new"},{"line_number":264,"context_line":"        # values."},{"line_number":265,"context_line":"        count \u003d 0"},{"line_number":266,"context_line":"        while True:"},{"line_number":267,"context_line":"            # First, determine whether it is necessary and possible to"},{"line_number":268,"context_line":"            # bind the port."},{"line_number":269,"context_line":"            binding \u003d context._binding"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_7cb73f21","line":266,"in_reply_to":"baada198_2b24d85e","updated":"2014-07-14 19:13:28.000000000","message":"Done - I put the greenthread.sleep(0) at line 290 so we only sleep after the first attempt to bind.","commit_id":"8fec5f06619a7c883e45660e6c34d83826c863a6"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"af2cc509906918acf3faae4f6899c9b028c0491d","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        # concurrently, this loop retries binding using the new"},{"line_number":264,"context_line":"        # values."},{"line_number":265,"context_line":"        count \u003d 0"},{"line_number":266,"context_line":"        while True:"},{"line_number":267,"context_line":"            # First, determine whether it is necessary and possible to"},{"line_number":268,"context_line":"            # bind the port."},{"line_number":269,"context_line":"            binding \u003d context._binding"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_2b24d85e","line":266,"in_reply_to":"baada198_2b3b319d","updated":"2014-07-11 20:19:00.000000000","message":"I\u0027ll look into this. I had considered sleeps previously, but a yield might be worthwhile.","commit_id":"8fec5f06619a7c883e45660e6c34d83826c863a6"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"48c7934e5452e0abbbe891d00dec3541bb80c004","unresolved":false,"context_lines":[{"line_number":287,"context_line":"                          {\u0027port\u0027: port_id, \u0027max\u0027: MAX_BIND_TRIES})"},{"line_number":288,"context_line":"                return context"},{"line_number":289,"context_line":"            if count \u003e 1:"},{"line_number":290,"context_line":"                LOG.info(_(\"Attempt %(count) to bind port %(port)\"),"},{"line_number":291,"context_line":"                         {\u0027port\u0027: port_id, \u0027count\u0027: count})"},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"            # The port isn\u0027t already bound and the necessary"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_cb1ab516","line":290,"updated":"2014-07-10 16:40:17.000000000","message":"oops bad formatting","commit_id":"8fec5f06619a7c883e45660e6c34d83826c863a6"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"ad27eedf2bc0701ab40726576055c215f6acca65","unresolved":false,"context_lines":[{"line_number":287,"context_line":"                          {\u0027port\u0027: port_id, \u0027max\u0027: MAX_BIND_TRIES})"},{"line_number":288,"context_line":"                return context"},{"line_number":289,"context_line":"            if count \u003e 1:"},{"line_number":290,"context_line":"                LOG.info(_(\"Attempt %(count) to bind port %(port)\"),"},{"line_number":291,"context_line":"                         {\u0027port\u0027: port_id, \u0027count\u0027: count})"},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"            # The port isn\u0027t already bound and the necessary"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_4109e182","line":290,"in_reply_to":"baada198_2b0db8e8","updated":"2014-07-12 20:50:20.000000000","message":"* %(count) \u003d\u003d\u003e %(count)s\n* %(port) \u003d\u003d\u003e %(port)s","commit_id":"8fec5f06619a7c883e45660e6c34d83826c863a6"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"bed7c026881875edca9ef2ede41112d826ac2d71","unresolved":false,"context_lines":[{"line_number":287,"context_line":"                          {\u0027port\u0027: port_id, \u0027max\u0027: MAX_BIND_TRIES})"},{"line_number":288,"context_line":"                return context"},{"line_number":289,"context_line":"            if count \u003e 1:"},{"line_number":290,"context_line":"                LOG.info(_(\"Attempt %(count) to bind port %(port)\"),"},{"line_number":291,"context_line":"                         {\u0027port\u0027: port_id, \u0027count\u0027: count})"},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"            # The port isn\u0027t already bound and the necessary"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_1c22c351","line":290,"in_reply_to":"baada198_4109e182","updated":"2014-07-14 19:13:28.000000000","message":"Done","commit_id":"8fec5f06619a7c883e45660e6c34d83826c863a6"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"af2cc509906918acf3faae4f6899c9b028c0491d","unresolved":false,"context_lines":[{"line_number":287,"context_line":"                          {\u0027port\u0027: port_id, \u0027max\u0027: MAX_BIND_TRIES})"},{"line_number":288,"context_line":"                return context"},{"line_number":289,"context_line":"            if count \u003e 1:"},{"line_number":290,"context_line":"                LOG.info(_(\"Attempt %(count) to bind port %(port)\"),"},{"line_number":291,"context_line":"                         {\u0027port\u0027: port_id, \u0027count\u0027: count})"},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"            # The port isn\u0027t already bound and the necessary"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_2b0db8e8","line":290,"in_reply_to":"baada198_cb1ab516","updated":"2014-07-11 20:19:00.000000000","message":"I don\u0027t see the issue. What am I missing?","commit_id":"8fec5f06619a7c883e45660e6c34d83826c863a6"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"5e764d6e7d37b8c366853cbdf3c8ce47adb62d8d","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"MAX_BIND_TRIES \u003d 10"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"# REVISIT(rkukura): Move this and other network_type constants to"},{"line_number":66,"context_line":"# providernet.py?"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_39305255","line":63,"updated":"2014-07-15 15:03:02.000000000","message":"would it be an option to have this as a configuration variable or is than an overkill?","commit_id":"b1677dcb80ce8b83aadb2180efad3527a96bd3bc"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"f4b892f4201f52fa71638eda1edd89e5ffbe26dc","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"MAX_BIND_TRIES \u003d 10"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"# REVISIT(rkukura): Move this and other network_type constants to"},{"line_number":66,"context_line":"# providernet.py?"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_4a7a8677","line":63,"in_reply_to":"baada198_39305255","updated":"2014-07-15 15:47:18.000000000","message":"This value has been discussed for a while, and I\u0027ve maintained that making it configurable would be overkill. Normal operation should never need more than a couple tries, and having too many really does not hurt anything. I\u0027d rather just err on the side of a larger value than needed.","commit_id":"b1677dcb80ce8b83aadb2180efad3527a96bd3bc"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"5e764d6e7d37b8c366853cbdf3c8ce47adb62d8d","unresolved":false,"context_lines":[{"line_number":240,"context_line":"            changes \u003d True"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"        # Unbind the port if needed."},{"line_number":243,"context_line":"        if changes:"},{"line_number":244,"context_line":"            binding.vif_type \u003d portbindings.VIF_TYPE_UNBOUND"},{"line_number":245,"context_line":"            binding.vif_details \u003d \u0027\u0027"},{"line_number":246,"context_line":"            binding.driver \u003d None"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_b422a7fe","line":243,"updated":"2014-07-15 15:03:02.000000000","message":"would it not be better haing lines 244-248 as a utility method - this can be reused also in _delete_port_binding","commit_id":"b1677dcb80ce8b83aadb2180efad3527a96bd3bc"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"f4b892f4201f52fa71638eda1edd89e5ffbe26dc","unresolved":false,"context_lines":[{"line_number":240,"context_line":"            changes \u003d True"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"        # Unbind the port if needed."},{"line_number":243,"context_line":"        if changes:"},{"line_number":244,"context_line":"            binding.vif_type \u003d portbindings.VIF_TYPE_UNBOUND"},{"line_number":245,"context_line":"            binding.vif_details \u003d \u0027\u0027"},{"line_number":246,"context_line":"            binding.driver \u003d None"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_aa5a424d","line":243,"in_reply_to":"baada198_b422a7fe","updated":"2014-07-15 15:47:18.000000000","message":"The _delete_port_binding() function is removed in this patch, and this is the only place where port bindings are deleted. I decided to inline this code because the _process_port_binding() function is small enough, and seeing how the binding record is manipulated aids understanding the logic of the function.","commit_id":"b1677dcb80ce8b83aadb2180efad3527a96bd3bc"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"5e764d6e7d37b8c366853cbdf3c8ce47adb62d8d","unresolved":false,"context_lines":[{"line_number":283,"context_line":"            # more than a couple attempts should ever be required in"},{"line_number":284,"context_line":"            # normal operation. Log at info level if not 1st attempt."},{"line_number":285,"context_line":"            count +\u003d 1"},{"line_number":286,"context_line":"            if count \u003e MAX_BIND_TRIES:"},{"line_number":287,"context_line":"                LOG.error(_(\"Failed to commit binding results for %(port)s \""},{"line_number":288,"context_line":"                            \"after %(max)s tries\"),"},{"line_number":289,"context_line":"                          {\u0027port\u0027: port_id, \u0027max\u0027: MAX_BIND_TRIES})"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_347e97e4","line":286,"updated":"2014-07-15 15:03:02.000000000","message":"please use the log hint _LE","commit_id":"b1677dcb80ce8b83aadb2180efad3527a96bd3bc"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"5e764d6e7d37b8c366853cbdf3c8ce47adb62d8d","unresolved":false,"context_lines":[{"line_number":290,"context_line":"                return context"},{"line_number":291,"context_line":"            if count \u003e 1:"},{"line_number":292,"context_line":"                greenthread.sleep(0)  # yield"},{"line_number":293,"context_line":"                LOG.info(_(\"Attempt %(count)s to bind port %(port)s\"),"},{"line_number":294,"context_line":"                         {\u0027count\u0027: count, \u0027port\u0027: port_id})"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"            # The port isn\u0027t already bound and the necessary"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_d44b9bae","line":293,"updated":"2014-07-15 15:03:02.000000000","message":"ditto _LI","commit_id":"b1677dcb80ce8b83aadb2180efad3527a96bd3bc"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"5e764d6e7d37b8c366853cbdf3c8ce47adb62d8d","unresolved":false,"context_lines":[{"line_number":347,"context_line":"        # prevent deadlock waiting to acquire a DB lock held by"},{"line_number":348,"context_line":"        # another thread in the same process, leading to \u0027lock wait"},{"line_number":349,"context_line":"        # timeout\u0027 errors."},{"line_number":350,"context_line":"        with contextlib.nested(lockutils.lock(\u0027db-access\u0027),"},{"line_number":351,"context_line":"                               session.begin(subtransactions\u003dTrue)):"},{"line_number":352,"context_line":"            # Get the current port state and build a new PortContext"},{"line_number":353,"context_line":"            # reflecting this state as original state for subsequent"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_349a1714","line":350,"updated":"2014-07-15 15:03:02.000000000","message":"is this lock valid if there is more than one neutron service running?","commit_id":"b1677dcb80ce8b83aadb2180efad3527a96bd3bc"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"f4b892f4201f52fa71638eda1edd89e5ffbe26dc","unresolved":false,"context_lines":[{"line_number":347,"context_line":"        # prevent deadlock waiting to acquire a DB lock held by"},{"line_number":348,"context_line":"        # another thread in the same process, leading to \u0027lock wait"},{"line_number":349,"context_line":"        # timeout\u0027 errors."},{"line_number":350,"context_line":"        with contextlib.nested(lockutils.lock(\u0027db-access\u0027),"},{"line_number":351,"context_line":"                               session.begin(subtransactions\u003dTrue)):"},{"line_number":352,"context_line":"            # Get the current port state and build a new PortContext"},{"line_number":353,"context_line":"            # reflecting this state as original state for subsequent"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_8a965e4a","line":350,"in_reply_to":"baada198_349a1714","updated":"2014-07-15 15:47:18.000000000","message":"This lock is following the same pattern used elsewhere to prevent deadlock between two threads in the same process. It does not need to lock across different processes, but I think it is shared among processes on the same host. Any change to this pattern should be done globally (or at least for ML2) in a separate patch. I\u0027d like to eliminate much of this locking in a follow-on patch by using the retry loop introduced here to retry on conflict exceptions raised during DB commit.","commit_id":"b1677dcb80ce8b83aadb2180efad3527a96bd3bc"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"5e764d6e7d37b8c366853cbdf3c8ce47adb62d8d","unresolved":false,"context_lines":[{"line_number":811,"context_line":"        try:"},{"line_number":812,"context_line":"            bound_context \u003d self._bind_port_if_needed(mech_context)"},{"line_number":813,"context_line":"        except ml2_exc.MechanismDriverError:"},{"line_number":814,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":815,"context_line":"                LOG.error(_(\"_bind_port_if_needed \""},{"line_number":816,"context_line":"                            \"failed, deleting port \u0027%s\u0027\"), result[\u0027id\u0027])"},{"line_number":817,"context_line":"                self.delete_port(context, result[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_14bef364","line":814,"updated":"2014-07-15 15:03:02.000000000","message":"_LE","commit_id":"b1677dcb80ce8b83aadb2180efad3527a96bd3bc"}],"neutron/plugins/ml2/rpc.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"5e764d6e7d37b8c366853cbdf3c8ce47adb62d8d","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":87,"context_line":"        port_context \u003d plugin.get_bound_port_context(rpc_context, port_id)"},{"line_number":88,"context_line":"        if not port_context:"},{"line_number":89,"context_line":"            LOG.warning(_(\"Device %(device)s requested by agent \""},{"line_number":90,"context_line":"                          \"%(agent_id)s not found in database\"),"},{"line_number":91,"context_line":"                        {\u0027device\u0027: device, \u0027agent_id\u0027: agent_id})"},{"line_number":92,"context_line":"            return {\u0027device\u0027: device}"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_54422b68","line":89,"updated":"2014-07-15 15:03:02.000000000","message":"_LW","commit_id":"b1677dcb80ce8b83aadb2180efad3527a96bd3bc"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"5e764d6e7d37b8c366853cbdf3c8ce47adb62d8d","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        port \u003d port_context.current"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        if not segment:"},{"line_number":98,"context_line":"            LOG.warning(_(\"Device %(device)s requested by agent \""},{"line_number":99,"context_line":"                          \"%(agent_id)s on network %(network_id)s not \""},{"line_number":100,"context_line":"                          \"bound, vif_type: %(vif_type)s\"),"},{"line_number":101,"context_line":"                        {\u0027device\u0027: device,"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_f4797fc5","line":98,"updated":"2014-07-15 15:03:02.000000000","message":"_LW","commit_id":"b1677dcb80ce8b83aadb2180efad3527a96bd3bc"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"5e764d6e7d37b8c366853cbdf3c8ce47adb62d8d","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                 \u0027network_type\u0027: segment[api.NETWORK_TYPE],"},{"line_number":119,"context_line":"                 \u0027segmentation_id\u0027: segment[api.SEGMENTATION_ID],"},{"line_number":120,"context_line":"                 \u0027physical_network\u0027: segment[api.PHYSICAL_NETWORK]}"},{"line_number":121,"context_line":"        LOG.debug(_(\"Returning: %s\"), entry)"},{"line_number":122,"context_line":"        return entry"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def get_devices_details_list(self, rpc_context, **kwargs):"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_54978b39","line":121,"updated":"2014-07-15 15:03:02.000000000","message":"can you please remove the translation from the debug message","commit_id":"b1677dcb80ce8b83aadb2180efad3527a96bd3bc"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"f4b892f4201f52fa71638eda1edd89e5ffbe26dc","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                 \u0027network_type\u0027: segment[api.NETWORK_TYPE],"},{"line_number":119,"context_line":"                 \u0027segmentation_id\u0027: segment[api.SEGMENTATION_ID],"},{"line_number":120,"context_line":"                 \u0027physical_network\u0027: segment[api.PHYSICAL_NETWORK]}"},{"line_number":121,"context_line":"        LOG.debug(_(\"Returning: %s\"), entry)"},{"line_number":122,"context_line":"        return entry"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def get_devices_details_list(self, rpc_context, **kwargs):"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_8acbbe51","line":121,"in_reply_to":"baada198_54978b39","updated":"2014-07-15 15:47:18.000000000","message":"I will if this patch does require updates, but this existing code is just moved from line 142, so this isn\u0027t introducing a new problem.","commit_id":"b1677dcb80ce8b83aadb2180efad3527a96bd3bc"}]}
