)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"1c3bb5bf8b214a9065a0b1879b6400a0425557d9","unresolved":false,"context_lines":[{"line_number":11,"context_line":"duplicates can be added this change adds UniqueConstraint for"},{"line_number":12,"context_line":"this columns."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Partially-Bug: #1499647"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: Iaad82fe522cfd70061daecf411c924fdc11b7e41"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a1a9d01_ba642449","line":14,"updated":"2015-09-28 13:20:34.000000000","message":"Why only partially?","commit_id":"ca581e51e2b4a5097bdd1620b275d615b516ec71"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"cdfd412ee1fd3589e89140cd894ea523cff5e06d","unresolved":false,"context_lines":[{"line_number":11,"context_line":"duplicates can be added this change adds UniqueConstraint for"},{"line_number":12,"context_line":"this columns."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Partially-Bug: #1499647"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: Iaad82fe522cfd70061daecf411c924fdc11b7e41"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a1a9d01_fde37631","line":14,"in_reply_to":"9a1a9d01_ba642449","updated":"2015-09-28 13:29:47.000000000","message":"Because I feel that we also need to make some change to avoid situations when duplicates are added, not only forbid to add them, but at this moment I\u0027m not sure how this is happened. So this change seems to be the first step in fixing this bug.","commit_id":"ca581e51e2b4a5097bdd1620b275d615b516ec71"}],"neutron/db/l3_hamode_db.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9d487253705290a7366d4b01aad385220d100d4a","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    \"\"\""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    __tablename__ \u003d \u0027ha_router_agent_port_bindings\u0027"},{"line_number":81,"context_line":"    __table_args__ \u003d ("},{"line_number":82,"context_line":"        sa.UniqueConstraint("},{"line_number":83,"context_line":"            \u0027router_id\u0027, \u0027l3_agent_id\u0027,"},{"line_number":84,"context_line":"            name\u003d\u0027uniq_ha_router_agent_port_bindings0port_id0l3_agent_id\u0027),"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a1a9d01_c77bdcbc","line":81,"updated":"2015-09-30 13:57:33.000000000","message":"I\u0027m not sure this new constraint is needed. Please see the bug report for more details.","commit_id":"962a5ecefe9ff143597087ee4d72969b98463a09"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9d487253705290a7366d4b01aad385220d100d4a","unresolved":false,"context_lines":[{"line_number":312,"context_line":"            num_agents \u003d self.get_number_of_agents_for_scheduling(context)"},{"line_number":313,"context_line":"            portbindings \u003d (context.session.query("},{"line_number":314,"context_line":"                    L3HARouterAgentPortBinding).filter("},{"line_number":315,"context_line":"                L3HARouterAgentPortBinding.router_id \u003d\u003d router_id).count())"},{"line_number":316,"context_line":"            if portbindings \u003c num_agents:"},{"line_number":317,"context_line":"                portbinding \u003d L3HARouterAgentPortBinding(port_id\u003dport_id,"},{"line_number":318,"context_line":"                                                         router_id\u003drouter_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a1a9d01_e728609c","line":315,"updated":"2015-09-30 13:57:33.000000000","message":"There\u0027s a race here between the count and the addition of a new binding.","commit_id":"962a5ecefe9ff143597087ee4d72969b98463a09"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"da6ac331b5bbd5ece33156d43b4b7acffb8afdcc","unresolved":false,"context_lines":[{"line_number":263,"context_line":"                                                                tenant_id,"},{"line_number":264,"context_line":"                                                                network[\u0027id\u0027])"},{"line_number":265,"context_line":"        except Exception:"},{"line_number":266,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":267,"context_line":"                self._core_plugin.delete_network(admin_ctx, network[\u0027id\u0027])"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_32b88fe5","line":266,"updated":"2015-10-01 20:17:20.000000000","message":"I\u0027m pretty sure that ALL of these blocks that catch exceptions and manually roll back resources can be deleted if we go with this approach.","commit_id":"aa029217791e7abd0a5ae090ad0fe1e667e2b018"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"8fd1c49a12eec273318432de7de8efdfb6c7187d","unresolved":false,"context_lines":[{"line_number":263,"context_line":"                                                                tenant_id,"},{"line_number":264,"context_line":"                                                                network[\u0027id\u0027])"},{"line_number":265,"context_line":"        except Exception:"},{"line_number":266,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":267,"context_line":"                self._core_plugin.delete_network(admin_ctx, network[\u0027id\u0027])"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_bfee96b2","line":266,"in_reply_to":"9a1a9d01_32b88fe5","updated":"2015-10-02 15:25:31.000000000","message":"Yes, I\u0027ll put a separate patch for it.","commit_id":"aa029217791e7abd0a5ae090ad0fe1e667e2b018"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"c7f0273dd1ba570319621c039e13c9abde364b13","unresolved":false,"context_lines":[{"line_number":394,"context_line":"                            context, router_db.tenant_id)"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":"                    self._set_vr_id(context, router_db, ha_network)"},{"line_number":397,"context_line":"                    self._create_ha_interfaces(context, router_db,"},{"line_number":398,"context_line":"                                               ha_network)"},{"line_number":399,"context_line":"                    self._notify_ha_interfaces_updated(context, router_db.id)"},{"line_number":400,"context_line":"                except Exception:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_b2e33f33","line":397,"updated":"2015-10-01 20:13:29.000000000","message":"The reason we didn\u0027t put this code in a transaction to begin with is because create_ha_interfaces calls out to core_plugin.create_port, which contains multiple HTTP/RPC calls, and it\u0027s asking for trouble putting that in a transaction.","commit_id":"aa029217791e7abd0a5ae090ad0fe1e667e2b018"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"8fd1c49a12eec273318432de7de8efdfb6c7187d","unresolved":false,"context_lines":[{"line_number":394,"context_line":"                            context, router_db.tenant_id)"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":"                    self._set_vr_id(context, router_db, ha_network)"},{"line_number":397,"context_line":"                    self._create_ha_interfaces(context, router_db,"},{"line_number":398,"context_line":"                                               ha_network)"},{"line_number":399,"context_line":"                    self._notify_ha_interfaces_updated(context, router_db.id)"},{"line_number":400,"context_line":"                except Exception:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_6b659bdf","line":397,"in_reply_to":"9a1a9d01_32e16fff","updated":"2015-10-02 15:25:31.000000000","message":"I agree and I don\u0027t like the idea of putting notifications in transaction.","commit_id":"aa029217791e7abd0a5ae090ad0fe1e667e2b018"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"da6ac331b5bbd5ece33156d43b4b7acffb8afdcc","unresolved":false,"context_lines":[{"line_number":394,"context_line":"                            context, router_db.tenant_id)"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":"                    self._set_vr_id(context, router_db, ha_network)"},{"line_number":397,"context_line":"                    self._create_ha_interfaces(context, router_db,"},{"line_number":398,"context_line":"                                               ha_network)"},{"line_number":399,"context_line":"                    self._notify_ha_interfaces_updated(context, router_db.id)"},{"line_number":400,"context_line":"                except Exception:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_32e16fff","line":397,"in_reply_to":"9a1a9d01_b2e33f33","updated":"2015-10-01 20:17:20.000000000","message":"Although now I see that there\u0027s places in the code that we do this, for example in l3_db.create_floatingip. I don\u0027t know what to think honestly.","commit_id":"aa029217791e7abd0a5ae090ad0fe1e667e2b018"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"c7f0273dd1ba570319621c039e13c9abde364b13","unresolved":false,"context_lines":[{"line_number":396,"context_line":"                    self._set_vr_id(context, router_db, ha_network)"},{"line_number":397,"context_line":"                    self._create_ha_interfaces(context, router_db,"},{"line_number":398,"context_line":"                                               ha_network)"},{"line_number":399,"context_line":"                    self._notify_ha_interfaces_updated(context, router_db.id)"},{"line_number":400,"context_line":"                except Exception:"},{"line_number":401,"context_line":"                    with excutils.save_and_reraise_exception():"},{"line_number":402,"context_line":"                        self.delete_router(context, router_dict[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_1208eb27","line":399,"updated":"2015-10-01 20:13:29.000000000","message":"The notification should be outside of the transaction so it is as short lived as possible (The notify method calls an RPC method). I saw your comment on the bug that it actually affected the results of your test, that is very odd! I think it might have changed the timing of things and that we possibly don\u0027t fully understand the race yet.","commit_id":"aa029217791e7abd0a5ae090ad0fe1e667e2b018"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"c7f0273dd1ba570319621c039e13c9abde364b13","unresolved":false,"context_lines":[{"line_number":397,"context_line":"                    self._create_ha_interfaces(context, router_db,"},{"line_number":398,"context_line":"                                               ha_network)"},{"line_number":399,"context_line":"                    self._notify_ha_interfaces_updated(context, router_db.id)"},{"line_number":400,"context_line":"                except Exception:"},{"line_number":401,"context_line":"                    with excutils.save_and_reraise_exception():"},{"line_number":402,"context_line":"                        self.delete_router(context, router_dict[\u0027id\u0027])"},{"line_number":403,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_f2c0d77e","line":400,"updated":"2015-10-01 20:13:29.000000000","message":"I think that this isn\u0027t needed anymore since the transaction will handle rollbacks for us.","commit_id":"aa029217791e7abd0a5ae090ad0fe1e667e2b018"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"75adf4ffa45ff481a46d198850214359e9bc5a29","unresolved":false,"context_lines":[{"line_number":317,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":318,"context_line":"            port \u003d p_utils.create_port(self._core_plugin, context,"},{"line_number":319,"context_line":"                                     {\u0027port\u0027: args})"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"            return self._create_ha_port_binding(context, port[\u0027id\u0027], router_id)"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"    def _create_ha_interfaces(self, context, router, ha_network):"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a2ca52d_ad63d1b0","line":320,"updated":"2015-10-13 21:14:34.000000000","message":"nit:  Delete the new extra line.","commit_id":"9fc46b4c7c069bd1ccd557868254523595ef2e6a"}],"neutron/extensions/l3_ext_ha_mode.py":[{"author":{"_account_id":11682,"name":"Ryan Moats","email":"rmoats@us.ibm.com","username":"regXboi"},"change_message_id":"987bd9c8a353964bcd360ff4f43cd6f3ea6e2734","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"class HAPortsAlreadyCreatedForRouter(exceptions.NeutronException):"},{"line_number":71,"context_line":"    message \u003d (_(\"All necessary HA ports was already created for router \""},{"line_number":72,"context_line":"                 \"%(router_id)s\"))"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"class L3_ext_ha_mode(extensions.ExtensionDescriptor):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a1a9d01_fa3f8184","line":72,"updated":"2015-09-30 19:25:24.000000000","message":"Jenkins is failing on this in at least one unit test case, so I think the testing code may also need a look see","commit_id":"962a5ecefe9ff143597087ee4d72969b98463a09"}],"neutron/scheduler/l3_agent_scheduler.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"0f48d87ea691843f58a3c979986719ba97c681a8","unresolved":false,"context_lines":[{"line_number":328,"context_line":"        port_bindings \u003d plugin.get_ha_router_port_bindings(context,"},{"line_number":329,"context_line":"                                                           [router_id])"},{"line_number":330,"context_line":"        for port_binding, agent in zip(port_bindings, chosen_agents):"},{"line_number":331,"context_line":"            with context.session.begin(subtransactions\u003dTrue):"},{"line_number":332,"context_line":"                port_binding.l3_agent_id \u003d agent.id"},{"line_number":333,"context_line":"                self.bind_router(context, router_id, agent)"},{"line_number":334,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3a29b11f_e83db48f","line":331,"updated":"2015-10-21 16:11:32.000000000","message":"I get a sense that you might want to incorporate fix from [1], unless you ran the transaction for the entire loop. That said be extra careful to the potential error caused here that may lead to a InvalidRequestError because of the nested transaction.\n\nI\u0027d rather devise a change that doesn\u0027t rely on wrapping up the statement in a subtransaction, I don\u0027t believe it would work in all DB transaction levels. \n\n[1] https://review.openstack.org/#/c/237870/","commit_id":"6fca92fb1b998edd57db22f9ee63cc7572efe58f"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"99f328042009cb9a618be1a53087d0d46c55c709","unresolved":false,"context_lines":[{"line_number":328,"context_line":"        port_bindings \u003d plugin.get_ha_router_port_bindings(context,"},{"line_number":329,"context_line":"                                                           [router_id])"},{"line_number":330,"context_line":"        for port_binding, agent in zip(port_bindings, chosen_agents):"},{"line_number":331,"context_line":"            with context.session.begin(subtransactions\u003dTrue):"},{"line_number":332,"context_line":"                port_binding.l3_agent_id \u003d agent.id"},{"line_number":333,"context_line":"                self.bind_router(context, router_id, agent)"},{"line_number":334,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3a29b11f_b615bd9c","line":331,"in_reply_to":"3a29b11f_e83db48f","updated":"2015-10-22 09:34:17.000000000","message":"Could you please expand on your concerns regarding isolation levels?","commit_id":"6fca92fb1b998edd57db22f9ee63cc7572efe58f"},{"author":{"_account_id":11816,"name":"mike_mp@zzzcomputing.com","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"6b6072dcc360480eb754b8116011f66ea93e8472","unresolved":false,"context_lines":[{"line_number":328,"context_line":"        port_bindings \u003d plugin.get_ha_router_port_bindings(context,"},{"line_number":329,"context_line":"                                                           [router_id])"},{"line_number":330,"context_line":"        for port_binding, agent in zip(port_bindings, chosen_agents):"},{"line_number":331,"context_line":"            with context.session.begin(subtransactions\u003dTrue):"},{"line_number":332,"context_line":"                port_binding.l3_agent_id \u003d agent.id"},{"line_number":333,"context_line":"                self.bind_router(context, router_id, agent)"},{"line_number":334,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3a29b11f_68e976b6","line":331,"in_reply_to":"3a29b11f_e83db48f","updated":"2015-10-22 14:57:05.000000000","message":"note this is not a \"nested\" transaction, e.g. savepoint; a \"subtransaction\" is only a logical Python-side concept that represents a nested begin/commit pair in the context of a single enclosing transaction (which itself may be a normal transaction or a savepoint).","commit_id":"6fca92fb1b998edd57db22f9ee63cc7572efe58f"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"ad6c82f62cc26b6a68251263a82cce3ea66ce307","unresolved":false,"context_lines":[{"line_number":328,"context_line":"        port_bindings \u003d plugin.get_ha_router_port_bindings(context,"},{"line_number":329,"context_line":"                                                           [router_id])"},{"line_number":330,"context_line":"        for port_binding, agent in zip(port_bindings, chosen_agents):"},{"line_number":331,"context_line":"            with context.session.begin(subtransactions\u003dTrue):"},{"line_number":332,"context_line":"                port_binding.l3_agent_id \u003d agent.id"},{"line_number":333,"context_line":"                self.bind_router(context, router_id, agent)"},{"line_number":334,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"da85f559_72a96d23","line":331,"updated":"2015-11-12 14:13:32.000000000","message":"could you explain why the subtransaction is inside the for loop instead of outside?","commit_id":"b03c6ee203facc338ad6593c90127d70418db0b5"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"bf21b8bf7e7a1cd80c0a2d9498bf4fc4a4f12167","unresolved":false,"context_lines":[{"line_number":328,"context_line":"        port_bindings \u003d plugin.get_ha_router_port_bindings(context,"},{"line_number":329,"context_line":"                                                           [router_id])"},{"line_number":330,"context_line":"        for port_binding, agent in zip(port_bindings, chosen_agents):"},{"line_number":331,"context_line":"            with context.session.begin(subtransactions\u003dTrue):"},{"line_number":332,"context_line":"                port_binding.l3_agent_id \u003d agent.id"},{"line_number":333,"context_line":"                self.bind_router(context, router_id, agent)"},{"line_number":334,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"da85f559_6d198c21","line":331,"in_reply_to":"da85f559_72a96d23","updated":"2015-11-12 14:20:38.000000000","message":"Because it is important setting agent_id to be atomic. If I set it for the whole loop it will mean extra and unnecessary locks.","commit_id":"b03c6ee203facc338ad6593c90127d70418db0b5"}]}
