)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"fcdcdac1fc1d5ffbc4be14889d7370cb2954c0af","unresolved":false,"context_lines":[{"line_number":11,"context_line":"regression where under-scheduled HA routers will not be rescheduled on"},{"line_number":12,"context_line":"an l3 agent\u0027s resync. This patch adds this back."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"DocImpact"},{"line_number":15,"context_line":"Change-Id: Ie98d5e3760cdb17450aea546f4b61f5ba14baf1c"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"bab6814e_14aa82d2","line":14,"range":{"start_line":14,"start_character":0,"end_line":14,"end_character":9},"updated":"2016-05-25 08:03:15.000000000","message":"what is doc impact here?","commit_id":"3699e58b6780b1cc05ddc29a728695d75ff5efbd"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"7673cf2b509f9c2ecc4d5bc76d3873bad2be6703","unresolved":false,"context_lines":[{"line_number":11,"context_line":"regression where under-scheduled HA routers will not be rescheduled on"},{"line_number":12,"context_line":"an l3 agent\u0027s resync. This patch adds this back."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"DocImpact"},{"line_number":15,"context_line":"Change-Id: Ie98d5e3760cdb17450aea546f4b61f5ba14baf1c"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"bab6814e_d49bda64","line":14,"range":{"start_line":14,"start_character":0,"end_line":14,"end_character":9},"in_reply_to":"bab6814e_14aa82d2","updated":"2016-05-25 08:22:49.000000000","message":"Since the previous patch removed the auto_schedule for underscheduled routers (a DocImpact), I figured adding this functionality back also counts as a DocImpact.","commit_id":"3699e58b6780b1cc05ddc29a728695d75ff5efbd"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"8603f06b3d0ee7617270c6e855da6918147953fb","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"There are 2 different paths which deal with scheduling a router to"},{"line_number":10,"context_line":"an L3 agent: the first begins when a router is created through the API"},{"line_number":11,"context_line":"layer (neutron router-create ...) and the second begins when a L3 agent"},{"line_number":12,"context_line":"requests the routers that are assigned to it (get_router_ids()). Both"},{"line_number":13,"context_line":"paths deal with creating missing resources: for example, if another"},{"line_number":14,"context_line":"L3 agent has been added to the deployment, now it might be possible to"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"7aa08908_64e96e7f","line":11,"range":{"start_line":11,"start_character":42,"end_line":11,"end_character":48},"updated":"2016-06-17 09:58:20.000000000","message":"there is also a third path which this patch also clears up - autoscheduling inside sync_routers rpc handler. I think this should be also stated in the commit. Removing this third path fixes bug 1593653 so might probably go as a separate commit which can be backported.","commit_id":"c359e8d38bbbbb040d33516772eb5e8a61e4d020"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"10480acf912e32e98740341bc2bcd6b7f8ef75fc","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"There are 2 different paths which deal with scheduling a router to"},{"line_number":10,"context_line":"an L3 agent: the first begins when a router is created through the API"},{"line_number":11,"context_line":"layer (neutron router-create ...) and the second begins when a L3 agent"},{"line_number":12,"context_line":"requests the routers that are assigned to it (get_router_ids()). Both"},{"line_number":13,"context_line":"paths deal with creating missing resources: for example, if another"},{"line_number":14,"context_line":"L3 agent has been added to the deployment, now it might be possible to"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"1aa78d24_b1582658","line":11,"range":{"start_line":11,"start_character":42,"end_line":11,"end_character":48},"in_reply_to":"7aa08908_64e96e7f","updated":"2016-07-03 13:32:54.000000000","message":"Since this has been dealt with, this change is no longer needed.","commit_id":"c359e8d38bbbbb040d33516772eb5e8a61e4d020"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"58f157165b3dd684f46825d7b24d07dc798aefc4","unresolved":false,"context_lines":[{"line_number":23,"context_line":"specific agent. This basically eliminates all the races that concern"},{"line_number":24,"context_line":"this object as instead of pre-creating multiple objects, we can now"},{"line_number":25,"context_line":"create exactly one object when needed."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Change-Id: Ie98d5e3760cdb17450aea546f4b61f5ba14baf1c"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":17,"id":"3a98d1f4_545c29ed","line":26,"updated":"2016-09-29 14:23:24.000000000","message":"I guess we need bug for all refactoring patches.","commit_id":"0bdee8278b1d9b18ed82e53aac56bdc7517cc6c9"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"836d5241572df7f247005881bab995cf7b739496","unresolved":false,"context_lines":[{"line_number":23,"context_line":"specific agent. This basically eliminates all the races that concern"},{"line_number":24,"context_line":"this object as instead of pre-creating multiple objects, we can now"},{"line_number":25,"context_line":"create exactly one object when needed."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Change-Id: Ie98d5e3760cdb17450aea546f4b61f5ba14baf1c"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":17,"id":"3a98d1f4_d74450b8","line":26,"in_reply_to":"3a98d1f4_545c29ed","updated":"2016-10-02 06:02:29.000000000","message":"Done","commit_id":"0bdee8278b1d9b18ed82e53aac56bdc7517cc6c9"}],"neutron/api/rpc/handlers/l3_rpc.py":[{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"c53aeebafb49ae0b659e2a9a8a713782cf01f5b7","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        \"\"\"Returns IDs of routers scheduled to l3 agent on \u003chost\u003e"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        This will autoschedule unhosted routers to l3 agent (not necessarily to"},{"line_number":70,"context_line":"        the given host) and then return all ids of routers scheduled to it."},{"line_number":71,"context_line":"        \"\"\""},{"line_number":72,"context_line":"        if utils.is_extension_supported("},{"line_number":73,"context_line":"                self.l3plugin, constants.L3_AGENT_SCHEDULER_EXT_ALIAS):"}],"source_content_type":"text/x-python","patch_set":6,"id":"bab6814e_b6fd623d","line":70,"updated":"2016-05-25 15:06:48.000000000","message":"s/it/\u003chost\u003e/ would seem clearer.","commit_id":"5b807bd176568d7cf642c1357247e0f1b98f8861"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"801ec2e169a436378a36ce0426b4db627d326a97","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        \"\"\"Returns IDs of routers scheduled to l3 agent on \u003chost\u003e"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        This will autoschedule unhosted routers to l3 agent (not necessarily to"},{"line_number":70,"context_line":"        the given host) and then return all ids of routers scheduled to it."},{"line_number":71,"context_line":"        \"\"\""},{"line_number":72,"context_line":"        if utils.is_extension_supported("},{"line_number":73,"context_line":"                self.l3plugin, constants.L3_AGENT_SCHEDULER_EXT_ALIAS):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9abb7d3a_9f46a821","line":70,"in_reply_to":"bab6814e_b6fd623d","updated":"2016-05-29 09:54:58.000000000","message":"I didn\u0027t quite understand what you wanted me to do here. I changed the wording though so let me know if it\u0027s still not clear enough.","commit_id":"5b807bd176568d7cf642c1357247e0f1b98f8861"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"30d4f9084835b12769b5327cd94e7bd22e25f600","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        context \u003d neutron_context.get_admin_context()"},{"line_number":90,"context_line":"        if utils.is_extension_supported("},{"line_number":91,"context_line":"            self.l3plugin, constants.L3_AGENT_SCHEDULER_EXT_ALIAS):"},{"line_number":92,"context_line":"            if cfg.CONF.router_auto_schedule:"},{"line_number":93,"context_line":"                self.l3plugin.create_ha_ports_and_bind(context, router_ids,"},{"line_number":94,"context_line":"                                                       host)"},{"line_number":95,"context_line":"            routers \u003d ("}],"source_content_type":"text/x-python","patch_set":22,"id":"fa6399be_02efc787","line":92,"updated":"2016-10-12 09:50:00.000000000","message":"why is it under cfg.CONF.router_auto_schedule?","commit_id":"e892539a0a64103c7a179b040fd330707fa31448"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"eabc5d05fae789dd3f5c432f376eb15334a4de0d","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        context \u003d neutron_context.get_admin_context()"},{"line_number":90,"context_line":"        if utils.is_extension_supported("},{"line_number":91,"context_line":"            self.l3plugin, constants.L3_AGENT_SCHEDULER_EXT_ALIAS):"},{"line_number":92,"context_line":"            if cfg.CONF.router_auto_schedule:"},{"line_number":93,"context_line":"                self.l3plugin.create_ha_ports_and_bind(context, router_ids,"},{"line_number":94,"context_line":"                                                       host)"},{"line_number":95,"context_line":"            routers \u003d ("}],"source_content_type":"text/x-python","patch_set":22,"id":"fa6399be_a26989c0","line":92,"in_reply_to":"fa6399be_02efc787","updated":"2016-10-13 08:11:52.000000000","message":"To be consistent with line 73.","commit_id":"e892539a0a64103c7a179b040fd330707fa31448"}],"neutron/db/l3_agentschedulers_db.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"fcdcdac1fc1d5ffbc4be14889d7370cb2954c0af","unresolved":false,"context_lines":[{"line_number":341,"context_line":"            self._get_agent(context, agent_id)"},{"line_number":342,"context_line":"            return {\u0027routers\u0027: []}"},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"    def get_routers_l3_agents_count(self, context):"},{"line_number":345,"context_line":"        \"\"\"Return a map between routers and agent counts for all routers.\"\"\""},{"line_number":346,"context_line":"        # Postgres requires every column in the select to be present in"},{"line_number":347,"context_line":"        # the group by statement when using an aggregate function."}],"source_content_type":"text/x-python","patch_set":5,"id":"bab6814e_d47e3a69","line":344,"range":{"start_line":344,"start_character":8,"end_line":344,"end_character":35},"updated":"2016-05-25 08:03:15.000000000","message":"why moving method from ha scheduler?","commit_id":"3699e58b6780b1cc05ddc29a728695d75ff5efbd"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"7673cf2b509f9c2ecc4d5bc76d3873bad2be6703","unresolved":false,"context_lines":[{"line_number":341,"context_line":"            self._get_agent(context, agent_id)"},{"line_number":342,"context_line":"            return {\u0027routers\u0027: []}"},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"    def get_routers_l3_agents_count(self, context):"},{"line_number":345,"context_line":"        \"\"\"Return a map between routers and agent counts for all routers.\"\"\""},{"line_number":346,"context_line":"        # Postgres requires every column in the select to be present in"},{"line_number":347,"context_line":"        # the group by statement when using an aggregate function."}],"source_content_type":"text/x-python","patch_set":5,"id":"bab6814e_14cc4260","line":344,"range":{"start_line":344,"start_character":8,"end_line":344,"end_character":35},"in_reply_to":"bab6814e_d47e3a69","updated":"2016-05-25 08:22:49.000000000","message":"Since this function no longer counts only HA routers (the check that each router is also an HA one has been removed in favour of getting the count of all routers), so it no longer belongs in the HA scheduler.","commit_id":"3699e58b6780b1cc05ddc29a728695d75ff5efbd"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"f0fc8709fe5c8bd449586f6a47e5f8bc4587fd1a","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            return {\u0027routers\u0027: []}"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"    def get_routers_l3_agents_count(self, context):"},{"line_number":357,"context_line":"        \"\"\"Return a map between routers and agent counts for all routers.\"\"\""},{"line_number":358,"context_line":"        # Postgres requires every column in the select to be present in"},{"line_number":359,"context_line":"        # the group by statement when using an aggregate function."},{"line_number":360,"context_line":"        # One solution is to generate a subquery and join it with the desired"}],"source_content_type":"text/x-python","patch_set":6,"id":"9abb7d3a_635f2a0f","line":357,"range":{"start_line":357,"start_character":57,"end_line":357,"end_character":72},"updated":"2016-05-27 07:55:56.000000000","message":"currently only ha routers can be scheduled to more then 1 agent. Is it worth generalizing it? The logic which uses this func in fact only needs to know ids of non-ha routers not scheduled at all, plus ha routers with not enough agents. My suggestion would be to define get_underscheduled_router_ids() - here it will return all routers that don\u0027t have bindings at all. Then override it in l3_hascheduler_db so it calls super() and also adds ha routers which need to be scheduled to additional agents.","commit_id":"5b807bd176568d7cf642c1357247e0f1b98f8861"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"801ec2e169a436378a36ce0426b4db627d326a97","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            return {\u0027routers\u0027: []}"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"    def get_routers_l3_agents_count(self, context):"},{"line_number":357,"context_line":"        \"\"\"Return a map between routers and agent counts for all routers.\"\"\""},{"line_number":358,"context_line":"        # Postgres requires every column in the select to be present in"},{"line_number":359,"context_line":"        # the group by statement when using an aggregate function."},{"line_number":360,"context_line":"        # One solution is to generate a subquery and join it with the desired"}],"source_content_type":"text/x-python","patch_set":6,"id":"9abb7d3a_df6f9090","line":357,"range":{"start_line":357,"start_character":57,"end_line":357,"end_character":72},"in_reply_to":"9abb7d3a_635f2a0f","updated":"2016-05-29 09:54:58.000000000","message":"Sounds good. The next patchset will check to see that the bug in l3_db.py has been fixed but I\u0027ll get to this in the next patchset.","commit_id":"5b807bd176568d7cf642c1357247e0f1b98f8861"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"ad5270ac71251deb0957c745774cce1b04a6a34b","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            return {\u0027routers\u0027: []}"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"    def get_routers_l3_agents_count(self, context):"},{"line_number":357,"context_line":"        \"\"\"Return a map between routers and agent counts for all routers.\"\"\""},{"line_number":358,"context_line":"        # Postgres requires every column in the select to be present in"},{"line_number":359,"context_line":"        # the group by statement when using an aggregate function."},{"line_number":360,"context_line":"        # One solution is to generate a subquery and join it with the desired"}],"source_content_type":"text/x-python","patch_set":6,"id":"9abb7d3a_0397e248","line":357,"range":{"start_line":357,"start_character":57,"end_line":357,"end_character":72},"in_reply_to":"9abb7d3a_df6f9090","updated":"2016-05-30 15:09:23.000000000","message":"I attempted to write this a few times; in most attempts the implementation in l3_hascheduler_db had to run the query again (resulting in running 2 different queries - one for the completely-unscheduled and one for the under-scheduled) which is far from optimal. This is because the main \"should check if ha\" check needs to be inserted after line 370 (requiring 2 different queries).\n\nA different approach had a \"get_routers_l3_agents_count_query\" function which returned the sub_query, allowing for running only one query (so the ha version doesn\u0027t run the non-ha version). The downside here is that in order to get only the HA routers we need to iterate over all the routers (because the check needs to be inserted in the sub_query as specified above and doesn\u0027t seem to do anything afterwards). This is also far from optimal.\n\nIf you have any suggestions on how to implement this I\u0027d appreciate it, otherwise I\u0027m keeping this as is.","commit_id":"5b807bd176568d7cf642c1357247e0f1b98f8861"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"c53aeebafb49ae0b659e2a9a8a713782cf01f5b7","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        # columns."},{"line_number":362,"context_line":"        l3_db \u003d _import_resources()"},{"line_number":363,"context_line":""},{"line_number":364,"context_line":"        binding_model \u003d RouterL3AgentBinding"},{"line_number":365,"context_line":"        sub_query \u003d (context.session.query("},{"line_number":366,"context_line":"            binding_model.router_id,"},{"line_number":367,"context_line":"            func.count(binding_model.router_id).label(\u0027count\u0027))."}],"source_content_type":"text/x-python","patch_set":6,"id":"bab6814e_3985e558","line":364,"updated":"2016-05-25 15:06:48.000000000","message":"l3_db.RouterL3AgentBinding ?","commit_id":"5b807bd176568d7cf642c1357247e0f1b98f8861"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"aea41c24b53c8307c5edac387131c51cb7e7d7de","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        # columns."},{"line_number":362,"context_line":"        l3_db \u003d _import_resources()"},{"line_number":363,"context_line":""},{"line_number":364,"context_line":"        binding_model \u003d RouterL3AgentBinding"},{"line_number":365,"context_line":"        sub_query \u003d (context.session.query("},{"line_number":366,"context_line":"            binding_model.router_id,"},{"line_number":367,"context_line":"            func.count(binding_model.router_id).label(\u0027count\u0027))."}],"source_content_type":"text/x-python","patch_set":6,"id":"bab6814e_45b6fadc","line":364,"in_reply_to":"bab6814e_3985e558","updated":"2016-05-25 15:47:57.000000000","message":"Nope. RouterL3AgentBinding is defined in line 71 of this file.","commit_id":"5b807bd176568d7cf642c1357247e0f1b98f8861"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"f0fc8709fe5c8bd449586f6a47e5f8bc4587fd1a","unresolved":false,"context_lines":[{"line_number":365,"context_line":"        sub_query \u003d (context.session.query("},{"line_number":366,"context_line":"            binding_model.router_id,"},{"line_number":367,"context_line":"            func.count(binding_model.router_id).label(\u0027count\u0027))."},{"line_number":368,"context_line":"            join(l3_attrs_db.RouterExtraAttributes,"},{"line_number":369,"context_line":"                 binding_model.router_id \u003d\u003d"},{"line_number":370,"context_line":"                 l3_attrs_db.RouterExtraAttributes.router_id)."},{"line_number":371,"context_line":"            join(l3_db.Router)."},{"line_number":372,"context_line":"            group_by(binding_model.router_id).subquery())"},{"line_number":373,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9abb7d3a_433ae6ce","line":370,"range":{"start_line":368,"start_character":12,"end_line":370,"end_character":61},"updated":"2016-05-27 07:55:56.000000000","message":"why need this join?","commit_id":"5b807bd176568d7cf642c1357247e0f1b98f8861"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"801ec2e169a436378a36ce0426b4db627d326a97","unresolved":false,"context_lines":[{"line_number":365,"context_line":"        sub_query \u003d (context.session.query("},{"line_number":366,"context_line":"            binding_model.router_id,"},{"line_number":367,"context_line":"            func.count(binding_model.router_id).label(\u0027count\u0027))."},{"line_number":368,"context_line":"            join(l3_attrs_db.RouterExtraAttributes,"},{"line_number":369,"context_line":"                 binding_model.router_id \u003d\u003d"},{"line_number":370,"context_line":"                 l3_attrs_db.RouterExtraAttributes.router_id)."},{"line_number":371,"context_line":"            join(l3_db.Router)."},{"line_number":372,"context_line":"            group_by(binding_model.router_id).subquery())"},{"line_number":373,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9abb7d3a_7f05c4c0","line":370,"range":{"start_line":368,"start_character":12,"end_line":370,"end_character":61},"in_reply_to":"9abb7d3a_433ae6ce","updated":"2016-05-29 09:54:58.000000000","message":"Some of the code that consume this function depend on having extra attributes (like \u0027ha\u0027) in the result, so I left this in.","commit_id":"5b807bd176568d7cf642c1357247e0f1b98f8861"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"30d4f9084835b12769b5327cd94e7bd22e25f600","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                            plugin, context, router_id, agent,"},{"line_number":195,"context_line":"                            is_manual_scheduling\u003dTrue, is_ha\u003dTrue)"},{"line_number":196,"context_line":"                    ha_port_binding \u003d ("},{"line_number":197,"context_line":"                        self.router_scheduler.create_ha_port_and_bind("},{"line_number":198,"context_line":"                            plugin, context, router[\u0027id\u0027],"},{"line_number":199,"context_line":"                            router[\u0027tenant_id\u0027], agent))"},{"line_number":200,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":22,"id":"fa6399be_02618739","line":197,"updated":"2016-10-12 09:50:00.000000000","message":"create_ha_port_and_bind should be only called from sync_routers.","commit_id":"e892539a0a64103c7a179b040fd330707fa31448"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"eabc5d05fae789dd3f5c432f376eb15334a4de0d","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                            plugin, context, router_id, agent,"},{"line_number":195,"context_line":"                            is_manual_scheduling\u003dTrue, is_ha\u003dTrue)"},{"line_number":196,"context_line":"                    ha_port_binding \u003d ("},{"line_number":197,"context_line":"                        self.router_scheduler.create_ha_port_and_bind("},{"line_number":198,"context_line":"                            plugin, context, router[\u0027id\u0027],"},{"line_number":199,"context_line":"                            router[\u0027tenant_id\u0027], agent))"},{"line_number":200,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":22,"id":"fa6399be_429fcdb3","line":197,"in_reply_to":"fa6399be_02618739","updated":"2016-10-13 08:11:52.000000000","message":"Why? The whole idea is to start calling it from other flows as well...?","commit_id":"e892539a0a64103c7a179b040fd330707fa31448"}],"neutron/db/l3_db.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"fcdcdac1fc1d5ffbc4be14889d7370cb2954c0af","unresolved":false,"context_lines":[{"line_number":201,"context_line":"                      (router_ids - valid_routers))"},{"line_number":202,"context_line":"        return [r for r in routers if r[\u0027id\u0027] in valid_routers]"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    def set_router_allocating(self, context, router_id):"},{"line_number":205,"context_line":"        \"\"\"Set a router\u0027s status to ALLOCATING in a concurrently safe way."},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"        The change is done using an \u0027UPDATE WHERE\u0027 query. This means that the"}],"source_content_type":"text/x-python","patch_set":5,"id":"bab6814e_54e24a30","line":204,"range":{"start_line":204,"start_character":8,"end_line":204,"end_character":56},"updated":"2016-05-25 08:03:15.000000000","message":"this brings new functionality which seems unrelated to regression fix. I\u0027d suggest to go with a separate patch for this","commit_id":"3699e58b6780b1cc05ddc29a728695d75ff5efbd"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"7673cf2b509f9c2ecc4d5bc76d3873bad2be6703","unresolved":false,"context_lines":[{"line_number":201,"context_line":"                      (router_ids - valid_routers))"},{"line_number":202,"context_line":"        return [r for r in routers if r[\u0027id\u0027] in valid_routers]"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    def set_router_allocating(self, context, router_id):"},{"line_number":205,"context_line":"        \"\"\"Set a router\u0027s status to ALLOCATING in a concurrently safe way."},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"        The change is done using an \u0027UPDATE WHERE\u0027 query. This means that the"}],"source_content_type":"text/x-python","patch_set":5,"id":"bab6814e_0fe26f01","line":204,"range":{"start_line":204,"start_character":8,"end_line":204,"end_character":56},"in_reply_to":"bab6814e_54e24a30","updated":"2016-05-25 08:22:49.000000000","message":"Ok :)\nI might leave this in for a few patches to make my life easier but I\u0027ll split it off sooner or later.","commit_id":"3699e58b6780b1cc05ddc29a728695d75ff5efbd"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"9611ab14b89e244ff161bef0054fb94c1d8937cf","unresolved":false,"context_lines":[{"line_number":217,"context_line":"        \"\"\""},{"line_number":218,"context_line":"        try:"},{"line_number":219,"context_line":"            statement \u003d context.session.execute("},{"line_number":220,"context_line":"                sql.expression.update(Router)"},{"line_number":221,"context_line":"                .where(Router.status \u003d\u003d n_const.ROUTER_STATUS_ACTIVE)"},{"line_number":222,"context_line":"                .where(Router.id \u003d\u003d router_id)"},{"line_number":223,"context_line":"                .values({\u0027status\u0027: n_const.ROUTER_STATUS_ALLOCATING}))"}],"source_content_type":"text/x-python","patch_set":5,"id":"bab6814e_cff507ee","line":220,"range":{"start_line":220,"start_character":16,"end_line":220,"end_character":31},"updated":"2016-05-25 08:27:49.000000000","message":"I think that I realize what was wrong..As you use sql.expression this don\u0027t update ORM objects, so that is why expire was not executed automatically. You need to pass synchronize_session\u003dFalse or may be \u0027evaluate\u0027 according http://docs.sqlalchemy.org/en/latest/orm/query.html#sqlalchemy.orm.query.Query.update But we need to check what is better :)","commit_id":"3699e58b6780b1cc05ddc29a728695d75ff5efbd"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"9c42161663d509a561673883724bc39f884c73b6","unresolved":false,"context_lines":[{"line_number":217,"context_line":"        \"\"\""},{"line_number":218,"context_line":"        try:"},{"line_number":219,"context_line":"            statement \u003d context.session.execute("},{"line_number":220,"context_line":"                sql.expression.update(Router)"},{"line_number":221,"context_line":"                .where(Router.status \u003d\u003d n_const.ROUTER_STATUS_ACTIVE)"},{"line_number":222,"context_line":"                .where(Router.id \u003d\u003d router_id)"},{"line_number":223,"context_line":"                .values({\u0027status\u0027: n_const.ROUTER_STATUS_ALLOCATING}))"}],"source_content_type":"text/x-python","patch_set":5,"id":"bab6814e_974b1159","line":220,"range":{"start_line":220,"start_character":16,"end_line":220,"end_character":31},"in_reply_to":"bab6814e_cff507ee","updated":"2016-05-25 09:48:51.000000000","message":"Done :)","commit_id":"3699e58b6780b1cc05ddc29a728695d75ff5efbd"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"9611ab14b89e244ff161bef0054fb94c1d8937cf","unresolved":false,"context_lines":[{"line_number":222,"context_line":"                .where(Router.id \u003d\u003d router_id)"},{"line_number":223,"context_line":"                .values({\u0027status\u0027: n_const.ROUTER_STATUS_ALLOCATING}))"},{"line_number":224,"context_line":"            return statement.rowcount \u003e 0"},{"line_number":225,"context_line":"        except Exception:"},{"line_number":226,"context_line":"            return False"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    def set_router_active(self, context, router_id):"}],"source_content_type":"text/x-python","patch_set":5,"id":"bab6814e_2f3f7326","line":225,"range":{"start_line":225,"start_character":15,"end_line":225,"end_character":24},"updated":"2016-05-25 08:27:49.000000000","message":"I guess it is better to caught more specific error like IntegrityError","commit_id":"3699e58b6780b1cc05ddc29a728695d75ff5efbd"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"9c42161663d509a561673883724bc39f884c73b6","unresolved":false,"context_lines":[{"line_number":222,"context_line":"                .where(Router.id \u003d\u003d router_id)"},{"line_number":223,"context_line":"                .values({\u0027status\u0027: n_const.ROUTER_STATUS_ALLOCATING}))"},{"line_number":224,"context_line":"            return statement.rowcount \u003e 0"},{"line_number":225,"context_line":"        except Exception:"},{"line_number":226,"context_line":"            return False"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    def set_router_active(self, context, router_id):"}],"source_content_type":"text/x-python","patch_set":5,"id":"bab6814e_15355945","line":225,"range":{"start_line":225,"start_character":15,"end_line":225,"end_character":24},"in_reply_to":"bab6814e_2f3f7326","updated":"2016-05-25 09:48:51.000000000","message":"Done","commit_id":"3699e58b6780b1cc05ddc29a728695d75ff5efbd"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"f0fc8709fe5c8bd449586f6a47e5f8bc4587fd1a","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        exception to indicate that the data it was looking at was stale. The"},{"line_number":215,"context_line":"        combination of both should be enough to enforce consistency."},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"        Once a process changed a router\u0027s status to ALLOCATING, he can be"},{"line_number":218,"context_line":"        treated as if he has obtained a lock."},{"line_number":219,"context_line":"        \"\"\""},{"line_number":220,"context_line":"        try:"},{"line_number":221,"context_line":"            with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9abb7d3a_9864394a","line":218,"range":{"start_line":217,"start_character":64,"end_line":218,"end_character":44},"updated":"2016-05-27 07:55:56.000000000","message":"nit: he -\u003e it","commit_id":"5b807bd176568d7cf642c1357247e0f1b98f8861"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"801ec2e169a436378a36ce0426b4db627d326a97","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        exception to indicate that the data it was looking at was stale. The"},{"line_number":215,"context_line":"        combination of both should be enough to enforce consistency."},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"        Once a process changed a router\u0027s status to ALLOCATING, he can be"},{"line_number":218,"context_line":"        treated as if he has obtained a lock."},{"line_number":219,"context_line":"        \"\"\""},{"line_number":220,"context_line":"        try:"},{"line_number":221,"context_line":"            with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9abb7d3a_dfc15082","line":218,"range":{"start_line":217,"start_character":64,"end_line":218,"end_character":44},"in_reply_to":"9abb7d3a_9864394a","updated":"2016-05-29 09:54:58.000000000","message":"Done","commit_id":"5b807bd176568d7cf642c1357247e0f1b98f8861"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a9fa0f18a364f9f4283ed738d5f78a86443358eb","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        try:"},{"line_number":221,"context_line":"            with context.session.begin(subtransactions\u003dTrue):"},{"line_number":222,"context_line":"                statement \u003d context.session.execute("},{"line_number":223,"context_line":"                    sql.expression.update(Router, synchronize_session\u003dFalse)"},{"line_number":224,"context_line":"                    .where(Router.status \u003d\u003d n_const.ROUTER_STATUS_ACTIVE)"},{"line_number":225,"context_line":"                    .where(Router.id \u003d\u003d router_id)"},{"line_number":226,"context_line":"                    .values({\u0027status\u0027: n_const.ROUTER_STATUS_ALLOCATING}))"}],"source_content_type":"text/x-python","patch_set":6,"id":"bab6814e_1f54481f","line":223,"updated":"2016-05-25 13:55:20.000000000","message":"Probably need a comment explaining why synchronize_session\u003dFalse is important.","commit_id":"5b807bd176568d7cf642c1357247e0f1b98f8861"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"801ec2e169a436378a36ce0426b4db627d326a97","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        try:"},{"line_number":221,"context_line":"            with context.session.begin(subtransactions\u003dTrue):"},{"line_number":222,"context_line":"                statement \u003d context.session.execute("},{"line_number":223,"context_line":"                    sql.expression.update(Router, synchronize_session\u003dFalse)"},{"line_number":224,"context_line":"                    .where(Router.status \u003d\u003d n_const.ROUTER_STATUS_ACTIVE)"},{"line_number":225,"context_line":"                    .where(Router.id \u003d\u003d router_id)"},{"line_number":226,"context_line":"                    .values({\u0027status\u0027: n_const.ROUTER_STATUS_ALLOCATING}))"}],"source_content_type":"text/x-python","patch_set":6,"id":"9abb7d3a_3fbfbcfc","line":223,"in_reply_to":"9abb7d3a_31c1e381","updated":"2016-05-29 09:54:58.000000000","message":"Done. Thanks again Ann! :)","commit_id":"5b807bd176568d7cf642c1357247e0f1b98f8861"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"4bd6c0aec4c558050a0de360753d129a7adef17d","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        try:"},{"line_number":221,"context_line":"            with context.session.begin(subtransactions\u003dTrue):"},{"line_number":222,"context_line":"                statement \u003d context.session.execute("},{"line_number":223,"context_line":"                    sql.expression.update(Router, synchronize_session\u003dFalse)"},{"line_number":224,"context_line":"                    .where(Router.status \u003d\u003d n_const.ROUTER_STATUS_ACTIVE)"},{"line_number":225,"context_line":"                    .where(Router.id \u003d\u003d router_id)"},{"line_number":226,"context_line":"                    .values({\u0027status\u0027: n_const.ROUTER_STATUS_ALLOCATING}))"}],"source_content_type":"text/x-python","patch_set":6,"id":"bab6814e_4026e5ba","line":223,"in_reply_to":"bab6814e_1f54481f","updated":"2016-05-25 16:37:20.000000000","message":"Looking at http://logs.openstack.org/49/317949/6/check/gate-neutron-python27/56dd4d3/console.html#_2016-05-25_14_01_04_428 it looks like this option isn\u0027t valid in that context at all, which would also explain why there are still some sporadic test failures.","commit_id":"5b807bd176568d7cf642c1357247e0f1b98f8861"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"24278ed25b0cd48784c1c924ae58078396be19ee","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        try:"},{"line_number":221,"context_line":"            with context.session.begin(subtransactions\u003dTrue):"},{"line_number":222,"context_line":"                statement \u003d context.session.execute("},{"line_number":223,"context_line":"                    sql.expression.update(Router, synchronize_session\u003dFalse)"},{"line_number":224,"context_line":"                    .where(Router.status \u003d\u003d n_const.ROUTER_STATUS_ACTIVE)"},{"line_number":225,"context_line":"                    .where(Router.id \u003d\u003d router_id)"},{"line_number":226,"context_line":"                    .values({\u0027status\u0027: n_const.ROUTER_STATUS_ALLOCATING}))"}],"source_content_type":"text/x-python","patch_set":6,"id":"bab6814e_5227a511","line":223,"in_reply_to":"bab6814e_4026e5ba","updated":"2016-05-26 14:52:50.000000000","message":"My bad, expression.update does not have synchronize_session http://sqlalchemy.readthedocs.io/en/latest/core/dml.html#sqlalchemy.sql.expression.update \n\nSeems that we need to use just query.update here.","commit_id":"5b807bd176568d7cf642c1357247e0f1b98f8861"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"508643b7fbfcf4536bb11ca43f4af0da9ac9ac58","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        try:"},{"line_number":221,"context_line":"            with context.session.begin(subtransactions\u003dTrue):"},{"line_number":222,"context_line":"                statement \u003d context.session.execute("},{"line_number":223,"context_line":"                    sql.expression.update(Router, synchronize_session\u003dFalse)"},{"line_number":224,"context_line":"                    .where(Router.status \u003d\u003d n_const.ROUTER_STATUS_ACTIVE)"},{"line_number":225,"context_line":"                    .where(Router.id \u003d\u003d router_id)"},{"line_number":226,"context_line":"                    .values({\u0027status\u0027: n_const.ROUTER_STATUS_ALLOCATING}))"}],"source_content_type":"text/x-python","patch_set":6,"id":"9abb7d3a_31c1e381","line":223,"in_reply_to":"bab6814e_5227a511","updated":"2016-05-27 10:16:27.000000000","message":"I checked you will be able to get rowcount without usage of expression","commit_id":"5b807bd176568d7cf642c1357247e0f1b98f8861"}],"neutron/db/l3_hamode_db.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"f0fc8709fe5c8bd449586f6a47e5f8bc4587fd1a","unresolved":false,"context_lines":[{"line_number":627,"context_line":""},{"line_number":628,"context_line":"        if unbound_only:"},{"line_number":629,"context_line":"            query \u003d query.filter("},{"line_number":630,"context_line":"                L3HARouterAgentPortBinding.l3_agent_id.is_(None))"},{"line_number":631,"context_line":""},{"line_number":632,"context_line":"        return query.all()"},{"line_number":633,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9abb7d3a_380c2d42","line":630,"range":{"start_line":630,"start_character":16,"end_line":630,"end_character":54},"updated":"2016-05-27 07:55:56.000000000","message":"could you remind the case when this is an ha port not bound to any agent? Just for my understanding","commit_id":"5b807bd176568d7cf642c1357247e0f1b98f8861"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"801ec2e169a436378a36ce0426b4db627d326a97","unresolved":false,"context_lines":[{"line_number":627,"context_line":""},{"line_number":628,"context_line":"        if unbound_only:"},{"line_number":629,"context_line":"            query \u003d query.filter("},{"line_number":630,"context_line":"                L3HARouterAgentPortBinding.l3_agent_id.is_(None))"},{"line_number":631,"context_line":""},{"line_number":632,"context_line":"        return query.all()"},{"line_number":633,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9abb7d3a_9f2b4830","line":630,"range":{"start_line":630,"start_character":16,"end_line":630,"end_character":54},"in_reply_to":"9abb7d3a_380c2d42","updated":"2016-05-29 09:54:58.000000000","message":"Yes. When you create a new HA router you also pre-create the requisite L3HARouterAgentPortBinding without actually binding it to an agent. This is done in [1] and called by \"_create_ha_interfaces_and_ensure_network\" - so basically whenever you create a router, this is the case.\n\nSince the new logic also calls \"_create_ha_interfaces_and_ensure_network\" when scheduling an under-scheduled router, it\u0027s possible that some of the ports have been bound already (for example, I added a brand new l3 agent and now the controller decided to schedule the router to it). In this case we obviously don\u0027t want to use already-bound ports, so this is why this code is here.\n\n[1]: https://github.com/openstack/neutron/blob/8ca715413915d62fd3c385fac2725887e59e70e8/neutron/db/l3_hamode_db.py#L334","commit_id":"5b807bd176568d7cf642c1357247e0f1b98f8861"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"ff1b09aef3ca84a88f0da080c3c1fae4c366c183","unresolved":false,"context_lines":[{"line_number":401,"context_line":"        if is_ha:"},{"line_number":402,"context_line":"            # This will throw an exception if there aren\u0027t enough agents to"},{"line_number":403,"context_line":"            # handle this HA router"},{"line_number":404,"context_line":"            self.get_number_of_agents_for_scheduling(context)"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"            # we set the allocating status to hide it from the L3 agents"},{"line_number":407,"context_line":"            # until we have created all of the requisite interfaces/networks"}],"source_content_type":"text/x-python","patch_set":24,"id":"ba5201f7_04dc58e3","line":404,"range":{"start_line":404,"start_character":22,"end_line":404,"end_character":23},"updated":"2017-01-02 16:28:10.000000000","message":"I\u0027d change the function name to get_and_check_number_of_agents_for_scheduling, if that wasn\u0027t sooo long :D","commit_id":"5043f274bdad6601712021bb5d1b6f592a106c71"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"203f463f599c0d8f84093eef806439c0c9df0ac3","unresolved":false,"context_lines":[{"line_number":421,"context_line":"                router_dict[\u0027status\u0027] \u003d self._update_router_db("},{"line_number":422,"context_line":"                    context, router_dict[\u0027id\u0027],"},{"line_number":423,"context_line":"                    {\u0027status\u0027: n_const.ROUTER_STATUS_ACTIVE})[\u0027status\u0027]"},{"line_number":424,"context_line":"                self._notify_ha_interfaces_updated(context, router_db.id,"},{"line_number":425,"context_line":"                                                   schedule_routers\u003dFalse)"},{"line_number":426,"context_line":"            except Exception:"},{"line_number":427,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":428,"context_line":"                    self.delete_router(context, router_dict[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":24,"id":"da6895a0_93ca814e","line":425,"range":{"start_line":424,"start_character":0,"end_line":425,"end_character":74},"updated":"2016-10-21 10:31:40.000000000","message":"If no ha interface was created, why still notify it?\nMaybe, change the function name and directly schedule it ?\nOr schedule it like legacy router, which is until set_gateway or add_router_interface was done.","commit_id":"5043f274bdad6601712021bb5d1b6f592a106c71"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"ff1b09aef3ca84a88f0da080c3c1fae4c366c183","unresolved":false,"context_lines":[{"line_number":421,"context_line":"                router_dict[\u0027status\u0027] \u003d self._update_router_db("},{"line_number":422,"context_line":"                    context, router_dict[\u0027id\u0027],"},{"line_number":423,"context_line":"                    {\u0027status\u0027: n_const.ROUTER_STATUS_ACTIVE})[\u0027status\u0027]"},{"line_number":424,"context_line":"                self._notify_ha_interfaces_updated(context, router_db.id,"},{"line_number":425,"context_line":"                                                   schedule_routers\u003dFalse)"},{"line_number":426,"context_line":"            except Exception:"},{"line_number":427,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":428,"context_line":"                    self.delete_router(context, router_dict[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":24,"id":"ba5201f7_87268ab8","line":425,"range":{"start_line":424,"start_character":0,"end_line":425,"end_character":74},"in_reply_to":"ba5da102_5ac22635","updated":"2017-01-02 16:28:10.000000000","message":"Agreed","commit_id":"5043f274bdad6601712021bb5d1b6f592a106c71"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"51c38f5545bffcfdb6b4e3f1e0c8e9f0e01679ab","unresolved":false,"context_lines":[{"line_number":421,"context_line":"                router_dict[\u0027status\u0027] \u003d self._update_router_db("},{"line_number":422,"context_line":"                    context, router_dict[\u0027id\u0027],"},{"line_number":423,"context_line":"                    {\u0027status\u0027: n_const.ROUTER_STATUS_ACTIVE})[\u0027status\u0027]"},{"line_number":424,"context_line":"                self._notify_ha_interfaces_updated(context, router_db.id,"},{"line_number":425,"context_line":"                                                   schedule_routers\u003dFalse)"},{"line_number":426,"context_line":"            except Exception:"},{"line_number":427,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":428,"context_line":"                    self.delete_router(context, router_dict[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":24,"id":"ba5da102_5ac22635","line":425,"range":{"start_line":424,"start_character":0,"end_line":425,"end_character":74},"in_reply_to":"da6895a0_93ca814e","updated":"2016-11-02 13:00:51.000000000","message":"I\u0027ll change the function name.","commit_id":"5043f274bdad6601712021bb5d1b6f592a106c71"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"f7022a9ae36c795de06eed6d573eec228ee50fca","unresolved":false,"context_lines":[{"line_number":378,"context_line":"    @n_utils.transaction_guard"},{"line_number":379,"context_line":"    def _set_vr_id_and_ensure_network(self, context, router_db):"},{"line_number":380,"context_line":"        \"\"\"Attach vr_id to router while tolerating network deletes.\"\"\""},{"line_number":381,"context_line":"        creator \u003d functools.partial(self._set_vr_id,"},{"line_number":382,"context_line":"                                    context, router_db)"},{"line_number":383,"context_line":"        dep_getter \u003d functools.partial(self.get_ha_network,"},{"line_number":384,"context_line":"                                       context, router_db.tenant_id)"}],"source_content_type":"text/x-python","patch_set":25,"id":"5a74a57a_3788c2e7","line":381,"updated":"2016-11-23 10:23:20.000000000","message":"As ports are not created on HA network here, HA network can deleted concurrently by other workers.","commit_id":"ca31fb3393c48ade0c3a009f1b9abd0398be5ec0"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"cfcae86b897883ec17568dd53e27812d2e98592d","unresolved":false,"context_lines":[{"line_number":378,"context_line":"    @n_utils.transaction_guard"},{"line_number":379,"context_line":"    def _set_vr_id_and_ensure_network(self, context, router_db):"},{"line_number":380,"context_line":"        \"\"\"Attach vr_id to router while tolerating network deletes.\"\"\""},{"line_number":381,"context_line":"        creator \u003d functools.partial(self._set_vr_id,"},{"line_number":382,"context_line":"                                    context, router_db)"},{"line_number":383,"context_line":"        dep_getter \u003d functools.partial(self.get_ha_network,"},{"line_number":384,"context_line":"                                       context, router_db.tenant_id)"}],"source_content_type":"text/x-python","patch_set":25,"id":"5a74a57a_705be92e","line":381,"updated":"2016-11-24 10:07:55.000000000","message":"What is the current CASCADE behavior for ha_router_vrid_allocations? If it doesn\u0027t block the network deletion, we should adjust it so it does. It would be a backwards compatible schema change since we already explicitly delete the allocation with \u0027_delete_vr_id_allocation\u0027.","commit_id":"ca31fb3393c48ade0c3a009f1b9abd0398be5ec0"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"c8c2252c3454c8daf5089c89c4a1848a557cce07","unresolved":false,"context_lines":[{"line_number":378,"context_line":"    @n_utils.transaction_guard"},{"line_number":379,"context_line":"    def _set_vr_id_and_ensure_network(self, context, router_db):"},{"line_number":380,"context_line":"        \"\"\"Attach vr_id to router while tolerating network deletes.\"\"\""},{"line_number":381,"context_line":"        creator \u003d functools.partial(self._set_vr_id,"},{"line_number":382,"context_line":"                                    context, router_db)"},{"line_number":383,"context_line":"        dep_getter \u003d functools.partial(self.get_ha_network,"},{"line_number":384,"context_line":"                                       context, router_db.tenant_id)"}],"source_content_type":"text/x-python","patch_set":25,"id":"3a71b18c_b02376a6","line":381,"in_reply_to":"5a74a57a_705be92e","updated":"2016-12-05 12:49:12.000000000","message":"@Anil, will have have a thorough look at this.\n\n@Kevin - L3HARouterVRIdAllocation has a CASCADE for the network: [1]\n\n[1]: https://github.com/openstack/neutron/blob/ef6a3d87891887f810187aabd3783ef9ac3145af/neutron/db/models/l3ha.py#L85","commit_id":"ca31fb3393c48ade0c3a009f1b9abd0398be5ec0"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"5099a8f9018df739d2ac65eea134f2ac8e617886","unresolved":false,"context_lines":[{"line_number":413,"context_line":"            try:"},{"line_number":414,"context_line":"                router_db \u003d self._get_router(context, router_dict[\u0027id\u0027])"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"                self._set_vr_id_and_ensure_network("},{"line_number":417,"context_line":"                    context, router_db)[1]"},{"line_number":418,"context_line":"                router_dict[\u0027ha_vr_id\u0027] \u003d router_db.extra_attributes.ha_vr_id"},{"line_number":419,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"3a71b18c_802709b5","line":416,"range":{"start_line":416,"start_character":21,"end_line":416,"end_character":50},"updated":"2016-12-11 12:12:29.000000000","message":"I\u0027ve added a call to this function from inside the scheduler. If the HA network will be deleted, it will be re-created there during the creation of the HA network and ports. I also moved the retrieval of \u0027ha_vr_id\u0027 to after the schedule, to ensure consistency. What do you guys think?","commit_id":"ca31fb3393c48ade0c3a009f1b9abd0398be5ec0"}],"neutron/scheduler/l3_agent_scheduler.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"f0fc8709fe5c8bd449586f6a47e5f8bc4587fd1a","unresolved":false,"context_lines":[{"line_number":80,"context_line":"            if not count:"},{"line_number":81,"context_line":"                underscheduled_routers.append(router)"},{"line_number":82,"context_line":"            elif router[\u0027ha\u0027] and count \u003c max_agents_for_ha:"},{"line_number":83,"context_line":"                    underscheduled_routers.append(router)"},{"line_number":84,"context_line":"            elif count \u003c 1:"},{"line_number":85,"context_line":"                    underscheduled_routers.append(router)"},{"line_number":86,"context_line":"        return underscheduled_routers"}],"source_content_type":"text/x-python","patch_set":6,"id":"9abb7d3a_e3867a12","line":83,"range":{"start_line":83,"start_character":16,"end_line":83,"end_character":20},"updated":"2016-05-27 07:55:56.000000000","message":"wrong indent","commit_id":"5b807bd176568d7cf642c1357247e0f1b98f8861"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"801ec2e169a436378a36ce0426b4db627d326a97","unresolved":false,"context_lines":[{"line_number":80,"context_line":"            if not count:"},{"line_number":81,"context_line":"                underscheduled_routers.append(router)"},{"line_number":82,"context_line":"            elif router[\u0027ha\u0027] and count \u003c max_agents_for_ha:"},{"line_number":83,"context_line":"                    underscheduled_routers.append(router)"},{"line_number":84,"context_line":"            elif count \u003c 1:"},{"line_number":85,"context_line":"                    underscheduled_routers.append(router)"},{"line_number":86,"context_line":"        return underscheduled_routers"}],"source_content_type":"text/x-python","patch_set":6,"id":"9abb7d3a_ff20944b","line":83,"range":{"start_line":83,"start_character":16,"end_line":83,"end_character":20},"in_reply_to":"9abb7d3a_e3867a12","updated":"2016-05-29 09:54:58.000000000","message":"whoops :O","commit_id":"5b807bd176568d7cf642c1357247e0f1b98f8861"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"c53aeebafb49ae0b659e2a9a8a713782cf01f5b7","unresolved":false,"context_lines":[{"line_number":81,"context_line":"                underscheduled_routers.append(router)"},{"line_number":82,"context_line":"            elif router[\u0027ha\u0027] and count \u003c max_agents_for_ha:"},{"line_number":83,"context_line":"                    underscheduled_routers.append(router)"},{"line_number":84,"context_line":"            elif count \u003c 1:"},{"line_number":85,"context_line":"                    underscheduled_routers.append(router)"},{"line_number":86,"context_line":"        return underscheduled_routers"},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"bab6814e_7531330b","line":84,"updated":"2016-05-25 15:06:48.000000000","message":"Isn\u0027t that redundant? count\u003d0 should be catched by \"if not count\" above already.","commit_id":"5b807bd176568d7cf642c1357247e0f1b98f8861"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"aea41c24b53c8307c5edac387131c51cb7e7d7de","unresolved":false,"context_lines":[{"line_number":81,"context_line":"                underscheduled_routers.append(router)"},{"line_number":82,"context_line":"            elif router[\u0027ha\u0027] and count \u003c max_agents_for_ha:"},{"line_number":83,"context_line":"                    underscheduled_routers.append(router)"},{"line_number":84,"context_line":"            elif count \u003c 1:"},{"line_number":85,"context_line":"                    underscheduled_routers.append(router)"},{"line_number":86,"context_line":"        return underscheduled_routers"},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"bab6814e_e5bf2ea8","line":84,"in_reply_to":"bab6814e_7531330b","updated":"2016-05-25 15:47:57.000000000","message":"Yes. I\u0027ll amend the code. Thanks for the catch.","commit_id":"5b807bd176568d7cf642c1357247e0f1b98f8861"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"6011423e96b149c9e1f9b475804d008e573f84bd","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        self.max_ha_agents \u003d cfg.CONF.max_l3_agents_per_router"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def schedule(self, plugin, context, router_id,"},{"line_number":48,"context_line":"                 candidates\u003dNone, set_allocating\u003dTrue):"},{"line_number":49,"context_line":"        \"\"\"Schedule the router to an active L3 agent."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        Schedule the router only if it is not already scheduled."}],"source_content_type":"text/x-python","patch_set":9,"id":"7aa08908_755dfee8","line":48,"range":{"start_line":48,"start_character":34,"end_line":48,"end_character":48},"updated":"2016-06-06 09:48:17.000000000","message":"I think you can eliminate this parameter, because you can use it as True for HA/non-HA router. Actually, you are using it as True for non-HA router at line 73.","commit_id":"c359e8d38bbbbb040d33516772eb5e8a61e4d020"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"10480acf912e32e98740341bc2bcd6b7f8ef75fc","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        self.max_ha_agents \u003d cfg.CONF.max_l3_agents_per_router"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def schedule(self, plugin, context, router_id,"},{"line_number":48,"context_line":"                 candidates\u003dNone, set_allocating\u003dTrue):"},{"line_number":49,"context_line":"        \"\"\"Schedule the router to an active L3 agent."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        Schedule the router only if it is not already scheduled."}],"source_content_type":"text/x-python","patch_set":9,"id":"1aa78d24_6c4b852c","line":48,"range":{"start_line":48,"start_character":34,"end_line":48,"end_character":48},"in_reply_to":"7aa08908_755dfee8","updated":"2016-07-03 13:32:54.000000000","message":"This parameter is mostly here not to distinguish between HA and non-HA routers, but to skip the CaS check in case a process already has the lock. This is possible in [1] for example - a router is created in ALLOCATING and it goes on to create resources (ha network and ha ports), afterwhich it tries to schedule the router to the agents. If this variable is removed then \u0027set_router_allocating\u0027 will always be called and will fail in such cases.\n\nIn summary, there are HA cases where we\u0027d like to avoid the CaS mechanism and others where we won\u0027t. Renaming the variable to \u0027ha\u003dTrue\u0027 is also bad IMO since DVR might want (in the future) to use this mechanism as well.\n\n[1]: https://review.openstack.org/#/c/317949/9/neutron/db/l3_hamode_db.py@480","commit_id":"c359e8d38bbbbb040d33516772eb5e8a61e4d020"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"6011423e96b149c9e1f9b475804d008e573f84bd","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        max_agents_for_ha \u003d plugin.get_number_of_agents_for_scheduling("},{"line_number":78,"context_line":"            context, raise_if_not_enough\u003dFalse)"},{"line_number":79,"context_line":"        for router, count in plugin.get_routers_l3_agents_count(context):"},{"line_number":80,"context_line":"            if router[\u0027ha\u0027] and count \u003c max_agents_for_ha:"},{"line_number":81,"context_line":"                underscheduled_routers.append(router)"},{"line_number":82,"context_line":"            elif count \u003c 1:"},{"line_number":83,"context_line":"                underscheduled_routers.append(router)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7aa08908_5888f922","line":80,"range":{"start_line":80,"start_character":15,"end_line":80,"end_character":27},"updated":"2016-06-06 09:48:17.000000000","message":"nit: maybe better to use router.get(\u0027ha\u0027) here, in case of the l3-ha extension is not supported.","commit_id":"c359e8d38bbbbb040d33516772eb5e8a61e4d020"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"10480acf912e32e98740341bc2bcd6b7f8ef75fc","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        max_agents_for_ha \u003d plugin.get_number_of_agents_for_scheduling("},{"line_number":78,"context_line":"            context, raise_if_not_enough\u003dFalse)"},{"line_number":79,"context_line":"        for router, count in plugin.get_routers_l3_agents_count(context):"},{"line_number":80,"context_line":"            if router[\u0027ha\u0027] and count \u003c max_agents_for_ha:"},{"line_number":81,"context_line":"                underscheduled_routers.append(router)"},{"line_number":82,"context_line":"            elif count \u003c 1:"},{"line_number":83,"context_line":"                underscheduled_routers.append(router)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1aa78d24_11493a8c","line":80,"range":{"start_line":80,"start_character":15,"end_line":80,"end_character":27},"in_reply_to":"7aa08908_5888f922","updated":"2016-07-03 13:32:54.000000000","message":"Done","commit_id":"c359e8d38bbbbb040d33516772eb5e8a61e4d020"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"d5b5694ecf7cd2731a8175131de369af013ec20b","unresolved":false,"context_lines":[{"line_number":171,"context_line":"            # active any time"},{"line_number":172,"context_line":"            current_l3_agents \u003d plugin.get_l3_agents_hosting_routers("},{"line_number":173,"context_line":"                context, [sync_router[\u0027id\u0027]], admin_state_up\u003dTrue)"},{"line_number":174,"context_line":"            if current_l3_agents and not sync_router.get(\u0027ha\u0027, False):"},{"line_number":175,"context_line":"                LOG.debug(\u0027Router %(router_id)s has already been hosted \u0027"},{"line_number":176,"context_line":"                          \u0027by L3 agent %(agent_id)s\u0027,"},{"line_number":177,"context_line":"                          {\u0027router_id\u0027: sync_router[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a98d1f4_493ee8da","line":174,"range":{"start_line":174,"start_character":32,"end_line":174,"end_character":69},"updated":"2016-10-02 08:28:51.000000000","message":"This shouldn\u0027t be part of this patch.","commit_id":"93928c0fb2a038e93b11e6ff9f26d791f6aaf60d"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"30d4f9084835b12769b5327cd94e7bd22e25f600","unresolved":false,"context_lines":[{"line_number":193,"context_line":"    def _bind_routers(self, plugin, context, routers, l3_agent):"},{"line_number":194,"context_line":"        for router in routers:"},{"line_number":195,"context_line":"            if router.get(\u0027ha\u0027):"},{"line_number":196,"context_line":"                if not self._router_has_binding(context, router[\u0027id\u0027],"},{"line_number":197,"context_line":"                                                l3_agent.id):"},{"line_number":198,"context_line":"                    self.bind_router(plugin, context, router[\u0027id\u0027], l3_agent,"},{"line_number":199,"context_line":"                                     is_manual_scheduling\u003dFalse, is_ha\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":22,"id":"fa6399be_37b7b287","line":196,"updated":"2016-10-12 09:50:00.000000000","message":"Directly call bind_router for ha instead of this check.\n\nYou can also avoid this if-else, and have only bind_router in for loop like below\n\nself.bind_router(plugin, context, router[\u0027id\u0027], l3_agent,\n                 is_ha\u003drouter.get(\u0027ha\u0027))","commit_id":"e892539a0a64103c7a179b040fd330707fa31448"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"f7022a9ae36c795de06eed6d573eec228ee50fca","unresolved":false,"context_lines":[{"line_number":336,"context_line":"            return"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"        try:"},{"line_number":339,"context_line":"            port_binding \u003d utils.create_object_with_dependency("},{"line_number":340,"context_line":"                creator, dep_getter, dep_creator,"},{"line_number":341,"context_line":"                dep_id_attr, dep_deleter)[0]"},{"line_number":342,"context_line":"            with db_api.autonested_transaction(context.session):"}],"source_content_type":"text/x-python","patch_set":25,"id":"5a74a57a_57b0de8b","line":339,"updated":"2016-11-23 10:23:20.000000000","message":"I see an issue with existing code. This code is creating new HA network if not exist, but not updating router\u0027s vr_id with this network id?","commit_id":"ca31fb3393c48ade0c3a009f1b9abd0398be5ec0"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"5099a8f9018df739d2ac65eea134f2ac8e617886","unresolved":false,"context_lines":[{"line_number":336,"context_line":"            return"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"        try:"},{"line_number":339,"context_line":"            port_binding \u003d utils.create_object_with_dependency("},{"line_number":340,"context_line":"                creator, dep_getter, dep_creator,"},{"line_number":341,"context_line":"                dep_id_attr, dep_deleter)[0]"},{"line_number":342,"context_line":"            with db_api.autonested_transaction(context.session):"}],"source_content_type":"text/x-python","patch_set":25,"id":"3a71b18c_a02c059a","line":339,"in_reply_to":"3a71b18c_d03c72ca","updated":"2016-12-11 12:12:29.000000000","message":"Done.","commit_id":"ca31fb3393c48ade0c3a009f1b9abd0398be5ec0"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"c8c2252c3454c8daf5089c89c4a1848a557cce07","unresolved":false,"context_lines":[{"line_number":336,"context_line":"            return"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"        try:"},{"line_number":339,"context_line":"            port_binding \u003d utils.create_object_with_dependency("},{"line_number":340,"context_line":"                creator, dep_getter, dep_creator,"},{"line_number":341,"context_line":"                dep_id_attr, dep_deleter)[0]"},{"line_number":342,"context_line":"            with db_api.autonested_transaction(context.session):"}],"source_content_type":"text/x-python","patch_set":25,"id":"3a71b18c_d03c72ca","line":339,"in_reply_to":"5a74a57a_57b0de8b","updated":"2016-12-05 12:49:12.000000000","message":"Will have a look.","commit_id":"ca31fb3393c48ade0c3a009f1b9abd0398be5ec0"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"91f6502d71a0ddbf1222dedb26b98a17860cf142","unresolved":false,"context_lines":[{"line_number":392,"context_line":"        for agent in chosen_agents:"},{"line_number":393,"context_line":"            if not self.create_ha_port_and_bind(plugin, context, router_id,"},{"line_number":394,"context_line":"                                                tenant_id, agent):"},{"line_number":395,"context_line":"                break"},{"line_number":396,"context_line":""},{"line_number":397,"context_line":"        return chosen_agents"},{"line_number":398,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"1a6eadb0_165aa82a","line":395,"updated":"2016-12-20 09:22:26.000000000","message":"I don\u0027t understand the early break here. How does one HA port existing ensure that all of them for the various agents already exists?\n\nFor example, if two processes are doing this to schedule to agents A, B, and C and process P1 has order [B, A, C] and P2 has order [A, B, C] and they both complete their first port creation, both will early return before getting to \u0027C\u0027.\n\nAm I missing something?","commit_id":"4ecb5ff83d211b3b5785fe9c1d2e5704b4188d56"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"ce466887cd574a1c24b8f88becd28e6020399abe","unresolved":false,"context_lines":[{"line_number":392,"context_line":"        for agent in chosen_agents:"},{"line_number":393,"context_line":"            if not self.create_ha_port_and_bind(plugin, context, router_id,"},{"line_number":394,"context_line":"                                                tenant_id, agent):"},{"line_number":395,"context_line":"                break"},{"line_number":396,"context_line":""},{"line_number":397,"context_line":"        return chosen_agents"},{"line_number":398,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"1a6eadb0_59d1acfa","line":395,"in_reply_to":"1a6eadb0_165aa82a","updated":"2016-12-20 11:07:45.000000000","message":"This code is written under the assumption that the ordering is always constant (sorted by uuid). If that\u0027s incorrect I can change to logic to return the \"successful_agents\" or something similar. Thoughts?","commit_id":"4ecb5ff83d211b3b5785fe9c1d2e5704b4188d56"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"a27750c461e8b9881deccd905e3190a0fdb1bd53","unresolved":false,"context_lines":[{"line_number":392,"context_line":"        for agent in chosen_agents:"},{"line_number":393,"context_line":"            if not self.create_ha_port_and_bind(plugin, context, router_id,"},{"line_number":394,"context_line":"                                                tenant_id, agent):"},{"line_number":395,"context_line":"                break"},{"line_number":396,"context_line":""},{"line_number":397,"context_line":"        return chosen_agents"},{"line_number":398,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"1a6eadb0_8c906497","line":395,"in_reply_to":"1a6eadb0_59d1acfa","updated":"2016-12-20 11:17:24.000000000","message":"http://git.openstack.org/cgit/openstack/neutron/tree/neutron/scheduler/l3_agent_scheduler.py#n425\n\nI recommend just calling the function for all chosen_agents regardless of whether some are encountered that are already done to ensure all get completed.","commit_id":"4ecb5ff83d211b3b5785fe9c1d2e5704b4188d56"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"088266a598726249607fcead516ac0ce0e3211bb","unresolved":false,"context_lines":[{"line_number":392,"context_line":"        for agent in chosen_agents:"},{"line_number":393,"context_line":"            if not self.create_ha_port_and_bind(plugin, context, router_id,"},{"line_number":394,"context_line":"                                                tenant_id, agent):"},{"line_number":395,"context_line":"                break"},{"line_number":396,"context_line":""},{"line_number":397,"context_line":"        return chosen_agents"},{"line_number":398,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"ba5201f7_a4173a53","line":395,"in_reply_to":"1a6eadb0_8c906497","updated":"2016-12-29 09:29:49.000000000","message":"Done","commit_id":"4ecb5ff83d211b3b5785fe9c1d2e5704b4188d56"}],"neutron/tests/unit/db/test_agentschedulers_db.py":[{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"3d4f0de6746bdcc07884c7fba1132753ee6efa99","unresolved":false,"context_lines":[{"line_number":894,"context_line":"        l3_rpc_cb \u003d l3_rpc.L3RpcCallback()"},{"line_number":895,"context_line":"        with self.router() as router1:"},{"line_number":896,"context_line":"            hosta_id \u003d helpers.register_l3_agent(host\u003dL3_HOSTA).id"},{"line_number":897,"context_line":"            l3_rpc_cb.get_router_ids(self.adminContext, host\u003dL3_HOSTA)"},{"line_number":898,"context_line":"            self._disable_agent(hosta_id, admin_state_up\u003dFalse)"},{"line_number":899,"context_line":"            with self.router() as router2:"},{"line_number":900,"context_line":"                hostb_id \u003d helpers.register_l3_agent(host\u003dL3_HOSTB).id"}],"source_content_type":"text/x-python","patch_set":11,"id":"1aa78d24_f7257eae","line":897,"range":{"start_line":897,"start_character":22,"end_line":897,"end_character":36},"updated":"2016-07-03 15:13:50.000000000","message":"Make sure these should be here - and remove them if they shouldn\u0027t.","commit_id":"91f6f6e4b28e6f2335eb259faaca07b6be4bc40c"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"3d4f0de6746bdcc07884c7fba1132753ee6efa99","unresolved":false,"context_lines":[{"line_number":1020,"context_line":"                self.router() as router2,\\"},{"line_number":1021,"context_line":"                self.subnet() as subnet1,\\"},{"line_number":1022,"context_line":"                self.subnet(cidr\u003d\u002710.0.3.0/24\u0027) as subnet2:"},{"line_number":1023,"context_line":"            agent \u003d helpers.register_l3_agent("},{"line_number":1024,"context_line":"                host\u003dL3_HOSTA, router_id\u003drouter1[\u0027router\u0027][\u0027id\u0027])"},{"line_number":1025,"context_line":"            self._router_interface_action(\u0027add\u0027,"},{"line_number":1026,"context_line":"                                          router1[\u0027router\u0027][\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":11,"id":"1aa78d24_971a3a6d","line":1023,"range":{"start_line":1023,"start_character":28,"end_line":1023,"end_character":45},"updated":"2016-07-03 15:13:50.000000000","message":"This fails because of some change that was made during the rebase.","commit_id":"91f6f6e4b28e6f2335eb259faaca07b6be4bc40c"}]}
