)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"262473b80b5c50ce04ee78ce594e324ace946a79","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix regression in routers auto scheduling logic"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Routers auto scheduling works when an l3 agent starst and performs"},{"line_number":10,"context_line":"a full sync with neutron server. Neutron server looks for all"},{"line_number":11,"context_line":"unscheduled routers and schedules them to that agent if applicable."},{"line_number":12,"context_line":"This was broken by commit 0e97feb0f30bc0ef6f4fe041cb41b7aa81042263"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a5ae5dd_4c3b0a9d","line":9,"range":{"start_line":9,"start_character":47,"end_line":9,"end_character":53},"updated":"2016-02-04 05:47:55.000000000","message":"starts","commit_id":"f8584cc22f353f0beee53257c120e7855a0122e8"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"262473b80b5c50ce04ee78ce594e324ace946a79","unresolved":false,"context_lines":[{"line_number":11,"context_line":"unscheduled routers and schedules them to that agent if applicable."},{"line_number":12,"context_line":"This was broken by commit 0e97feb0f30bc0ef6f4fe041cb41b7aa81042263"},{"line_number":13,"context_line":"which changed full sync logic a bit: now l3 agent requests all ids"},{"line_number":14,"context_line":"of routers scheduled to it first. get_router_ids() didb\u0027t call"},{"line_number":15,"context_line":"routers auto scheduling which caused the regression."},{"line_number":16,"context_line":"This patch adds routers auto scheduling to get_router_ids()."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a5ae5dd_0c451216","line":14,"range":{"start_line":14,"start_character":57,"end_line":14,"end_character":58},"updated":"2016-02-04 05:47:55.000000000","message":"typo: didn\u0027t","commit_id":"f8584cc22f353f0beee53257c120e7855a0122e8"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"262473b80b5c50ce04ee78ce594e324ace946a79","unresolved":false,"context_lines":[{"line_number":14,"context_line":"of routers scheduled to it first. get_router_ids() didb\u0027t call"},{"line_number":15,"context_line":"routers auto scheduling which caused the regression."},{"line_number":16,"context_line":"This patch adds routers auto scheduling to get_router_ids()."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Closes-Bug: #1541348"},{"line_number":19,"context_line":"Change-Id: If6d4e7b3a4839c93296985e169631e5583d9fa12"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a5ae5dd_6c5606d4","line":17,"updated":"2016-02-04 05:47:55.000000000","message":"Thanks for adding the patch, I was seeing the tests fail in my setup where routers where not created in the compute node.","commit_id":"f8584cc22f353f0beee53257c120e7855a0122e8"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"8f719d373210c6ec0de96e5449aa564809bbae8c","unresolved":false,"context_lines":[{"line_number":14,"context_line":"of routers scheduled to it first. get_router_ids() didb\u0027t call"},{"line_number":15,"context_line":"routers auto scheduling which caused the regression."},{"line_number":16,"context_line":"This patch adds routers auto scheduling to get_router_ids()."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Closes-Bug: #1541348"},{"line_number":19,"context_line":"Change-Id: If6d4e7b3a4839c93296985e169631e5583d9fa12"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a5ae5dd_ea9f364e","line":17,"in_reply_to":"5a5ae5dd_6c5606d4","updated":"2016-02-04 07:00:01.000000000","message":"Oleg, I am still seeing issues with this patch, I don\u0027t see the router come up on the \"dvr\" agent node.","commit_id":"f8584cc22f353f0beee53257c120e7855a0122e8"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"9c692414fc5facb10ed9d0ca98a53ebe9fe94f40","unresolved":false,"context_lines":[{"line_number":14,"context_line":"of routers scheduled to it first. get_router_ids() didb\u0027t call"},{"line_number":15,"context_line":"routers auto scheduling which caused the regression."},{"line_number":16,"context_line":"This patch adds routers auto scheduling to get_router_ids()."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Closes-Bug: #1541348"},{"line_number":19,"context_line":"Change-Id: If6d4e7b3a4839c93296985e169631e5583d9fa12"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a5ae5dd_a0ee3fb2","line":17,"in_reply_to":"5a5ae5dd_ea9f364e","updated":"2016-02-04 08:10:03.000000000","message":"Ignore this comment.","commit_id":"f8584cc22f353f0beee53257c120e7855a0122e8"}],"neutron/api/rpc/handlers/l3_rpc.py":[{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"262473b80b5c50ce04ee78ce594e324ace946a79","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        return self._l3plugin"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def get_router_ids(self, context, host):"},{"line_number":66,"context_line":"        \"\"\"Returns IDs of routers scheduled to l3 agent on \u003chost\u003e\"\"\""},{"line_number":67,"context_line":"        if utils.is_extension_supported("},{"line_number":68,"context_line":"                self.l3plugin, constants.L3_AGENT_SCHEDULER_EXT_ALIAS):"},{"line_number":69,"context_line":"            if cfg.CONF.router_auto_schedule:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_acfabebb","line":66,"range":{"start_line":66,"start_character":8,"end_line":66,"end_character":68},"updated":"2016-02-04 05:47:55.000000000","message":"Should we change the doc string here since it not only returns the router_ids but also schedules.","commit_id":"f8584cc22f353f0beee53257c120e7855a0122e8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2bc1321dea4d35a113f2f5b5499d4e90e128f244","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        if utils.is_extension_supported("},{"line_number":72,"context_line":"                self.l3plugin, constants.L3_AGENT_SCHEDULER_EXT_ALIAS):"},{"line_number":73,"context_line":"            if cfg.CONF.router_auto_schedule:"},{"line_number":74,"context_line":"                self.l3plugin.auto_schedule_routers(context, host,"},{"line_number":75,"context_line":"                                                    router_ids\u003dNone)"},{"line_number":76,"context_line":"        return self.l3plugin.list_router_ids_on_host(context, host)"},{"line_number":77,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_a4de330f","line":74,"range":{"start_line":74,"start_character":30,"end_line":74,"end_character":51},"updated":"2016-02-04 17:31:11.000000000","message":"This does seem like an odd side-effect of a get_router_ids call.  I\u0027m not rejecting it but just wondering if there are any better alternatives.","commit_id":"51adde5eb93993fbd24c14daab16ade74565978f"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"87b790ae70b394041f51bb732995b5a6f8fd2a58","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        if utils.is_extension_supported("},{"line_number":72,"context_line":"                self.l3plugin, constants.L3_AGENT_SCHEDULER_EXT_ALIAS):"},{"line_number":73,"context_line":"            if cfg.CONF.router_auto_schedule:"},{"line_number":74,"context_line":"                self.l3plugin.auto_schedule_routers(context, host,"},{"line_number":75,"context_line":"                                                    router_ids\u003dNone)"},{"line_number":76,"context_line":"        return self.l3plugin.list_router_ids_on_host(context, host)"},{"line_number":77,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_fb8edc77","line":74,"range":{"start_line":74,"start_character":30,"end_line":74,"end_character":51},"in_reply_to":"5a5ae5dd_a4de330f","updated":"2016-02-05 16:26:36.000000000","message":"This is how autoscheduling is designed: when some agent asks for routers, server will schedule unscheduled routers to it. So this is not different here except that agent first asks for router ids, not for full routers info.","commit_id":"51adde5eb93993fbd24c14daab16ade74565978f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c231b84524295908de8c2ce93728664775bea504","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        if utils.is_extension_supported("},{"line_number":72,"context_line":"                self.l3plugin, constants.L3_AGENT_SCHEDULER_EXT_ALIAS):"},{"line_number":73,"context_line":"            if cfg.CONF.router_auto_schedule:"},{"line_number":74,"context_line":"                self.l3plugin.auto_schedule_routers(context, host,"},{"line_number":75,"context_line":"                                                    router_ids\u003dNone)"},{"line_number":76,"context_line":"        return self.l3plugin.list_router_ids_on_host(context, host)"},{"line_number":77,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_3fe3fba5","line":74,"range":{"start_line":74,"start_character":30,"end_line":74,"end_character":51},"in_reply_to":"5a5ae5dd_fb8edc77","updated":"2016-02-05 16:51:15.000000000","message":"This is fine.","commit_id":"51adde5eb93993fbd24c14daab16ade74565978f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2bc1321dea4d35a113f2f5b5499d4e90e128f244","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            # only auto schedule routers that were specifically requested;"},{"line_number":93,"context_line":"            # on agent full sync routers will be auto scheduled in"},{"line_number":94,"context_line":"            # get_router_ids()"},{"line_number":95,"context_line":"            if cfg.CONF.router_auto_schedule and router_ids:"},{"line_number":96,"context_line":"                self.l3plugin.auto_schedule_routers(context, host, router_ids)"},{"line_number":97,"context_line":"            routers \u003d ("},{"line_number":98,"context_line":"                self.l3plugin.list_active_sync_routers_on_active_l3_agent("}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_84ebf7af","line":95,"range":{"start_line":95,"start_character":44,"end_line":95,"end_character":59},"updated":"2016-02-04 17:31:11.000000000","message":"I don\u0027t think that adding this condition actually changes anything functionally.  If router_ids evaluates to False, then the container is empty and the rest of the code will be a no op.  But, it may go through a DB query before it figures out to do nothing [1].  So, I\u0027m okay with adding it.\n\n [1] https://github.com/openstack/neutron/blob/2b4d605b24/neutron/scheduler/l3_agent_scheduler.py#L105","commit_id":"51adde5eb93993fbd24c14daab16ade74565978f"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"87b790ae70b394041f51bb732995b5a6f8fd2a58","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            # only auto schedule routers that were specifically requested;"},{"line_number":93,"context_line":"            # on agent full sync routers will be auto scheduled in"},{"line_number":94,"context_line":"            # get_router_ids()"},{"line_number":95,"context_line":"            if cfg.CONF.router_auto_schedule and router_ids:"},{"line_number":96,"context_line":"                self.l3plugin.auto_schedule_routers(context, host, router_ids)"},{"line_number":97,"context_line":"            routers \u003d ("},{"line_number":98,"context_line":"                self.l3plugin.list_active_sync_routers_on_active_l3_agent("}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_dfa74709","line":95,"range":{"start_line":95,"start_character":44,"end_line":95,"end_character":59},"in_reply_to":"5a5ae5dd_84ebf7af","updated":"2016-02-05 16:26:36.000000000","message":"Not sure I understood your point. So call to sync_routers might be with particular router_ids (give me just those router(s)) and with empty router_ids (give me all routers, means agent full sync). \n\nFor agent full sync routers auto scheduling is moved to get_router_ids, since this is what agent calls first. But if agent requests info for particular routers it doesn\u0027t call get_router_ids(). So we check if router_ids is not empty and do auto_schedule_routers for them. This is to preserve original behavior.","commit_id":"51adde5eb93993fbd24c14daab16ade74565978f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c231b84524295908de8c2ce93728664775bea504","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            # only auto schedule routers that were specifically requested;"},{"line_number":93,"context_line":"            # on agent full sync routers will be auto scheduled in"},{"line_number":94,"context_line":"            # get_router_ids()"},{"line_number":95,"context_line":"            if cfg.CONF.router_auto_schedule and router_ids:"},{"line_number":96,"context_line":"                self.l3plugin.auto_schedule_routers(context, host, router_ids)"},{"line_number":97,"context_line":"            routers \u003d ("},{"line_number":98,"context_line":"                self.l3plugin.list_active_sync_routers_on_active_l3_agent("}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_02bee464","line":95,"range":{"start_line":95,"start_character":44,"end_line":95,"end_character":59},"in_reply_to":"5a5ae5dd_dfa74709","updated":"2016-02-05 16:51:15.000000000","message":"ok","commit_id":"51adde5eb93993fbd24c14daab16ade74565978f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2bc1321dea4d35a113f2f5b5499d4e90e128f244","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                self.l3plugin.auto_schedule_routers(context, host, router_ids)"},{"line_number":97,"context_line":"            routers \u003d ("},{"line_number":98,"context_line":"                self.l3plugin.list_active_sync_routers_on_active_l3_agent("},{"line_number":99,"context_line":"                    context, host, router_ids))"},{"line_number":100,"context_line":"        else:"},{"line_number":101,"context_line":"            routers \u003d self.l3plugin.get_sync_data(context, router_ids)"},{"line_number":102,"context_line":"        if utils.is_extension_supported("}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_64ffdb67","line":99,"range":{"start_line":99,"start_character":35,"end_line":99,"end_character":45},"updated":"2016-02-04 17:31:11.000000000","message":"Actually, if router_ids is empty here, this call will be effectively a no-op.  But, I think it executes a query [1].  I wonder if the optimization on L91 should be broken out in to a new patch with an optimization to skip this one too.\n\n [1] https://github.com/openstack/neutron/blob/2b4d605b24/neutron/db/l3_agentschedulers_db.py#L366","commit_id":"51adde5eb93993fbd24c14daab16ade74565978f"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"87b790ae70b394041f51bb732995b5a6f8fd2a58","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                self.l3plugin.auto_schedule_routers(context, host, router_ids)"},{"line_number":97,"context_line":"            routers \u003d ("},{"line_number":98,"context_line":"                self.l3plugin.list_active_sync_routers_on_active_l3_agent("},{"line_number":99,"context_line":"                    context, host, router_ids))"},{"line_number":100,"context_line":"        else:"},{"line_number":101,"context_line":"            routers \u003d self.l3plugin.get_sync_data(context, router_ids)"},{"line_number":102,"context_line":"        if utils.is_extension_supported("}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_9f4a2f25","line":99,"range":{"start_line":99,"start_character":35,"end_line":99,"end_character":45},"in_reply_to":"5a5ae5dd_64ffdb67","updated":"2016-02-05 16:26:36.000000000","message":"I don\u0027t agree that this call will be a no-op if router_ids is empty - it will return info for all routers scheduled to the agent in this case","commit_id":"51adde5eb93993fbd24c14daab16ade74565978f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c231b84524295908de8c2ce93728664775bea504","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                self.l3plugin.auto_schedule_routers(context, host, router_ids)"},{"line_number":97,"context_line":"            routers \u003d ("},{"line_number":98,"context_line":"                self.l3plugin.list_active_sync_routers_on_active_l3_agent("},{"line_number":99,"context_line":"                    context, host, router_ids))"},{"line_number":100,"context_line":"        else:"},{"line_number":101,"context_line":"            routers \u003d self.l3plugin.get_sync_data(context, router_ids)"},{"line_number":102,"context_line":"        if utils.is_extension_supported("}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_82b17449","line":99,"range":{"start_line":99,"start_character":35,"end_line":99,"end_character":45},"in_reply_to":"5a5ae5dd_9f4a2f25","updated":"2016-02-05 16:51:15.000000000","message":"Yeah, you\u0027re right.  In both cases, I was confused the behavior of the methods when None or [] is passed.\n\nIn this case, I missed that the filtering by router_ids [1] won\u0027t filter at all if I pass in \u0027[]\u0027 for router_ids.  It is a lousy pattern if you ask me to return everything unfiltered if I pass [] for router_ids and filter if I pass a non-empty router_ids list.  The least they could have done was to check \"if router_ids is not None\" to distinguish.  But, it would\u0027ve been even better if there were different methods to call, one filtered and one unfiltered instead of using these optional arguments to change the behavior of the method.  Oh well.\n\n [1] https://github.com/openstack/neutron/blob/c4ec972987/neutron/db/l3_agentschedulers_db.py#L368","commit_id":"51adde5eb93993fbd24c14daab16ade74565978f"}]}
