)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"b069f9950636dd02bcf892ed2564b9b1663c06a3","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Removing the router from dvr_snat node removes the qrouters"},{"line_number":10,"context_line":"that are servicing the VM and dhcp ports."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"If there are dvr serviceable ports in the dvr_snat node, then"},{"line_number":13,"context_line":"only the snat functionality should be moved to the the different"},{"line_number":14,"context_line":"node and the router namespaces should be untouched."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I5a3ba329346ab0d5ea7b0296ec64cc8e5fb4056d"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"5a18252c_86ceaa81","line":13,"range":{"start_line":12,"start_character":56,"end_line":13,"end_character":64},"updated":"2016-04-12 09:13:27.000000000","message":"It looks like removing snat namespace depends on the code running on l3 agent[1]. But since there is no change to the external gateway, [1] will not be executed. So, the user run \nneutron l3-agent-router-remove agent-id dvr-router.\n\nAnd neutron report that the router is removed from l3 agent, but actually, nothing happened.\n\n[1] https://github.com/openstack/neutron/blob/655c7cabb694ebcccaa0999966bd9742d3b0f580/neutron/agent/l3/dvr_edge_router.py#L80-L84","commit_id":"664af95cce4f8cdd5fa0414fb079cc935dae6cdf"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"e99367b0296ade80c442169b8601cc2c368940a9","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Removing the router from dvr_snat node removes the qrouters"},{"line_number":10,"context_line":"that are servicing the VM and dhcp ports."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"If there are dvr serviceable ports in the dvr_snat node, then"},{"line_number":13,"context_line":"only the snat functionality should be moved to the the different"},{"line_number":14,"context_line":"node and the router namespaces should be untouched."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I5a3ba329346ab0d5ea7b0296ec64cc8e5fb4056d"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"1a122d0e_372ff4f7","line":13,"range":{"start_line":12,"start_character":56,"end_line":13,"end_character":64},"in_reply_to":"5a18252c_86ceaa81","updated":"2016-04-21 22:42:33.000000000","message":"when the user issues \u0027neutron l3-agent-router-remove agent-id dvr-router\u0027 the binding table is cleared from the server side, to remove the router binding to the agent.\nBut still when the agent receives the message as \"updates\" rather than \"remove\", the agent will retain the router namespace but will only delete the snat_namespace since the \u0027gw_port_host\u0027 binding will be set to null or a different host name if the router was added to a different agent.","commit_id":"664af95cce4f8cdd5fa0414fb079cc935dae6cdf"}],"neutron/db/l3_agentschedulers_db.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"0d715ba7c492c948cbd5552bdc91a824524122ec","unresolved":false,"context_lines":[{"line_number":255,"context_line":"            service_constants.L3_ROUTER_NAT)"},{"line_number":256,"context_line":"        retain_router \u003d False"},{"line_number":257,"context_line":"        l3_notifier \u003d self.agent_notifiers.get(constants.AGENT_TYPE_L3)"},{"line_number":258,"context_line":"        if router[\u0027external_gateway_info\u0027] and router.get(\u0027distributed\u0027):"},{"line_number":259,"context_line":"            subnet_ids \u003d plugin.get_subnet_ids_on_router(context, router_id)"},{"line_number":260,"context_line":"            admin_context \u003d context.elevated()"},{"line_number":261,"context_line":"            retain_router \u003d plugin._check_dvr_serviceable_ports_on_host("}],"source_content_type":"text/x-python","patch_set":4,"id":"9a061dce_6a135a5d","line":258,"range":{"start_line":258,"start_character":11,"end_line":258,"end_character":42},"updated":"2016-04-04 12:33:55.000000000","message":"why check ext gw?","commit_id":"d5b3f7c0c30ea1ae9ee81dca7a483303c25084da"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"66e6890e3b7ba0d4076449cc46e6ce058e8e24d9","unresolved":false,"context_lines":[{"line_number":255,"context_line":"            service_constants.L3_ROUTER_NAT)"},{"line_number":256,"context_line":"        retain_router \u003d False"},{"line_number":257,"context_line":"        l3_notifier \u003d self.agent_notifiers.get(constants.AGENT_TYPE_L3)"},{"line_number":258,"context_line":"        if router[\u0027external_gateway_info\u0027] and router.get(\u0027distributed\u0027):"},{"line_number":259,"context_line":"            subnet_ids \u003d plugin.get_subnet_ids_on_router(context, router_id)"},{"line_number":260,"context_line":"            admin_context \u003d context.elevated()"},{"line_number":261,"context_line":"            retain_router \u003d plugin._check_dvr_serviceable_ports_on_host("}],"source_content_type":"text/x-python","patch_set":4,"id":"9a061dce_c61a556e","line":258,"range":{"start_line":258,"start_character":11,"end_line":258,"end_character":42},"in_reply_to":"9a061dce_6a135a5d","updated":"2016-04-04 15:52:21.000000000","message":"In #L248 we are checking for agent type as DVR_SNAT, but here we are making sure that the router has a gateway enabled, so then we can just remove the snat namespace and leave the router namespace if there is any other service ports still in the node.","commit_id":"d5b3f7c0c30ea1ae9ee81dca7a483303c25084da"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"7e8b911b02edd2cf3fc12c5117db626c0977b588","unresolved":false,"context_lines":[{"line_number":255,"context_line":"            service_constants.L3_ROUTER_NAT)"},{"line_number":256,"context_line":"        retain_router \u003d False"},{"line_number":257,"context_line":"        l3_notifier \u003d self.agent_notifiers.get(constants.AGENT_TYPE_L3)"},{"line_number":258,"context_line":"        if router[\u0027external_gateway_info\u0027] and router.get(\u0027distributed\u0027):"},{"line_number":259,"context_line":"            subnet_ids \u003d plugin.get_subnet_ids_on_router(context, router_id)"},{"line_number":260,"context_line":"            admin_context \u003d context.elevated()"},{"line_number":261,"context_line":"            retain_router \u003d plugin._check_dvr_serviceable_ports_on_host("}],"source_content_type":"text/x-python","patch_set":4,"id":"9a061dce_bd7c6c73","line":258,"range":{"start_line":258,"start_character":11,"end_line":258,"end_character":42},"in_reply_to":"9a061dce_77c17180","updated":"2016-04-05 08:18:12.000000000","message":"On a second thought I think it\u0027s ok to keep this check here in this patch: removing a dvr router from an agent makes sense only in case router has ext gw. Please fix existing tests and add a new one to check no notifications are sent in case dvr router has no ext gw.","commit_id":"d5b3f7c0c30ea1ae9ee81dca7a483303c25084da"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"c1e1a6c41f94f576909dcdb103c9dfce49751971","unresolved":false,"context_lines":[{"line_number":255,"context_line":"            service_constants.L3_ROUTER_NAT)"},{"line_number":256,"context_line":"        retain_router \u003d False"},{"line_number":257,"context_line":"        l3_notifier \u003d self.agent_notifiers.get(constants.AGENT_TYPE_L3)"},{"line_number":258,"context_line":"        if router[\u0027external_gateway_info\u0027] and router.get(\u0027distributed\u0027):"},{"line_number":259,"context_line":"            subnet_ids \u003d plugin.get_subnet_ids_on_router(context, router_id)"},{"line_number":260,"context_line":"            admin_context \u003d context.elevated()"},{"line_number":261,"context_line":"            retain_router \u003d plugin._check_dvr_serviceable_ports_on_host("}],"source_content_type":"text/x-python","patch_set":4,"id":"9a061dce_ac05fb11","line":258,"range":{"start_line":258,"start_character":11,"end_line":258,"end_character":42},"in_reply_to":"9a061dce_bd7c6c73","updated":"2016-04-06 18:14:55.000000000","message":"Thanks I will update this patch with the test cases.","commit_id":"d5b3f7c0c30ea1ae9ee81dca7a483303c25084da"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"72cb1f53f48a91079667dad0d5645adc36c427a1","unresolved":false,"context_lines":[{"line_number":255,"context_line":"            service_constants.L3_ROUTER_NAT)"},{"line_number":256,"context_line":"        retain_router \u003d False"},{"line_number":257,"context_line":"        l3_notifier \u003d self.agent_notifiers.get(constants.AGENT_TYPE_L3)"},{"line_number":258,"context_line":"        if router[\u0027external_gateway_info\u0027] and router.get(\u0027distributed\u0027):"},{"line_number":259,"context_line":"            subnet_ids \u003d plugin.get_subnet_ids_on_router(context, router_id)"},{"line_number":260,"context_line":"            admin_context \u003d context.elevated()"},{"line_number":261,"context_line":"            retain_router \u003d plugin._check_dvr_serviceable_ports_on_host("}],"source_content_type":"text/x-python","patch_set":4,"id":"9a061dce_77c17180","line":258,"range":{"start_line":258,"start_character":11,"end_line":258,"end_character":42},"in_reply_to":"9a061dce_c61a556e","updated":"2016-04-04 16:44:22.000000000","message":"While I agree it makes sense, I think this is a bit unrelated to the fix, which is to check for dvr service ports on host and send routers_updated instead of router_removed_from_agent.","commit_id":"d5b3f7c0c30ea1ae9ee81dca7a483303c25084da"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"b1a0265af9ac0bec065e730a712e1ae1e4fa835f","unresolved":false,"context_lines":[{"line_number":253,"context_line":"        router \u003d self.get_router(context, router_id)"},{"line_number":254,"context_line":"        plugin \u003d manager.NeutronManager.get_service_plugins().get("},{"line_number":255,"context_line":"            service_constants.L3_ROUTER_NAT)"},{"line_number":256,"context_line":"        retain_router \u003d False"},{"line_number":257,"context_line":"        l3_notifier \u003d self.agent_notifiers.get(constants.AGENT_TYPE_L3)"},{"line_number":258,"context_line":"        if router[\u0027external_gateway_info\u0027] and router.get(\u0027distributed\u0027):"},{"line_number":259,"context_line":"            subnet_ids \u003d plugin.get_subnet_ids_on_router(context, router_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a061dce_72228353","line":256,"range":{"start_line":256,"start_character":8,"end_line":256,"end_character":29},"updated":"2016-04-07 08:00:30.000000000","message":"wiold be good to comment what it means","commit_id":"1fd8e6b2e1d6c31453207bc0d3ff17f47040a754"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"06ea3908654fa8976323d043bd3d9e3f26757190","unresolved":false,"context_lines":[{"line_number":253,"context_line":"        router \u003d self.get_router(context, router_id)"},{"line_number":254,"context_line":"        plugin \u003d manager.NeutronManager.get_service_plugins().get("},{"line_number":255,"context_line":"            service_constants.L3_ROUTER_NAT)"},{"line_number":256,"context_line":"        retain_router \u003d False"},{"line_number":257,"context_line":"        l3_notifier \u003d self.agent_notifiers.get(constants.AGENT_TYPE_L3)"},{"line_number":258,"context_line":"        if router[\u0027external_gateway_info\u0027] and router.get(\u0027distributed\u0027):"},{"line_number":259,"context_line":"            subnet_ids \u003d plugin.get_subnet_ids_on_router(context, router_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a061dce_79dfe839","line":256,"range":{"start_line":256,"start_character":8,"end_line":256,"end_character":29},"in_reply_to":"9a061dce_72228353","updated":"2016-04-07 15:46:56.000000000","message":"This is local variable that tracks if the routers should be removed or retained if it is DVR snat move.","commit_id":"1fd8e6b2e1d6c31453207bc0d3ff17f47040a754"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"b324d334fef17ab2eee61dfec8547ed94fc5c8b6","unresolved":false,"context_lines":[{"line_number":253,"context_line":"        router \u003d self.get_router(context, router_id)"},{"line_number":254,"context_line":"        plugin \u003d manager.NeutronManager.get_service_plugins().get("},{"line_number":255,"context_line":"            service_constants.L3_ROUTER_NAT)"},{"line_number":256,"context_line":"        retain_router \u003d False"},{"line_number":257,"context_line":"        l3_notifier \u003d self.agent_notifiers.get(constants.AGENT_TYPE_L3)"},{"line_number":258,"context_line":"        if router[\u0027external_gateway_info\u0027] and router.get(\u0027distributed\u0027):"},{"line_number":259,"context_line":"            subnet_ids \u003d plugin.get_subnet_ids_on_router(context, router_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a061dce_542e2bfb","line":256,"range":{"start_line":256,"start_character":8,"end_line":256,"end_character":29},"in_reply_to":"9a061dce_79dfe839","updated":"2016-04-07 16:02:42.000000000","message":"yeah, it\u0027s pretty obvious during review when you see the commit message, but might be not so obvious for those reading the code afterwards","commit_id":"1fd8e6b2e1d6c31453207bc0d3ff17f47040a754"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"b069f9950636dd02bcf892ed2564b9b1663c06a3","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        # to check if there are valid routers in this agent."},{"line_number":260,"context_line":"        retain_router \u003d False"},{"line_number":261,"context_line":"        l3_notifier \u003d self.agent_notifiers.get(constants.AGENT_TYPE_L3)"},{"line_number":262,"context_line":"        if router[\u0027external_gateway_info\u0027] and router.get(\u0027distributed\u0027):"},{"line_number":263,"context_line":"            subnet_ids \u003d plugin.get_subnet_ids_on_router(context, router_id)"},{"line_number":264,"context_line":"            if subnet_ids and agent.host:"},{"line_number":265,"context_line":"                retain_router \u003d plugin._check_dvr_serviceable_ports_on_host("}],"source_content_type":"text/x-python","patch_set":7,"id":"5a18252c_a62c86ac","line":262,"range":{"start_line":262,"start_character":8,"end_line":262,"end_character":73},"updated":"2016-04-12 09:13:27.000000000","message":"What if I want to remove dvr router from a distributed node(compute host)? I think the logic here will also prevent the removal. So,  does the fact that router contains \u0027external_gateway_info\u0027 matter? I mean, we should probably just prevent removing dvr router from agent as long as there is dvr serviceable port.","commit_id":"664af95cce4f8cdd5fa0414fb079cc935dae6cdf"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"0e0ac27f533992d3217e65f3155203a17b51ffe8","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        # to check if there are valid routers in this agent."},{"line_number":260,"context_line":"        retain_router \u003d False"},{"line_number":261,"context_line":"        l3_notifier \u003d self.agent_notifiers.get(constants.AGENT_TYPE_L3)"},{"line_number":262,"context_line":"        if router[\u0027external_gateway_info\u0027] and router.get(\u0027distributed\u0027):"},{"line_number":263,"context_line":"            subnet_ids \u003d plugin.get_subnet_ids_on_router(context, router_id)"},{"line_number":264,"context_line":"            if subnet_ids and agent.host:"},{"line_number":265,"context_line":"                retain_router \u003d plugin._check_dvr_serviceable_ports_on_host("}],"source_content_type":"text/x-python","patch_set":7,"id":"1a122d0e_a5b9ceee","line":262,"range":{"start_line":262,"start_character":8,"end_line":262,"end_character":73},"in_reply_to":"1a122d0e_155f2c76","updated":"2016-05-04 10:15:26.000000000","message":"I think it\u0027s a valid point from Hong Hui Xiao. What if we just return in case router does not have ext gateway or  better if it\u0027s not scheduled to the agent.","commit_id":"664af95cce4f8cdd5fa0414fb079cc935dae6cdf"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"7922fc2f94060adeaa26bf6b0bd40af11ca2a180","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        # to check if there are valid routers in this agent."},{"line_number":260,"context_line":"        retain_router \u003d False"},{"line_number":261,"context_line":"        l3_notifier \u003d self.agent_notifiers.get(constants.AGENT_TYPE_L3)"},{"line_number":262,"context_line":"        if router[\u0027external_gateway_info\u0027] and router.get(\u0027distributed\u0027):"},{"line_number":263,"context_line":"            subnet_ids \u003d plugin.get_subnet_ids_on_router(context, router_id)"},{"line_number":264,"context_line":"            if subnet_ids and agent.host:"},{"line_number":265,"context_line":"                retain_router \u003d plugin._check_dvr_serviceable_ports_on_host("}],"source_content_type":"text/x-python","patch_set":7,"id":"1a122d0e_be7050a5","line":262,"range":{"start_line":262,"start_character":8,"end_line":262,"end_character":73},"in_reply_to":"1a122d0e_44c6b39a","updated":"2016-04-20 15:06:03.000000000","message":"Hi Xiao. Your example may also have some issues. I think LBaaS anyway requires FloatingIP to be configured for the VIP. If you need floatingIP you need the gateway to be configured.","commit_id":"664af95cce4f8cdd5fa0414fb079cc935dae6cdf"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"b5a1ebe183efa5db15a70f3beebf08d88555622d","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        # to check if there are valid routers in this agent."},{"line_number":260,"context_line":"        retain_router \u003d False"},{"line_number":261,"context_line":"        l3_notifier \u003d self.agent_notifiers.get(constants.AGENT_TYPE_L3)"},{"line_number":262,"context_line":"        if router[\u0027external_gateway_info\u0027] and router.get(\u0027distributed\u0027):"},{"line_number":263,"context_line":"            subnet_ids \u003d plugin.get_subnet_ids_on_router(context, router_id)"},{"line_number":264,"context_line":"            if subnet_ids and agent.host:"},{"line_number":265,"context_line":"                retain_router \u003d plugin._check_dvr_serviceable_ports_on_host("}],"source_content_type":"text/x-python","patch_set":7,"id":"1a122d0e_155f2c76","line":262,"range":{"start_line":262,"start_character":8,"end_line":262,"end_character":73},"in_reply_to":"1a122d0e_4de04a29","updated":"2016-05-03 16:55:38.000000000","message":"So what is your problem in checking for the external_gateway_info?\nThis is already scheduled in the dvr_snat node. We just want to remove the snat part if gateway is enabled. Otherwise there is not meaning in moving the router alone from a dvr_snat node to another dvr_snat node.","commit_id":"664af95cce4f8cdd5fa0414fb079cc935dae6cdf"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"3213b04ee0432a3becdf0a1ddca05d0a61d7ed90","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        # to check if there are valid routers in this agent."},{"line_number":260,"context_line":"        retain_router \u003d False"},{"line_number":261,"context_line":"        l3_notifier \u003d self.agent_notifiers.get(constants.AGENT_TYPE_L3)"},{"line_number":262,"context_line":"        if router[\u0027external_gateway_info\u0027] and router.get(\u0027distributed\u0027):"},{"line_number":263,"context_line":"            subnet_ids \u003d plugin.get_subnet_ids_on_router(context, router_id)"},{"line_number":264,"context_line":"            if subnet_ids and agent.host:"},{"line_number":265,"context_line":"                retain_router \u003d plugin._check_dvr_serviceable_ports_on_host("}],"source_content_type":"text/x-python","patch_set":7,"id":"1a122d0e_4de04a29","line":262,"range":{"start_line":262,"start_character":8,"end_line":262,"end_character":73},"in_reply_to":"1a122d0e_be7050a5","updated":"2016-04-21 09:47:38.000000000","message":"Hi Swaminathan. Yep, it is common to use a floating IP along with lbaas to provide service in the external network. But there is also usecase to just use lbaas inside a datacenter. In this case, the floatingip is not required, and other vms in the datacenter will use VIP directly to visit a lbaas cluster.","commit_id":"664af95cce4f8cdd5fa0414fb079cc935dae6cdf"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"28548024e072e281081fa6c258575c0eec81a8f1","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        # to check if there are valid routers in this agent."},{"line_number":260,"context_line":"        retain_router \u003d False"},{"line_number":261,"context_line":"        l3_notifier \u003d self.agent_notifiers.get(constants.AGENT_TYPE_L3)"},{"line_number":262,"context_line":"        if router[\u0027external_gateway_info\u0027] and router.get(\u0027distributed\u0027):"},{"line_number":263,"context_line":"            subnet_ids \u003d plugin.get_subnet_ids_on_router(context, router_id)"},{"line_number":264,"context_line":"            if subnet_ids and agent.host:"},{"line_number":265,"context_line":"                retain_router \u003d plugin._check_dvr_serviceable_ports_on_host("}],"source_content_type":"text/x-python","patch_set":7,"id":"1a122d0e_44c6b39a","line":262,"range":{"start_line":262,"start_character":8,"end_line":262,"end_character":73},"in_reply_to":"5a18252c_9851d065","updated":"2016-04-20 04:36:32.000000000","message":"Hi Swaminathan. Thanks for the explanation. You are right about that the code here will only be hit for dvr_snat agent.\n\nI rethink it today, and I think it still can be hacked. Supposing I have a lbaas port in the dvr_snat agent, and the router don\u0027t have external_gateway_info, retain_router will be false, and the router namespace will be deleted. As a result, the lbass might not be able to work with neutron router.","commit_id":"664af95cce4f8cdd5fa0414fb079cc935dae6cdf"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"691bf1571464a07dcc3b87b10df90cd695299b3a","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        # to check if there are valid routers in this agent."},{"line_number":260,"context_line":"        retain_router \u003d False"},{"line_number":261,"context_line":"        l3_notifier \u003d self.agent_notifiers.get(constants.AGENT_TYPE_L3)"},{"line_number":262,"context_line":"        if router[\u0027external_gateway_info\u0027] and router.get(\u0027distributed\u0027):"},{"line_number":263,"context_line":"            subnet_ids \u003d plugin.get_subnet_ids_on_router(context, router_id)"},{"line_number":264,"context_line":"            if subnet_ids and agent.host:"},{"line_number":265,"context_line":"                retain_router \u003d plugin._check_dvr_serviceable_ports_on_host("}],"source_content_type":"text/x-python","patch_set":7,"id":"5a18252c_9851d065","line":262,"range":{"start_line":262,"start_character":8,"end_line":262,"end_character":73},"in_reply_to":"5a18252c_a62c86ac","updated":"2016-04-12 15:50:42.000000000","message":"Hi Xiao, the code in #L248 handles to check which DVR agent is managing the move. Manual move of router from a Compute node will not be allowed.\n\nThis check just makes sure that the router has gateway configured and this move is based on a dvr_snat agent, then it try to check for the serviceable ports and then decide to send the respectivie notification to the agent.\n\nFor your information. This code already existed before, but was removed recently based on the scheduler change.","commit_id":"664af95cce4f8cdd5fa0414fb079cc935dae6cdf"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"2449fba198b95d1a18df5df4963d3eeb0fe35bcd","unresolved":false,"context_lines":[{"line_number":270,"context_line":"        # the routers should be retained. This flag will be used"},{"line_number":271,"context_line":"        # to check if there are valid routers in this agent."},{"line_number":272,"context_line":"        retain_router \u003d False"},{"line_number":273,"context_line":"        l3_notifier \u003d self.agent_notifiers.get(constants.AGENT_TYPE_L3)"},{"line_number":274,"context_line":"        if router.get(\u0027distributed\u0027):"},{"line_number":275,"context_line":"            subnet_ids \u003d plugin.get_subnet_ids_on_router(context, router_id)"},{"line_number":276,"context_line":"            if subnet_ids and agent.host:"}],"source_content_type":"text/x-python","patch_set":10,"id":"dab17558_9b979339","line":273,"range":{"start_line":273,"start_character":8,"end_line":273,"end_character":71},"updated":"2016-05-10 07:52:52.000000000","message":"please place right before usage (before #282)","commit_id":"0e755c724ffc2cd730a3f6213722249f94d1ee1c"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"fcc1e83bc99317998c93a4ec94f4e100f7034728","unresolved":false,"context_lines":[{"line_number":270,"context_line":"        # the routers should be retained. This flag will be used"},{"line_number":271,"context_line":"        # to check if there are valid routers in this agent."},{"line_number":272,"context_line":"        retain_router \u003d False"},{"line_number":273,"context_line":"        l3_notifier \u003d self.agent_notifiers.get(constants.AGENT_TYPE_L3)"},{"line_number":274,"context_line":"        if router.get(\u0027distributed\u0027):"},{"line_number":275,"context_line":"            subnet_ids \u003d plugin.get_subnet_ids_on_router(context, router_id)"},{"line_number":276,"context_line":"            if subnet_ids and agent.host:"}],"source_content_type":"text/x-python","patch_set":10,"id":"dab17558_bc7a2cef","line":273,"range":{"start_line":273,"start_character":8,"end_line":273,"end_character":71},"in_reply_to":"dab17558_9b979339","updated":"2016-05-10 17:03:34.000000000","message":"Done","commit_id":"0e755c724ffc2cd730a3f6213722249f94d1ee1c"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"2449fba198b95d1a18df5df4963d3eeb0fe35bcd","unresolved":false,"context_lines":[{"line_number":277,"context_line":"                retain_router \u003d plugin._check_dvr_serviceable_ports_on_host("},{"line_number":278,"context_line":"                    context, agent.host, subnet_ids)"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"        if router.get(\u0027ha\u0027):"},{"line_number":281,"context_line":"            plugin.delete_ha_interfaces_on_host(context, router_id, agent.host)"},{"line_number":282,"context_line":"        if retain_router and l3_notifier:"},{"line_number":283,"context_line":"            l3_notifier.routers_updated_on_host("},{"line_number":284,"context_line":"                context, [router_id], agent.host)"}],"source_content_type":"text/x-python","patch_set":10,"id":"dab17558_db275bc8","line":281,"range":{"start_line":280,"start_character":8,"end_line":281,"end_character":79},"updated":"2016-05-10 07:52:52.000000000","message":"I\u0027d place it before #272 so we first deal with ha and then with dvr","commit_id":"0e755c724ffc2cd730a3f6213722249f94d1ee1c"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"fcc1e83bc99317998c93a4ec94f4e100f7034728","unresolved":false,"context_lines":[{"line_number":277,"context_line":"                retain_router \u003d plugin._check_dvr_serviceable_ports_on_host("},{"line_number":278,"context_line":"                    context, agent.host, subnet_ids)"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"        if router.get(\u0027ha\u0027):"},{"line_number":281,"context_line":"            plugin.delete_ha_interfaces_on_host(context, router_id, agent.host)"},{"line_number":282,"context_line":"        if retain_router and l3_notifier:"},{"line_number":283,"context_line":"            l3_notifier.routers_updated_on_host("},{"line_number":284,"context_line":"                context, [router_id], agent.host)"}],"source_content_type":"text/x-python","patch_set":10,"id":"dab17558_3c6f5c2c","line":281,"range":{"start_line":280,"start_character":8,"end_line":281,"end_character":79},"in_reply_to":"dab17558_db275bc8","updated":"2016-05-10 17:03:34.000000000","message":"Done","commit_id":"0e755c724ffc2cd730a3f6213722249f94d1ee1c"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"2449fba198b95d1a18df5df4963d3eeb0fe35bcd","unresolved":false,"context_lines":[{"line_number":282,"context_line":"        if retain_router and l3_notifier:"},{"line_number":283,"context_line":"            l3_notifier.routers_updated_on_host("},{"line_number":284,"context_line":"                context, [router_id], agent.host)"},{"line_number":285,"context_line":"        if not retain_router and l3_notifier:"},{"line_number":286,"context_line":"            l3_notifier.router_removed_from_agent("},{"line_number":287,"context_line":"                context, router_id, agent.host)"},{"line_number":288,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"dab17558_1b48c3cb","line":285,"range":{"start_line":285,"start_character":8,"end_line":285,"end_character":45},"updated":"2016-05-10 07:52:52.000000000","message":"elif l3_notifier:","commit_id":"0e755c724ffc2cd730a3f6213722249f94d1ee1c"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"fcc1e83bc99317998c93a4ec94f4e100f7034728","unresolved":false,"context_lines":[{"line_number":282,"context_line":"        if retain_router and l3_notifier:"},{"line_number":283,"context_line":"            l3_notifier.routers_updated_on_host("},{"line_number":284,"context_line":"                context, [router_id], agent.host)"},{"line_number":285,"context_line":"        if not retain_router and l3_notifier:"},{"line_number":286,"context_line":"            l3_notifier.router_removed_from_agent("},{"line_number":287,"context_line":"                context, router_id, agent.host)"},{"line_number":288,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"dab17558_1c6c1834","line":285,"range":{"start_line":285,"start_character":8,"end_line":285,"end_character":45},"in_reply_to":"dab17558_1b48c3cb","updated":"2016-05-10 17:03:34.000000000","message":"Done","commit_id":"0e755c724ffc2cd730a3f6213722249f94d1ee1c"}],"neutron/tests/functional/services/l3_router/test_l3_dvr_ha_router_plugin.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"bf6d069ddfcd69ca928311f413e3c7737f21d97d","unresolved":false,"context_lines":[{"line_number":300,"context_line":"    def test_router_auto_scheduling(self):"},{"line_number":301,"context_line":"        self.skipTest(\u0027Valid for DVR-only routers\u0027)"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"    def test_dvr_router_manual_rescheduling_updates_router(self):"},{"line_number":304,"context_line":"        self.skipTest(\u0027Valid for DVR-only routers\u0027)"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"    def test_dvr_router_manual_rescheduling_removes_router(self):"}],"source_content_type":"text/x-python","patch_set":15,"id":"dab17558_6519ee79","line":303,"range":{"start_line":303,"start_character":8,"end_line":303,"end_character":58},"updated":"2016-05-12 08:31:25.000000000","message":"The reason the test is failing here is because second l3 dvr_snat agent is created at #33 and router gets scheduled to it while we\u0027re creating dvr service port on the first l3 agent. So we don\u0027t really need to skip it, just update the test to explicitly schedule a router to the first l3 agent. \n\nI also discovered that actually after [1] this test suite creates dvr-only routers by default which is not what it is supposed to do. This should be fixed, not related to the current change however.\n\n[1] https://review.openstack.org/#/c/291651/9/neutron/tests/functional/services/l3_router/test_l3_dvr_ha_router_plugin.py","commit_id":"feb6c9817baacb13093a178f0979da1556fc1f11"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"a259f7b7fdef84624e14f69f9e345ba47a9c95f4","unresolved":false,"context_lines":[{"line_number":300,"context_line":"    def test_router_auto_scheduling(self):"},{"line_number":301,"context_line":"        self.skipTest(\u0027Valid for DVR-only routers\u0027)"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"    def test_dvr_router_manual_rescheduling_updates_router(self):"},{"line_number":304,"context_line":"        self.skipTest(\u0027Valid for DVR-only routers\u0027)"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"    def test_dvr_router_manual_rescheduling_removes_router(self):"}],"source_content_type":"text/x-python","patch_set":15,"id":"dab17558_2127f563","line":303,"range":{"start_line":303,"start_character":8,"end_line":303,"end_character":58},"in_reply_to":"dab17558_1ede903d","updated":"2016-05-17 16:02:08.000000000","message":"what about using l3_plugin.schedule_router() with one candidate?","commit_id":"feb6c9817baacb13093a178f0979da1556fc1f11"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"c105a2ed610fd8edc8e909c279690ea5f9000b17","unresolved":false,"context_lines":[{"line_number":300,"context_line":"    def test_router_auto_scheduling(self):"},{"line_number":301,"context_line":"        self.skipTest(\u0027Valid for DVR-only routers\u0027)"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"    def test_dvr_router_manual_rescheduling_updates_router(self):"},{"line_number":304,"context_line":"        self.skipTest(\u0027Valid for DVR-only routers\u0027)"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"    def test_dvr_router_manual_rescheduling_removes_router(self):"}],"source_content_type":"text/x-python","patch_set":15,"id":"dab17558_c33b889a","line":303,"range":{"start_line":303,"start_character":8,"end_line":303,"end_character":58},"in_reply_to":"dab17558_2127f563","updated":"2016-05-17 18:17:51.000000000","message":"will try it out and let you know.","commit_id":"feb6c9817baacb13093a178f0979da1556fc1f11"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"53cd9dc007e6b888e73f9e1af3d7ba81ec3ca223","unresolved":false,"context_lines":[{"line_number":300,"context_line":"    def test_router_auto_scheduling(self):"},{"line_number":301,"context_line":"        self.skipTest(\u0027Valid for DVR-only routers\u0027)"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"    def test_dvr_router_manual_rescheduling_updates_router(self):"},{"line_number":304,"context_line":"        self.skipTest(\u0027Valid for DVR-only routers\u0027)"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"    def test_dvr_router_manual_rescheduling_removes_router(self):"}],"source_content_type":"text/x-python","patch_set":15,"id":"dab17558_cd8f0674","line":303,"range":{"start_line":303,"start_character":8,"end_line":303,"end_character":58},"in_reply_to":"dab17558_6519ee79","updated":"2016-05-12 15:42:01.000000000","message":"Will check it out.","commit_id":"feb6c9817baacb13093a178f0979da1556fc1f11"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"1966195ca79ab81dbb5257b051df29d501cf1939","unresolved":false,"context_lines":[{"line_number":300,"context_line":"    def test_router_auto_scheduling(self):"},{"line_number":301,"context_line":"        self.skipTest(\u0027Valid for DVR-only routers\u0027)"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"    def test_dvr_router_manual_rescheduling_updates_router(self):"},{"line_number":304,"context_line":"        self.skipTest(\u0027Valid for DVR-only routers\u0027)"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"    def test_dvr_router_manual_rescheduling_removes_router(self):"}],"source_content_type":"text/x-python","patch_set":15,"id":"dab17558_1ede903d","line":303,"range":{"start_line":303,"start_character":8,"end_line":303,"end_character":58},"in_reply_to":"dab17558_cd8f0674","updated":"2016-05-17 15:49:13.000000000","message":"Oleg, at this point I am not sure how to force the SNAT to be scheduled to a particular agent without using the add_router_to_l3_agent after removing the router from the existing snat node if scheduled to that node.\n\nDo you think is it worth doing it for this case.\nSince this feature is only useful without HA, can we skip this or do you have any other ideas.","commit_id":"feb6c9817baacb13093a178f0979da1556fc1f11"}],"neutron/tests/functional/services/l3_router/test_l3_dvr_router_plugin.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"b1a0265af9ac0bec065e730a712e1ae1e4fa835f","unresolved":false,"context_lines":[{"line_number":630,"context_line":"                l3_notifier.router_removed_from_agent.assert_called_once_with("},{"line_number":631,"context_line":"                    mock.ANY, router[\u0027id\u0027], HOST1)"},{"line_number":632,"context_line":""},{"line_number":633,"context_line":"    def test_router_csnat_manualrescheduling(self):"},{"line_number":634,"context_line":"        HOSTA \u003d \u0027localhost\u0027"},{"line_number":635,"context_line":"        helpers.register_l3_agent("},{"line_number":636,"context_line":"            host\u003dHOSTA, agent_mode\u003dconstants.L3_AGENT_MODE_DVR_SNAT)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a061dce_52dadfe8","line":633,"range":{"start_line":633,"start_character":8,"end_line":633,"end_character":44},"updated":"2016-04-07 08:00:30.000000000","message":"there is such a test in tests/unit/db/test_agentschedulers_db.py: test_dvr_router_manual_rescheduling. I\u0027d suggest to extend it or better add a similar test next to it which would check proper notifications.","commit_id":"1fd8e6b2e1d6c31453207bc0d3ff17f47040a754"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"06ea3908654fa8976323d043bd3d9e3f26757190","unresolved":false,"context_lines":[{"line_number":630,"context_line":"                l3_notifier.router_removed_from_agent.assert_called_once_with("},{"line_number":631,"context_line":"                    mock.ANY, router[\u0027id\u0027], HOST1)"},{"line_number":632,"context_line":""},{"line_number":633,"context_line":"    def test_router_csnat_manualrescheduling(self):"},{"line_number":634,"context_line":"        HOSTA \u003d \u0027localhost\u0027"},{"line_number":635,"context_line":"        helpers.register_l3_agent("},{"line_number":636,"context_line":"            host\u003dHOSTA, agent_mode\u003dconstants.L3_AGENT_MODE_DVR_SNAT)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a061dce_f9c2d851","line":633,"range":{"start_line":633,"start_character":8,"end_line":633,"end_character":44},"in_reply_to":"9a061dce_52dadfe8","updated":"2016-04-07 15:46:56.000000000","message":"Sure will do it.","commit_id":"1fd8e6b2e1d6c31453207bc0d3ff17f47040a754"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"b9b1fce2467cdb1f30e4ca10819ac467dfdc819e","unresolved":false,"context_lines":[{"line_number":630,"context_line":"                l3_notifier.router_removed_from_agent.assert_called_once_with("},{"line_number":631,"context_line":"                    mock.ANY, router[\u0027id\u0027], HOST1)"},{"line_number":632,"context_line":""},{"line_number":633,"context_line":"    def test_router_csnat_manualrescheduling(self):"},{"line_number":634,"context_line":"        HOSTA \u003d \u0027localhost\u0027"},{"line_number":635,"context_line":"        helpers.register_l3_agent("},{"line_number":636,"context_line":"            host\u003dHOSTA, agent_mode\u003dconstants.L3_AGENT_MODE_DVR_SNAT)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a18252c_69e40d3b","line":633,"range":{"start_line":633,"start_character":8,"end_line":633,"end_character":44},"in_reply_to":"9a061dce_f9c2d851","updated":"2016-04-11 23:47:32.000000000","message":"Oleg, I am not able to check the similar functionality in the above mentioned file. \nSo I would just leave this test in here, since this is the file that we most handle all the functional tests.","commit_id":"1fd8e6b2e1d6c31453207bc0d3ff17f47040a754"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"33d9cb52f45db55ccd7acf77934af14089a3cac4","unresolved":false,"context_lines":[{"line_number":630,"context_line":"                l3_notifier.router_removed_from_agent.assert_called_once_with("},{"line_number":631,"context_line":"                    mock.ANY, router[\u0027id\u0027], HOST1)"},{"line_number":632,"context_line":""},{"line_number":633,"context_line":"    def test_router_csnat_manualrescheduling(self):"},{"line_number":634,"context_line":"        HOSTA \u003d \u0027host1\u0027"},{"line_number":635,"context_line":"        helpers.register_l3_agent("},{"line_number":636,"context_line":"            host\u003dHOSTA, agent_mode\u003dn_const.L3_AGENT_MODE_DVR_SNAT)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a122d0e_aa0b25d4","line":633,"range":{"start_line":633,"start_character":31,"end_line":633,"end_character":33},"updated":"2016-05-05 08:54:15.000000000","message":"..al_re..","commit_id":"e526875158ebd6df437d91238469954fe1ac4991"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"33d9cb52f45db55ccd7acf77934af14089a3cac4","unresolved":false,"context_lines":[{"line_number":630,"context_line":"                l3_notifier.router_removed_from_agent.assert_called_once_with("},{"line_number":631,"context_line":"                    mock.ANY, router[\u0027id\u0027], HOST1)"},{"line_number":632,"context_line":""},{"line_number":633,"context_line":"    def test_router_csnat_manualrescheduling(self):"},{"line_number":634,"context_line":"        HOSTA \u003d \u0027host1\u0027"},{"line_number":635,"context_line":"        helpers.register_l3_agent("},{"line_number":636,"context_line":"            host\u003dHOSTA, agent_mode\u003dn_const.L3_AGENT_MODE_DVR_SNAT)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a122d0e_2a69d58c","line":633,"range":{"start_line":633,"start_character":20,"end_line":633,"end_character":25},"updated":"2016-05-05 08:54:15.000000000","message":"please see comment in the next file","commit_id":"e526875158ebd6df437d91238469954fe1ac4991"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"33d9cb52f45db55ccd7acf77934af14089a3cac4","unresolved":false,"context_lines":[{"line_number":631,"context_line":"                    mock.ANY, router[\u0027id\u0027], HOST1)"},{"line_number":632,"context_line":""},{"line_number":633,"context_line":"    def test_router_csnat_manualrescheduling(self):"},{"line_number":634,"context_line":"        HOSTA \u003d \u0027host1\u0027"},{"line_number":635,"context_line":"        helpers.register_l3_agent("},{"line_number":636,"context_line":"            host\u003dHOSTA, agent_mode\u003dn_const.L3_AGENT_MODE_DVR_SNAT)"},{"line_number":637,"context_line":"        router \u003d self._create_router()"},{"line_number":638,"context_line":"        private_net1 \u003d self._make_network(self.fmt, \u0027net1\u0027, True)"},{"line_number":639,"context_line":"        kwargs \u003d {\u0027arg_list\u0027: (external_net.EXTERNAL,),"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a122d0e_6a12adb5","line":636,"range":{"start_line":634,"start_character":8,"end_line":636,"end_character":66},"updated":"2016-05-05 08:54:15.000000000","message":"snat agent is registered in setUp, why need one more agent?","commit_id":"e526875158ebd6df437d91238469954fe1ac4991"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"33d9cb52f45db55ccd7acf77934af14089a3cac4","unresolved":false,"context_lines":[{"line_number":634,"context_line":"        HOSTA \u003d \u0027host1\u0027"},{"line_number":635,"context_line":"        helpers.register_l3_agent("},{"line_number":636,"context_line":"            host\u003dHOSTA, agent_mode\u003dn_const.L3_AGENT_MODE_DVR_SNAT)"},{"line_number":637,"context_line":"        router \u003d self._create_router()"},{"line_number":638,"context_line":"        private_net1 \u003d self._make_network(self.fmt, \u0027net1\u0027, True)"},{"line_number":639,"context_line":"        kwargs \u003d {\u0027arg_list\u0027: (external_net.EXTERNAL,),"},{"line_number":640,"context_line":"                  external_net.EXTERNAL: True}"},{"line_number":641,"context_line":"        ext_net \u003d self._make_network(self.fmt, \u0027\u0027, True, **kwargs)"},{"line_number":642,"context_line":"        self._make_subnet("},{"line_number":643,"context_line":"            self.fmt, ext_net, \u002710.20.0.1\u0027, \u002710.20.0.0/24\u0027,"},{"line_number":644,"context_line":"            ip_version\u003d4, enable_dhcp\u003dTrue)"},{"line_number":645,"context_line":"        # Set gateway to router"},{"line_number":646,"context_line":"        self.l3_plugin._update_router_gw_info("},{"line_number":647,"context_line":"            self.context, router[\u0027id\u0027],"},{"line_number":648,"context_line":"            {\u0027network_id\u0027: ext_net[\u0027network\u0027][\u0027id\u0027]})"},{"line_number":649,"context_line":"        private_subnet1 \u003d self._make_subnet("},{"line_number":650,"context_line":"            self.fmt,"},{"line_number":651,"context_line":"            private_net1,"},{"line_number":652,"context_line":"            \u002710.1.0.1\u0027,"},{"line_number":653,"context_line":"            cidr\u003d\u002710.1.0.0/24\u0027,"},{"line_number":654,"context_line":"            ip_version\u003d4,"},{"line_number":655,"context_line":"            enable_dhcp\u003dTrue)"},{"line_number":656,"context_line":"        with self.port("},{"line_number":657,"context_line":"                subnet\u003dprivate_subnet1,"},{"line_number":658,"context_line":"                device_owner\u003dDEVICE_OWNER_COMPUTE) as int_port:"},{"line_number":659,"context_line":"            self.core_plugin.update_port("},{"line_number":660,"context_line":"                    self.context, int_port[\u0027port\u0027][\u0027id\u0027],"},{"line_number":661,"context_line":"                    {\u0027port\u0027: {portbindings.HOST_ID: HOSTA}})"},{"line_number":662,"context_line":"            self.l3_plugin.add_router_interface("},{"line_number":663,"context_line":"                self.context, router[\u0027id\u0027],"},{"line_number":664,"context_line":"                {\u0027subnet_id\u0027: private_subnet1[\u0027subnet\u0027][\u0027id\u0027]})"},{"line_number":665,"context_line":"            # Now the VM should be also scheduled on the node"},{"line_number":666,"context_line":"            with mock.patch.object(self.l3_plugin,"},{"line_number":667,"context_line":"                                   \u0027_l3_rpc_notifier\u0027) as l3_notifier:"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a122d0e_8ad2a9cf","line":664,"range":{"start_line":637,"start_character":8,"end_line":664,"end_character":63},"updated":"2016-05-05 08:54:15.000000000","message":"For consistency and less number of lines consider:\n\n        router \u003d self._create_router()\n        kwargs \u003d {\u0027arg_list\u0027: (external_net.EXTERNAL,),\n                  external_net.EXTERNAL: True}\n        with self.network(**kwargs) as ext_net,\\\n                self.subnet(network\u003dext_net),\\\n                self.subnet(cidr\u003d\u002720.0.0.0/24\u0027) as subnet,\\\n                self.port(subnet\u003dsubnet,\n                          device_owner\u003dconstants.DEVICE_OWNER_COMPUTE) as port:\n            self.core_plugin.update_port(\n                    self.context, port[\u0027port\u0027][\u0027id\u0027],\n                    {\u0027port\u0027: {\u0027binding:host_id\u0027: self.l3_agent[\u0027host\u0027]}})\n            self.l3_plugin._update_router_gw_info(\n                self.context, router[\u0027id\u0027],\n                {\u0027network_id\u0027: ext_net[\u0027network\u0027][\u0027id\u0027]})\n            self.l3_plugin.add_router_interface(\n                self.context, router[\u0027id\u0027],\n                {\u0027subnet_id\u0027: subnet[\u0027subnet\u0027][\u0027id\u0027]})","commit_id":"e526875158ebd6df437d91238469954fe1ac4991"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"2449fba198b95d1a18df5df4963d3eeb0fe35bcd","unresolved":false,"context_lines":[{"line_number":831,"context_line":"                l3_notifier.router_removed_from_agent.assert_called_once_with("},{"line_number":832,"context_line":"                    mock.ANY, router[\u0027id\u0027], HOST1)"},{"line_number":833,"context_line":""},{"line_number":834,"context_line":"    def test_dvr_router_manual_rescheduling(self):"},{"line_number":835,"context_line":"        router \u003d self._create_router()"},{"line_number":836,"context_line":"        kwargs \u003d {\u0027arg_list\u0027: (external_net.EXTERNAL,),"},{"line_number":837,"context_line":"                  external_net.EXTERNAL: True}"}],"source_content_type":"text/x-python","patch_set":10,"id":"dab17558_f0e07e98","line":834,"range":{"start_line":834,"start_character":8,"end_line":834,"end_character":43},"updated":"2016-05-10 07:52:52.000000000","message":"what about test_dvr_router_retain_on_manual_rescheduling and place it next to test_dvr_router_manual_rescheduling int the next module?","commit_id":"0e755c724ffc2cd730a3f6213722249f94d1ee1c"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"fcc1e83bc99317998c93a4ec94f4e100f7034728","unresolved":false,"context_lines":[{"line_number":831,"context_line":"                l3_notifier.router_removed_from_agent.assert_called_once_with("},{"line_number":832,"context_line":"                    mock.ANY, router[\u0027id\u0027], HOST1)"},{"line_number":833,"context_line":""},{"line_number":834,"context_line":"    def test_dvr_router_manual_rescheduling(self):"},{"line_number":835,"context_line":"        router \u003d self._create_router()"},{"line_number":836,"context_line":"        kwargs \u003d {\u0027arg_list\u0027: (external_net.EXTERNAL,),"},{"line_number":837,"context_line":"                  external_net.EXTERNAL: True}"}],"source_content_type":"text/x-python","patch_set":10,"id":"dab17558_bc618c3b","line":834,"range":{"start_line":834,"start_character":8,"end_line":834,"end_character":43},"in_reply_to":"dab17558_f0e07e98","updated":"2016-05-10 17:03:34.000000000","message":"Done","commit_id":"0e755c724ffc2cd730a3f6213722249f94d1ee1c"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"0c74699a0a29afc3a2eb3626a6a77196496b76b6","unresolved":false,"context_lines":[{"line_number":888,"context_line":"                    notifier, \u0027routers_updated_on_host\u0027) as rtr_update_mock:"},{"line_number":889,"context_line":"                l3agents \u003d self.l3_plugin.list_l3_agents_hosting_router("},{"line_number":890,"context_line":"                    self.context, router[\u0027id\u0027])"},{"line_number":891,"context_line":"                self.l3_plugin.remove_router_from_l3_agent("},{"line_number":892,"context_line":"                    self.context, l3agents[\u0027agents\u0027][0][\u0027id\u0027], router[\u0027id\u0027])"},{"line_number":893,"context_line":"                rtr_update_mock.assert_called_once_with("},{"line_number":894,"context_line":"                    self.context, [router[\u0027id\u0027]], self.l3_agent[\u0027host\u0027])"},{"line_number":895,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_ab90c296","line":892,"range":{"start_line":891,"start_character":16,"end_line":892,"end_character":76},"updated":"2016-05-18 08:27:55.000000000","message":"I guess for HA routers there will be more than 1 agent, so we should remove from self.l3_agent explicitly rather than just taking first one from the list. I\u0027ll check","commit_id":"5a72a7b6e04553535bb02071516f193abd4a7600"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"adc3e809366dad2f7d05d30d3b8c3ce5cfd8fb63","unresolved":false,"context_lines":[{"line_number":888,"context_line":"                    notifier, \u0027routers_updated_on_host\u0027) as rtr_update_mock:"},{"line_number":889,"context_line":"                l3agents \u003d self.l3_plugin.list_l3_agents_hosting_router("},{"line_number":890,"context_line":"                    self.context, router[\u0027id\u0027])"},{"line_number":891,"context_line":"                self.l3_plugin.remove_router_from_l3_agent("},{"line_number":892,"context_line":"                    self.context, l3agents[\u0027agents\u0027][0][\u0027id\u0027], router[\u0027id\u0027])"},{"line_number":893,"context_line":"                rtr_update_mock.assert_called_once_with("},{"line_number":894,"context_line":"                    self.context, [router[\u0027id\u0027]], self.l3_agent[\u0027host\u0027])"},{"line_number":895,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_061103ad","line":892,"range":{"start_line":891,"start_character":16,"end_line":892,"end_character":76},"in_reply_to":"bab6814e_ab90c296","updated":"2016-05-18 08:52:13.000000000","message":"just remove from self.l3_agent and it should pass","commit_id":"5a72a7b6e04553535bb02071516f193abd4a7600"}],"neutron/tests/unit/db/test_agentschedulers_db.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"33d9cb52f45db55ccd7acf77934af14089a3cac4","unresolved":false,"context_lines":[{"line_number":1124,"context_line":"                      \u0027admin_state_up\u0027: True,"},{"line_number":1125,"context_line":"                      \u0027distributed\u0027: True}"},{"line_number":1126,"context_line":"            r \u003d self.l3plugin.create_router(self.adminContext,"},{"line_number":1127,"context_line":"                                            {\u0027router\u0027: router})"},{"line_number":1128,"context_line":"            self.l3plugin.schedule_router("},{"line_number":1129,"context_line":"                    self.adminContext, r[\u0027id\u0027])"},{"line_number":1130,"context_line":"            l3agents \u003d self.l3plugin.list_l3_agents_hosting_router("}],"source_content_type":"text/x-python","patch_set":8,"id":"1a122d0e_eaafdde0","side":"PARENT","line":1127,"range":{"start_line":1127,"start_character":39,"end_line":1127,"end_character":44},"updated":"2016-05-05 08:54:15.000000000","message":"unrelated","commit_id":"261edb48b7dd15e89fbd3e8671d0ae0af9cf0e94"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"33d9cb52f45db55ccd7acf77934af14089a3cac4","unresolved":false,"context_lines":[{"line_number":1109,"context_line":"            new_agent_host \u003d l3agents[\u0027agents\u0027][0][\u0027host\u0027]"},{"line_number":1110,"context_line":"            self.assertNotEqual(agent_host, new_agent_host)"},{"line_number":1111,"context_line":""},{"line_number":1112,"context_line":"    def test_dvr_router_csnat_manual_scheduling(self):"},{"line_number":1113,"context_line":"        helpers.register_l3_agent("},{"line_number":1114,"context_line":"            host\u003dL3_HOSTA, agent_mode\u003dn_const.L3_AGENT_MODE_DVR_SNAT)"},{"line_number":1115,"context_line":"        helpers.register_l3_agent("}],"source_content_type":"text/x-python","patch_set":8,"id":"1a122d0e_6ad0ed53","line":1112,"range":{"start_line":1112,"start_character":8,"end_line":1112,"end_character":47},"updated":"2016-05-05 08:54:15.000000000","message":"why changing test name? Now for dvr routers scheduling implies snat scheduling so no need to explicitly state that. I\u0027d leave test name as is","commit_id":"e526875158ebd6df437d91238469954fe1ac4991"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"6071119cb33c98893c6940a74cb2531564d5fb41","unresolved":false,"context_lines":[{"line_number":1131,"context_line":"                self.adminContext, r[\u0027id\u0027])"},{"line_number":1132,"context_line":"            self.assertEqual(1, len(l3agents[\u0027agents\u0027]))"},{"line_number":1133,"context_line":"            agent \u003d l3agents[\u0027agents\u0027][0]"},{"line_number":1134,"context_line":"            # NOTE: Removing the router from the l3_agent will"},{"line_number":1135,"context_line":"            # remove all the namespace since there is no other"},{"line_number":1136,"context_line":"            # serviceable ports in the node that requires it."},{"line_number":1137,"context_line":"            self.l3plugin.remove_router_from_l3_agent("},{"line_number":1138,"context_line":"                self.adminContext, agent[\u0027id\u0027], r[\u0027id\u0027])"},{"line_number":1139,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"dab17558_2eb9c315","side":"PARENT","line":1136,"range":{"start_line":1134,"start_character":12,"end_line":1136,"end_character":61},"updated":"2016-05-11 08:17:02.000000000","message":"this comment is still true as the test does not create dvr service port. I think we should not cchange this file at all","commit_id":"501b14f4ca9078ba958176aa24b30f89f2345e0e"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"692ffdc047461ce1e593153f59eae844f91834e9","unresolved":false,"context_lines":[{"line_number":1131,"context_line":"                self.adminContext, r[\u0027id\u0027])"},{"line_number":1132,"context_line":"            self.assertEqual(1, len(l3agents[\u0027agents\u0027]))"},{"line_number":1133,"context_line":"            agent \u003d l3agents[\u0027agents\u0027][0]"},{"line_number":1134,"context_line":"            # NOTE: Removing the router from the l3_agent will"},{"line_number":1135,"context_line":"            # remove all the namespace since there is no other"},{"line_number":1136,"context_line":"            # serviceable ports in the node that requires it."},{"line_number":1137,"context_line":"            self.l3plugin.remove_router_from_l3_agent("},{"line_number":1138,"context_line":"                self.adminContext, agent[\u0027id\u0027], r[\u0027id\u0027])"},{"line_number":1139,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"dab17558_1ae506a7","side":"PARENT","line":1136,"range":{"start_line":1134,"start_character":12,"end_line":1136,"end_character":61},"in_reply_to":"dab17558_2eb9c315","updated":"2016-05-11 14:57:05.000000000","message":"Yes will fix it.\n\nI do one of the test in here is failing jenkins, but it is passing in my environment.\nIf possible can you check what is missing in the test that makes it to fail in the check gate.","commit_id":"501b14f4ca9078ba958176aa24b30f89f2345e0e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"f39aef6af6f90d9a0169631aae86c5338e0b8310","unresolved":false,"context_lines":[{"line_number":1126,"context_line":"            r \u003d self.l3plugin.create_router(self.adminContext,"},{"line_number":1127,"context_line":"                                            {\u0027router\u0027: router})"},{"line_number":1128,"context_line":"            self.l3plugin.schedule_router("},{"line_number":1129,"context_line":"                self.adminContext, r[\u0027id\u0027])"},{"line_number":1130,"context_line":"            l3agents \u003d self.l3plugin.list_l3_agents_hosting_router("},{"line_number":1131,"context_line":"                self.adminContext, r[\u0027id\u0027])"},{"line_number":1132,"context_line":"            self.assertEqual(1, len(l3agents[\u0027agents\u0027]))"}],"source_content_type":"text/x-python","patch_set":13,"id":"dab17558_370bb77e","line":1129,"updated":"2016-05-11 18:43:37.000000000","message":"Let\u0027s not make any gratuitous changes, none of these seem related to the patch.","commit_id":"0f0f83bb59c8c349cad3641dbb6d65636ef633ac"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"9bf6b0b87f861fb95089d1e269ec42298dbefaf7","unresolved":false,"context_lines":[{"line_number":1126,"context_line":"            r \u003d self.l3plugin.create_router(self.adminContext,"},{"line_number":1127,"context_line":"                                            {\u0027router\u0027: router})"},{"line_number":1128,"context_line":"            self.l3plugin.schedule_router("},{"line_number":1129,"context_line":"                self.adminContext, r[\u0027id\u0027])"},{"line_number":1130,"context_line":"            l3agents \u003d self.l3plugin.list_l3_agents_hosting_router("},{"line_number":1131,"context_line":"                self.adminContext, r[\u0027id\u0027])"},{"line_number":1132,"context_line":"            self.assertEqual(1, len(l3agents[\u0027agents\u0027]))"}],"source_content_type":"text/x-python","patch_set":13,"id":"dab17558_23ea5574","line":1129,"in_reply_to":"dab17558_12d32161","updated":"2016-05-11 20:16:10.000000000","message":"addressed review comments.","commit_id":"0f0f83bb59c8c349cad3641dbb6d65636ef633ac"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"1084cbc9d642e275c3d52e733565a65d33956558","unresolved":false,"context_lines":[{"line_number":1126,"context_line":"            r \u003d self.l3plugin.create_router(self.adminContext,"},{"line_number":1127,"context_line":"                                            {\u0027router\u0027: router})"},{"line_number":1128,"context_line":"            self.l3plugin.schedule_router("},{"line_number":1129,"context_line":"                self.adminContext, r[\u0027id\u0027])"},{"line_number":1130,"context_line":"            l3agents \u003d self.l3plugin.list_l3_agents_hosting_router("},{"line_number":1131,"context_line":"                self.adminContext, r[\u0027id\u0027])"},{"line_number":1132,"context_line":"            self.assertEqual(1, len(l3agents[\u0027agents\u0027]))"}],"source_content_type":"text/x-python","patch_set":13,"id":"dab17558_12d32161","line":1129,"in_reply_to":"dab17558_370bb77e","updated":"2016-05-11 18:51:58.000000000","message":"Yes will fix it, I am not sure how it went in.","commit_id":"0f0f83bb59c8c349cad3641dbb6d65636ef633ac"}]}
