)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"39c3ff984b6cf04c9fce1d84dff36d57ad41c079","unresolved":false,"context_lines":[{"line_number":11,"context_line":"different code-paths, each dealing with a different case (unscheduled"},{"line_number":12,"context_line":"routers vs underscheduled routers), in addition to the API-initiated"},{"line_number":13,"context_line":"schedule() logic. This patch removes the 2 code-paths in favor of moving"},{"line_number":14,"context_line":"most of the logic into under schedule(). While the result is a slightly"},{"line_number":15,"context_line":"longer schedule(), the benefit is that a lot of the previous"},{"line_number":16,"context_line":"unmaintainable code-paths of auto_schedule_routers() is now removed."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"ba5201f7_daae55e5","line":14,"range":{"start_line":14,"start_character":23,"end_line":14,"end_character":28},"updated":"2017-01-04 21:30:59.000000000","message":"nit: delete","commit_id":"0492f092904379e5904f17a643d3f7fe397ab79c"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"ade08da49aa3b8be6acabbaef550fd384c5bf304","unresolved":false,"context_lines":[{"line_number":11,"context_line":"different code-paths, each dealing with a different case (unscheduled"},{"line_number":12,"context_line":"routers vs underscheduled routers), in addition to the API-initiated"},{"line_number":13,"context_line":"schedule() logic. This patch removes the 2 code-paths in favor of moving"},{"line_number":14,"context_line":"most of the logic into under schedule(). While the result is a slightly"},{"line_number":15,"context_line":"longer schedule(), the benefit is that a lot of the previous"},{"line_number":16,"context_line":"unmaintainable code-paths of auto_schedule_routers() is now removed."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"ba5201f7_0f567305","line":14,"range":{"start_line":14,"start_character":23,"end_line":14,"end_character":28},"in_reply_to":"ba5201f7_daae55e5","updated":"2017-01-08 14:25:54.000000000","message":"Done","commit_id":"0492f092904379e5904f17a643d3f7fe397ab79c"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"39c3ff984b6cf04c9fce1d84dff36d57ad41c079","unresolved":false,"context_lines":[{"line_number":13,"context_line":"schedule() logic. This patch removes the 2 code-paths in favor of moving"},{"line_number":14,"context_line":"most of the logic into under schedule(). While the result is a slightly"},{"line_number":15,"context_line":"longer schedule(), the benefit is that a lot of the previous"},{"line_number":16,"context_line":"unmaintainable code-paths of auto_schedule_routers() is now removed."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Yay! :D"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"ba5201f7_5a898574","line":16,"range":{"start_line":16,"start_character":53,"end_line":16,"end_character":55},"updated":"2017-01-04 21:30:59.000000000","message":"nit: s/are","commit_id":"0492f092904379e5904f17a643d3f7fe397ab79c"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"ade08da49aa3b8be6acabbaef550fd384c5bf304","unresolved":false,"context_lines":[{"line_number":13,"context_line":"schedule() logic. This patch removes the 2 code-paths in favor of moving"},{"line_number":14,"context_line":"most of the logic into under schedule(). While the result is a slightly"},{"line_number":15,"context_line":"longer schedule(), the benefit is that a lot of the previous"},{"line_number":16,"context_line":"unmaintainable code-paths of auto_schedule_routers() is now removed."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Yay! :D"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"ba5201f7_2f597735","line":16,"range":{"start_line":16,"start_character":53,"end_line":16,"end_character":55},"in_reply_to":"ba5201f7_5a898574","updated":"2017-01-08 14:25:54.000000000","message":"Done","commit_id":"0492f092904379e5904f17a643d3f7fe397ab79c"}],"neutron/db/l3_agentschedulers_db.py":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"cfd699cf0adbd5dda3ec0dd3353c08869a23f7c2","unresolved":false,"context_lines":[{"line_number":422,"context_line":"        query \u003d (context.session.query(l3_model.Router, sub_query.c.count)."},{"line_number":423,"context_line":"                 outerjoin(sub_query))"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":"        return [(self._make_router_dict(router), agent_count) if agent_count"},{"line_number":426,"context_line":"                else (self._make_router_dict(router), 0)"},{"line_number":427,"context_line":"                for router, agent_count in query]"},{"line_number":428,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_2f433714","line":425,"updated":"2017-01-08 14:48:13.000000000","message":"unless i missed something, the user of this is _get_underscheduled_routers and the user of _get_underscheduled_routers ends up only using the router ID. If so, we should skip _make_router_dict entirely and just return router_id, agent_count.","commit_id":"6f34d0d5372261266b9b38c694665362d8eaa9ed"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"ddbef341fff5ef7afd6f817182338c4f17bf6204","unresolved":false,"context_lines":[{"line_number":422,"context_line":"        query \u003d (context.session.query(l3_model.Router, sub_query.c.count)."},{"line_number":423,"context_line":"                 outerjoin(sub_query))"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":"        return [(self._make_router_dict(router), agent_count) if agent_count"},{"line_number":426,"context_line":"                else (self._make_router_dict(router), 0)"},{"line_number":427,"context_line":"                for router, agent_count in query]"},{"line_number":428,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_6f937f5b","line":425,"in_reply_to":"ba5201f7_2f433714","updated":"2017-01-08 15:04:48.000000000","message":"https://review.openstack.org/#/c/386077/5/neutron/scheduler/l3_agent_scheduler.py@121 access some of the data that the _make_router_dict makes available, and later down the line other functions get the router_dict here for other information (such as \u0027distributed\u0027 in https://github.com/openstack/neutron/blob/master/neutron/db/l3_agentschedulers_db.py#L440). So this should stay as it is...","commit_id":"6f34d0d5372261266b9b38c694665362d8eaa9ed"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"1599d31ac3461f5e8ac8a0155d9b80f8bc79b082","unresolved":false,"context_lines":[{"line_number":422,"context_line":"        query \u003d (context.session.query(l3_model.Router, sub_query.c.count)."},{"line_number":423,"context_line":"                 outerjoin(sub_query))"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":"        return [(self._make_router_dict(router), agent_count) if agent_count"},{"line_number":426,"context_line":"                else (self._make_router_dict(router), 0)"},{"line_number":427,"context_line":"                for router, agent_count in query]"},{"line_number":428,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_6fa1bf93","line":425,"in_reply_to":"ba5201f7_6f937f5b","updated":"2017-01-08 15:21:28.000000000","message":"We should try to get rid of it in the future somehow. This is going to be a huge query to load the router interfaces and whatnot...","commit_id":"6f34d0d5372261266b9b38c694665362d8eaa9ed"}],"neutron/db/l3_hamode_db.py":[{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"88bbb6011b1bfc25f3580ab5ff63d9073486b5d2","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":"                ha_network \u003d 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":1,"id":"fa6399be_b50d29ea","side":"PARENT","line":416,"range":{"start_line":416,"start_character":16,"end_line":416,"end_character":29},"updated":"2016-10-13 17:12:59.000000000","message":"Interesting that this variable was not used before","commit_id":"31826a735c9a1d8291e82193a4a2bafb994b585e"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"a64d02e5f78becd8b0cb13c83415ccaf2d042ce4","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":"                ha_network \u003d 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":1,"id":"fa6399be_1afdce6d","side":"PARENT","line":416,"range":{"start_line":416,"start_character":16,"end_line":416,"end_character":29},"in_reply_to":"fa6399be_b50d29ea","updated":"2016-10-17 07:55:47.000000000","message":"It wasn\u0027t, and it failed the previous patch\u0027s pep8.. Oops :\u003c","commit_id":"31826a735c9a1d8291e82193a4a2bafb994b585e"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"45b3bb6aad44146fc2ae2892dea5ab081d913c09","unresolved":false,"context_lines":[{"line_number":258,"context_line":"        return ha_network"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    def get_number_of_agents_for_scheduling(self, context,"},{"line_number":261,"context_line":"                                            raise_if_not_enough\u003dTrue):"},{"line_number":262,"context_line":"        \"\"\"Return the number of agents on which the router will be scheduled\"\"\""},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"        num_agents \u003d len(self.get_l3_agents(context, active\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a461143_d0c4d541","line":261,"updated":"2017-01-26 08:13:46.000000000","message":"excuse my stupidity, but what does \u0027raise_if_not_enough\u0027 do?","commit_id":"9f0c8f1daacc56888a9f72bd307dd3034bef3d92"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"34b5bb0d37acee92b1e4bb0e4e196bb913ce09b5","unresolved":false,"context_lines":[{"line_number":258,"context_line":"        return ha_network"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    def get_number_of_agents_for_scheduling(self, context,"},{"line_number":261,"context_line":"                                            raise_if_not_enough\u003dTrue):"},{"line_number":262,"context_line":"        \"\"\"Return the number of agents on which the router will be scheduled\"\"\""},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"        num_agents \u003d len(self.get_l3_agents(context, active\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a461143_f0ef11ae","line":261,"in_reply_to":"3a461143_d0c4d541","updated":"2017-01-26 08:16:28.000000000","message":"Ah sorry, this is a leftover from a previous patchset.","commit_id":"9f0c8f1daacc56888a9f72bd307dd3034bef3d92"}],"neutron/db/l3_hascheduler_db.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"39c3ff984b6cf04c9fce1d84dff36d57ad41c079","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        # Postgres requires every column in the select to be present in"},{"line_number":39,"context_line":"        # the group by statement when using an aggregate function."},{"line_number":40,"context_line":"        # One solution is to generate a subquery and join it with the desired"},{"line_number":41,"context_line":"        # columns."},{"line_number":42,"context_line":"        binding_model \u003d rb_model.RouterL3AgentBinding"},{"line_number":43,"context_line":"        sub_query \u003d (context.session.query("},{"line_number":44,"context_line":"            binding_model.router_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5201f7_1a545d1f","side":"PARENT","line":41,"updated":"2017-01-04 21:30:59.000000000","message":"I think you should copy this comment intact to the new location so no information is lost.","commit_id":"d0a2c1650a35ba720027811432a12d4575615737"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"ade08da49aa3b8be6acabbaef550fd384c5bf304","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        # Postgres requires every column in the select to be present in"},{"line_number":39,"context_line":"        # the group by statement when using an aggregate function."},{"line_number":40,"context_line":"        # One solution is to generate a subquery and join it with the desired"},{"line_number":41,"context_line":"        # columns."},{"line_number":42,"context_line":"        binding_model \u003d rb_model.RouterL3AgentBinding"},{"line_number":43,"context_line":"        sub_query \u003d (context.session.query("},{"line_number":44,"context_line":"            binding_model.router_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5201f7_af172743","side":"PARENT","line":41,"in_reply_to":"ba5201f7_1a545d1f","updated":"2017-01-08 14:25:54.000000000","message":"Done","commit_id":"d0a2c1650a35ba720027811432a12d4575615737"}],"neutron/scheduler/l3_agent_scheduler.py":[{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"88bbb6011b1bfc25f3580ab5ff63d9073486b5d2","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        return [r for r in routers if r[\u0027id\u0027] not in ids_to_discard]"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def auto_schedule_routers(self, plugin, context, host, router_ids):"},{"line_number":131,"context_line":"        \"\"\"Schedule non-hosted routers to L3 Agent running on host."},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        If router_ids is given, each router in router_ids is scheduled"},{"line_number":134,"context_line":"        if it is not scheduled yet. Otherwise all unscheduled routers"},{"line_number":135,"context_line":"        are scheduled."},{"line_number":136,"context_line":"        Do not schedule the routers which are hosted already"},{"line_number":137,"context_line":"        by active l3 agents."},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"        :returns: True if routers have been successfully assigned to host"},{"line_number":140,"context_line":"        \"\"\""},{"line_number":141,"context_line":"        l3_agent \u003d plugin.get_enabled_agent_on_host("},{"line_number":142,"context_line":"            context, lib_const.AGENT_TYPE_L3, host)"},{"line_number":143,"context_line":"        if not l3_agent:"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_55f84d49","side":"PARENT","line":140,"range":{"start_line":131,"start_character":8,"end_line":140,"end_character":11},"updated":"2016-10-13 17:12:59.000000000","message":"Shouldn\u0027t be better to update the documentation instead of removing it.","commit_id":"31826a735c9a1d8291e82193a4a2bafb994b585e"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"a64d02e5f78becd8b0cb13c83415ccaf2d042ce4","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        return [r for r in routers if r[\u0027id\u0027] not in ids_to_discard]"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def auto_schedule_routers(self, plugin, context, host, router_ids):"},{"line_number":131,"context_line":"        \"\"\"Schedule non-hosted routers to L3 Agent running on host."},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        If router_ids is given, each router in router_ids is scheduled"},{"line_number":134,"context_line":"        if it is not scheduled yet. Otherwise all unscheduled routers"},{"line_number":135,"context_line":"        are scheduled."},{"line_number":136,"context_line":"        Do not schedule the routers which are hosted already"},{"line_number":137,"context_line":"        by active l3 agents."},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"        :returns: True if routers have been successfully assigned to host"},{"line_number":140,"context_line":"        \"\"\""},{"line_number":141,"context_line":"        l3_agent \u003d plugin.get_enabled_agent_on_host("},{"line_number":142,"context_line":"            context, lib_const.AGENT_TYPE_L3, host)"},{"line_number":143,"context_line":"        if not l3_agent:"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_ba1a22c4","side":"PARENT","line":140,"range":{"start_line":131,"start_character":8,"end_line":140,"end_character":11},"in_reply_to":"fa6399be_55f84d49","updated":"2016-10-17 07:55:47.000000000","message":"Done","commit_id":"31826a735c9a1d8291e82193a4a2bafb994b585e"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"88bbb6011b1bfc25f3580ab5ff63d9073486b5d2","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    def schedule(self, plugin, context, router_id, candidates\u003dNone):"},{"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."},{"line_number":52,"context_line":"        \"\"\""},{"line_number":53,"context_line":"        return self._schedule_router("},{"line_number":54,"context_line":"            plugin, context, router_id, candidates\u003dcandidates)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_35f11996","line":51,"range":{"start_line":51,"start_character":8,"end_line":51,"end_character":64},"updated":"2016-10-13 17:12:59.000000000","message":"nit: given that you are proving a specific implementation, maybe it should be valuable to mention which are you providing","commit_id":"191023d172763e9deebd374a7d6d7818936be93f"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"a64d02e5f78becd8b0cb13c83415ccaf2d042ce4","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    def schedule(self, plugin, context, router_id, candidates\u003dNone):"},{"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."},{"line_number":52,"context_line":"        \"\"\""},{"line_number":53,"context_line":"        return self._schedule_router("},{"line_number":54,"context_line":"            plugin, context, router_id, candidates\u003dcandidates)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_9a48fecd","line":51,"range":{"start_line":51,"start_character":8,"end_line":51,"end_character":64},"in_reply_to":"fa6399be_35f11996","updated":"2016-10-17 07:55:47.000000000","message":"This function is consistent throughout all the classes here - and in each case the scheduling doesn\u0027t re-schedule a router to an already-scheduled agent.","commit_id":"191023d172763e9deebd374a7d6d7818936be93f"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"88bbb6011b1bfc25f3580ab5ff63d9073486b5d2","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            context, raise_if_not_enough\u003dFalse)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        for router, count in plugin.get_routers_l3_agents_count(context):"},{"line_number":97,"context_line":"            if count \u003c 1:"},{"line_number":98,"context_line":"                underscheduled_routers.append(router)"},{"line_number":99,"context_line":"            elif router.get(\u0027ha\u0027, False) and count \u003c max_agents_for_ha:"},{"line_number":100,"context_line":"                underscheduled_routers.append(router)"},{"line_number":101,"context_line":"        return underscheduled_routers"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def _get_candidates(self, plugin, context, sync_router):"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_183a8ccc","line":100,"range":{"start_line":97,"start_character":12,"end_line":100,"end_character":53},"updated":"2016-10-13 17:12:59.000000000","message":"nit: shouldn\u0027t be better to include an \"or\" here?","commit_id":"191023d172763e9deebd374a7d6d7818936be93f"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"a64d02e5f78becd8b0cb13c83415ccaf2d042ce4","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            context, raise_if_not_enough\u003dFalse)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        for router, count in plugin.get_routers_l3_agents_count(context):"},{"line_number":97,"context_line":"            if count \u003c 1:"},{"line_number":98,"context_line":"                underscheduled_routers.append(router)"},{"line_number":99,"context_line":"            elif router.get(\u0027ha\u0027, False) and count \u003c max_agents_for_ha:"},{"line_number":100,"context_line":"                underscheduled_routers.append(router)"},{"line_number":101,"context_line":"        return underscheduled_routers"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def _get_candidates(self, plugin, context, sync_router):"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_1a594e8e","line":100,"range":{"start_line":97,"start_character":12,"end_line":100,"end_character":53},"in_reply_to":"fa6399be_183a8ccc","updated":"2016-10-17 07:55:47.000000000","message":"It might :)","commit_id":"191023d172763e9deebd374a7d6d7818936be93f"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"39c3ff984b6cf04c9fce1d84dff36d57ad41c079","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        An under-scheduled router is a router that is either completely"},{"line_number":81,"context_line":"        un-scheduled (scheduled to 0 agents), or an HA router that is"},{"line_number":82,"context_line":"        under-scheduled (scheduled to less than max_l3_agents configuration"},{"line_number":83,"context_line":"        option. The function finds all the under-scheduled and schedules it."},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        :param host: if unspecified, under-scheduled routers are scheduled to"},{"line_number":86,"context_line":"                     all agents (not necessarily from the requesting host). If"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5201f7_35285286","line":83,"range":{"start_line":83,"start_character":59,"end_line":83,"end_character":75},"updated":"2017-01-04 21:30:59.000000000","message":"s/routers and schedules them","commit_id":"0492f092904379e5904f17a643d3f7fe397ab79c"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"ade08da49aa3b8be6acabbaef550fd384c5bf304","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        An under-scheduled router is a router that is either completely"},{"line_number":81,"context_line":"        un-scheduled (scheduled to 0 agents), or an HA router that is"},{"line_number":82,"context_line":"        under-scheduled (scheduled to less than max_l3_agents configuration"},{"line_number":83,"context_line":"        option. The function finds all the under-scheduled and schedules it."},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        :param host: if unspecified, under-scheduled routers are scheduled to"},{"line_number":86,"context_line":"                     all agents (not necessarily from the requesting host). If"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5201f7_ef520f12","line":83,"range":{"start_line":83,"start_character":59,"end_line":83,"end_character":75},"in_reply_to":"ba5201f7_35285286","updated":"2017-01-08 14:25:54.000000000","message":"Done","commit_id":"0492f092904379e5904f17a643d3f7fe397ab79c"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"39c3ff984b6cf04c9fce1d84dff36d57ad41c079","unresolved":false,"context_lines":[{"line_number":87,"context_line":"                     specified, under-scheduled routers are scheduled only to"},{"line_number":88,"context_line":"                     the agent on \u0027host\u0027."},{"line_number":89,"context_line":"        :param router_ids: ignored (backwards compatible, will be removed"},{"line_number":90,"context_line":"                           in future versions)."},{"line_number":91,"context_line":"        \"\"\""},{"line_number":92,"context_line":"        l3_agent \u003d plugin.get_enabled_agent_on_host("},{"line_number":93,"context_line":"            context, lib_const.AGENT_TYPE_L3, host)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5201f7_5567964c","line":90,"updated":"2017-01-04 21:30:59.000000000","message":"We should probably add the word \u0027deprecated\u0027 here, policy.py has a good sentence:\n\n    :param plugin: currently unused and deprecated.\n        Kept for backward compatibility.\n\nAlso, two other things.\n\n1) If it\u0027s going to be deprecated, we should clean-up all in-tree callers and default router_ids\u003dNone\n\n2) If we do #1, then we can add a warning like:\n\nfrom oslo_log import versionutils\n\nif router_ids is not None:\n    versionutils.report_deprecated_feature(\n        LOG,\n        _LW(\u0027Passing router_ids has no effect on L3 agent \u0027\n            \u0027scheduling. This is deprecated and will be \u0027\n            \u0027removed in the Pike release.\u0027))\n\nOr maybe Queens?","commit_id":"0492f092904379e5904f17a643d3f7fe397ab79c"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"ade08da49aa3b8be6acabbaef550fd384c5bf304","unresolved":false,"context_lines":[{"line_number":87,"context_line":"                     specified, under-scheduled routers are scheduled only to"},{"line_number":88,"context_line":"                     the agent on \u0027host\u0027."},{"line_number":89,"context_line":"        :param router_ids: ignored (backwards compatible, will be removed"},{"line_number":90,"context_line":"                           in future versions)."},{"line_number":91,"context_line":"        \"\"\""},{"line_number":92,"context_line":"        l3_agent \u003d plugin.get_enabled_agent_on_host("},{"line_number":93,"context_line":"            context, lib_const.AGENT_TYPE_L3, host)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5201f7_6f38dfd3","line":90,"in_reply_to":"ba5201f7_5567964c","updated":"2017-01-08 14:25:54.000000000","message":"Done","commit_id":"0492f092904379e5904f17a643d3f7fe397ab79c"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"cfd699cf0adbd5dda3ec0dd3353c08869a23f7c2","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            plugin, context, underscheduled_routers, l3_agent)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        for router in target_routers:"},{"line_number":112,"context_line":"            self.schedule(plugin, context, router[\u0027id\u0027], candidates\u003d[l3_agent])"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def _get_underscheduled_routers(self, plugin, context):"},{"line_number":115,"context_line":"        underscheduled_routers \u003d []"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_8f5423ca","line":112,"updated":"2017-01-08 14:48:13.000000000","message":"Doesn\u0027t this mean the first l3 agent that calls this function will get every single unscheduled router assigned to it and we essentially ignore the schedulers? We\u0027re only passing one candidate so they don\u0027t have much to choose from.","commit_id":"6f34d0d5372261266b9b38c694665362d8eaa9ed"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"1599d31ac3461f5e8ac8a0155d9b80f8bc79b082","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            plugin, context, underscheduled_routers, l3_agent)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        for router in target_routers:"},{"line_number":112,"context_line":"            self.schedule(plugin, context, router[\u0027id\u0027], candidates\u003d[l3_agent])"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def _get_underscheduled_routers(self, plugin, context):"},{"line_number":115,"context_line":"        underscheduled_routers \u003d []"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_8fda6315","line":112,"in_reply_to":"ba5201f7_6fe53f07","updated":"2017-01-08 15:21:28.000000000","message":"Ack.","commit_id":"6f34d0d5372261266b9b38c694665362d8eaa9ed"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"ddbef341fff5ef7afd6f817182338c4f17bf6204","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            plugin, context, underscheduled_routers, l3_agent)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        for router in target_routers:"},{"line_number":112,"context_line":"            self.schedule(plugin, context, router[\u0027id\u0027], candidates\u003d[l3_agent])"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def _get_underscheduled_routers(self, plugin, context):"},{"line_number":115,"context_line":"        underscheduled_routers \u003d []"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_6fe53f07","line":112,"in_reply_to":"ba5201f7_8f5423ca","updated":"2017-01-08 15:04:48.000000000","message":"Yes, but that\u0027s the way it\u0027s currently working - the current auto_schedule_router gets a host and specifically runs either _schedule_ha_routers_to_additional_agent (with l3_agent matching the given host) or _get_routers_can_schedule (with l3_agent ...). This just unifies both logics.\n\nThe idea is that if there are 3 agents and now I\u0027ve added a 4th, we\u0027ll want to put as many routers on it as possible, so as to distribute the load better.","commit_id":"6f34d0d5372261266b9b38c694665362d8eaa9ed"}]}
