)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"ebe67adc725a90276802846e6ecc9e76c3865cdd","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Change-Id: I9453beffd94bf685afd74b0820506fb6b7c996c4"},{"line_number":26,"context_line":"Closes-Bug: #1462154"},{"line_number":27,"context_line":"Closes-Bug: #1549311"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5aef4532_8b14394d","line":27,"range":{"start_line":27,"start_character":0,"end_line":27,"end_character":20},"updated":"2016-03-10 07:11:04.000000000","message":"I still don\u0027t think this patch can fix bug1549311. If you agree with it, maybe better to remove this from commit message to avoid confusion.","commit_id":"df0409f1591e4c0ca0b875e3ab3c1002e899b823"}],"neutron/agent/l3/dvr_local_router.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"700853ff6e8fd32fd7f0b4456c1e4dcccd1c7e96","unresolved":false,"context_lines":[{"line_number":135,"context_line":"            ns_ip.del_veth(fip_2_rtr_name)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def add_floating_ip(self, fip, interface_name, device):"},{"line_number":138,"context_line":"        if not self._add_fip_addr_to_device(fip, device):"},{"line_number":139,"context_line":"            return l3_constants.FLOATINGIP_STATUS_ERROR"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        # Special Handling for DVR - update FIP namespace"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_6fdcc2e4","side":"PARENT","line":138,"range":{"start_line":138,"start_character":20,"end_line":138,"end_character":43},"updated":"2016-03-08 16:17:33.000000000","message":"I don\u0027t think this address is needed for any reason in the DVR qrouter.  I think it is okay not to add it.  But, we should test this thoroughly.","commit_id":"27c6cf94f2bb93a590fb670572d188ecfea5a9fa"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"700853ff6e8fd32fd7f0b4456c1e4dcccd1c7e96","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        else:"},{"line_number":62,"context_line":"            rtr_2_fip_name \u003d self.fip_ns.get_rtr_ext_device_name("},{"line_number":63,"context_line":"                self.router_id)"},{"line_number":64,"context_line":"            return [(\u0027PREROUTING\u0027, \u0027-i %s -d %s -j DNAT --to %s\u0027 %"},{"line_number":65,"context_line":"                 (rtr_2_fip_name, floating_ip, fixed_ip)),"},{"line_number":66,"context_line":"                (\u0027OUTPUT\u0027, \u0027-i %s -d %s -j DNAT --to %s\u0027 %"},{"line_number":67,"context_line":"                 (rtr_2_fip_name, floating_ip, fixed_ip)),"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_8f1caec2","line":64,"range":{"start_line":64,"start_character":36,"end_line":64,"end_character":41},"updated":"2016-03-08 16:17:33.000000000","message":"Is this going to disrupt floating ip -\u003e floating ip communication which should remain on the compute host?","commit_id":"746306ffed79ad35aae639600a6774ea66776568"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"e4d6ba61542768a3748337d7ca203df92327b369","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        else:"},{"line_number":62,"context_line":"            rtr_2_fip_name \u003d self.fip_ns.get_rtr_ext_device_name("},{"line_number":63,"context_line":"                self.router_id)"},{"line_number":64,"context_line":"            return [(\u0027PREROUTING\u0027, \u0027-i %s -d %s -j DNAT --to %s\u0027 %"},{"line_number":65,"context_line":"                 (rtr_2_fip_name, floating_ip, fixed_ip)),"},{"line_number":66,"context_line":"                (\u0027OUTPUT\u0027, \u0027-i %s -d %s -j DNAT --to %s\u0027 %"},{"line_number":67,"context_line":"                 (rtr_2_fip_name, floating_ip, fixed_ip)),"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_98bcb6dd","line":64,"range":{"start_line":64,"start_character":36,"end_line":64,"end_character":41},"in_reply_to":"5aef4532_8f1caec2","updated":"2016-03-09 15:55:45.000000000","message":"It does not disrupt the floatingip and its communication on the compute node.","commit_id":"746306ffed79ad35aae639600a6774ea66776568"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"700853ff6e8fd32fd7f0b4456c1e4dcccd1c7e96","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                self.router_id)"},{"line_number":64,"context_line":"            return [(\u0027PREROUTING\u0027, \u0027-i %s -d %s -j DNAT --to %s\u0027 %"},{"line_number":65,"context_line":"                 (rtr_2_fip_name, floating_ip, fixed_ip)),"},{"line_number":66,"context_line":"                (\u0027OUTPUT\u0027, \u0027-i %s -d %s -j DNAT --to %s\u0027 %"},{"line_number":67,"context_line":"                 (rtr_2_fip_name, floating_ip, fixed_ip)),"},{"line_number":68,"context_line":"                (\u0027float-snat\u0027, \u0027-s %s -j SNAT --to %s\u0027 %"},{"line_number":69,"context_line":"                 (fixed_ip, floating_ip))]"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_4cac7435","line":66,"range":{"start_line":66,"start_character":28,"end_line":66,"end_character":33},"updated":"2016-03-08 16:17:33.000000000","message":"This doesn\u0027t make sense in the context of the OUTPUT chain, I don\u0027t think.  I wonder if we just shouldn\u0027t add this rule at all in this case.","commit_id":"746306ffed79ad35aae639600a6774ea66776568"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"e4d6ba61542768a3748337d7ca203df92327b369","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                self.router_id)"},{"line_number":64,"context_line":"            return [(\u0027PREROUTING\u0027, \u0027-i %s -d %s -j DNAT --to %s\u0027 %"},{"line_number":65,"context_line":"                 (rtr_2_fip_name, floating_ip, fixed_ip)),"},{"line_number":66,"context_line":"                (\u0027OUTPUT\u0027, \u0027-i %s -d %s -j DNAT --to %s\u0027 %"},{"line_number":67,"context_line":"                 (rtr_2_fip_name, floating_ip, fixed_ip)),"},{"line_number":68,"context_line":"                (\u0027float-snat\u0027, \u0027-s %s -j SNAT --to %s\u0027 %"},{"line_number":69,"context_line":"                 (fixed_ip, floating_ip))]"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_b8b7f2f3","line":66,"range":{"start_line":66,"start_character":28,"end_line":66,"end_character":33},"in_reply_to":"5aef4532_4cac7435","updated":"2016-03-09 15:55:45.000000000","message":"I will try to remove it.","commit_id":"746306ffed79ad35aae639600a6774ea66776568"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"ebe67adc725a90276802846e6ecc9e76c3865cdd","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        else:"},{"line_number":62,"context_line":"            rtr_2_fip_name \u003d self.fip_ns.get_rtr_ext_device_name("},{"line_number":63,"context_line":"                self.router_id)"},{"line_number":64,"context_line":"            return [(\u0027PREROUTING\u0027, \u0027-i %s -d %s -j DNAT --to %s\u0027 %"},{"line_number":65,"context_line":"                 (rtr_2_fip_name, floating_ip, fixed_ip)),"},{"line_number":66,"context_line":"                (\u0027float-snat\u0027, \u0027-s %s -j SNAT --to %s\u0027 %"},{"line_number":67,"context_line":"                 (fixed_ip, floating_ip))]"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5aef4532_2e49b3d0","line":65,"range":{"start_line":64,"start_character":0,"end_line":65,"end_character":58},"updated":"2016-03-10 07:11:04.000000000","message":"This will change the current behaviors of router. Currently, if the src and dest are in the same host, the traffic will not go out of qrouter namespace. With this patch, the traffic from fixed ip to floatingip will always go through snat namespace or fip namespace.\n\nCould we just add the fip nat iptables rules to dvr local router? So that the dvr local router can act like other router(legacy router). I update [1] to implement this solution, pls review it.\n\n[1] https://review.openstack.org/#/c/285982/","commit_id":"df0409f1591e4c0ca0b875e3ab3c1002e899b823"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4da05c067bf7f9cd7abf8743bb1659cd1ab2162a","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        else:"},{"line_number":62,"context_line":"            rtr_2_fip_name \u003d self.fip_ns.get_rtr_ext_device_name("},{"line_number":63,"context_line":"                self.router_id)"},{"line_number":64,"context_line":"            return [(\u0027PREROUTING\u0027, \u0027-i %s -d %s -j DNAT --to %s\u0027 %"},{"line_number":65,"context_line":"                 (rtr_2_fip_name, floating_ip, fixed_ip)),"},{"line_number":66,"context_line":"                (\u0027float-snat\u0027, \u0027-s %s -j SNAT --to %s\u0027 %"},{"line_number":67,"context_line":"                 (fixed_ip, floating_ip))]"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a061dce_12d59942","line":65,"range":{"start_line":64,"start_character":0,"end_line":65,"end_character":58},"in_reply_to":"3afc51ec_04c5085a","updated":"2016-04-04 20:38:18.000000000","message":"Sorry to be a bit late to the game.  I don\u0027t see a good way to avoid going through the snat namespace.  We can\u0027t just SNAT to the router gateway address in a bunch of qrouter namespaces all over the network.  Shared SNAT has to be centralized unless you can figure out some way to coordinate the use of source ports between all of these independent places where SNAT is applied.\n\nI know that people would like to do all this routing local to the host but it an unwise optimization in cases where the source address needs to be rewritten to the router\u0027s gateway address.","commit_id":"df0409f1591e4c0ca0b875e3ab3c1002e899b823"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"232f84b6744e1ec512e2e7dd37e6e4c262f488d1","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        else:"},{"line_number":62,"context_line":"            rtr_2_fip_name \u003d self.fip_ns.get_rtr_ext_device_name("},{"line_number":63,"context_line":"                self.router_id)"},{"line_number":64,"context_line":"            return [(\u0027PREROUTING\u0027, \u0027-i %s -d %s -j DNAT --to %s\u0027 %"},{"line_number":65,"context_line":"                 (rtr_2_fip_name, floating_ip, fixed_ip)),"},{"line_number":66,"context_line":"                (\u0027float-snat\u0027, \u0027-s %s -j SNAT --to %s\u0027 %"},{"line_number":67,"context_line":"                 (fixed_ip, floating_ip))]"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3afc51ec_04c5085a","line":65,"range":{"start_line":64,"start_character":0,"end_line":65,"end_character":58},"in_reply_to":"3afc51ec_aea99ce1","updated":"2016-03-14 21:32:22.000000000","message":"@carl_baldwin can you comment on this.","commit_id":"df0409f1591e4c0ca0b875e3ab3c1002e899b823"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"3c3122f3cbffcd78ee8bdbb12e8f26c64a40ba5d","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        else:"},{"line_number":62,"context_line":"            rtr_2_fip_name \u003d self.fip_ns.get_rtr_ext_device_name("},{"line_number":63,"context_line":"                self.router_id)"},{"line_number":64,"context_line":"            return [(\u0027PREROUTING\u0027, \u0027-i %s -d %s -j DNAT --to %s\u0027 %"},{"line_number":65,"context_line":"                 (rtr_2_fip_name, floating_ip, fixed_ip)),"},{"line_number":66,"context_line":"                (\u0027float-snat\u0027, \u0027-s %s -j SNAT --to %s\u0027 %"},{"line_number":67,"context_line":"                 (fixed_ip, floating_ip))]"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3afc51ec_aea99ce1","line":65,"range":{"start_line":64,"start_character":0,"end_line":65,"end_character":58},"in_reply_to":"5aef4532_0f0aba25","updated":"2016-03-14 18:17:08.000000000","message":"Hi Hong Hui Xiao,\nyes, the reason it is going out of the router-namespace is, it needs to hit the fip namespace, otherwise, it does not make sense.\nsince in the case of dvr routers, we do have a separate fip namespace that actually handles the fip.","commit_id":"df0409f1591e4c0ca0b875e3ab3c1002e899b823"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"785141ac056a0d2633d9e29d9c383d0b54ba944a","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        else:"},{"line_number":62,"context_line":"            rtr_2_fip_name \u003d self.fip_ns.get_rtr_ext_device_name("},{"line_number":63,"context_line":"                self.router_id)"},{"line_number":64,"context_line":"            return [(\u0027PREROUTING\u0027, \u0027-i %s -d %s -j DNAT --to %s\u0027 %"},{"line_number":65,"context_line":"                 (rtr_2_fip_name, floating_ip, fixed_ip)),"},{"line_number":66,"context_line":"                (\u0027float-snat\u0027, \u0027-s %s -j SNAT --to %s\u0027 %"},{"line_number":67,"context_line":"                 (fixed_ip, floating_ip))]"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5aef4532_688c2ada","line":65,"range":{"start_line":64,"start_character":0,"end_line":65,"end_character":58},"in_reply_to":"5aef4532_2e49b3d0","updated":"2016-03-10 18:11:00.000000000","message":"I am still not convinced with this behavior since, when you are pinging an external interface ( fip) you should expect your Vm with no fixed ip to use the snat and then get to the fip.\nBut if you are trying to ping the private address, it is not going to use the snat.\n\nThat is my thought on this.","commit_id":"df0409f1591e4c0ca0b875e3ab3c1002e899b823"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"fbbc881a6c16c43e92cd0707d95a374baf4688fd","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        else:"},{"line_number":62,"context_line":"            rtr_2_fip_name \u003d self.fip_ns.get_rtr_ext_device_name("},{"line_number":63,"context_line":"                self.router_id)"},{"line_number":64,"context_line":"            return [(\u0027PREROUTING\u0027, \u0027-i %s -d %s -j DNAT --to %s\u0027 %"},{"line_number":65,"context_line":"                 (rtr_2_fip_name, floating_ip, fixed_ip)),"},{"line_number":66,"context_line":"                (\u0027float-snat\u0027, \u0027-s %s -j SNAT --to %s\u0027 %"},{"line_number":67,"context_line":"                 (fixed_ip, floating_ip))]"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5aef4532_0f0aba25","line":65,"range":{"start_line":64,"start_character":0,"end_line":65,"end_character":58},"in_reply_to":"5aef4532_688c2ada","updated":"2016-03-11 02:28:21.000000000","message":"I am not sure if I get your point. My intention is to simulate the behavior of legacy router. That is:\n\nIf a vm(without floating IP) try to ping another floating ip, the traffic will be SNAT to the external gateway ip, and DNAT to the fixed IP of destination. \n\nIf a vm(with floating IP) try to ping another floating ip, the traffic will be SNAT to the floating IP of source, and DNAT to the fixed IP of destination. \n\nBoth of the scenario will happen inside the qrouter namespace. And there is no packet found in the external network. I fixed a similar bug [1] recently. \n\nI understand your patch here can solve the same problem. Actually, from my test, your solution here and my solution at [2] have the same behavior from the source and destination\u0027 view. That is:\nSource: ping a floating IP, and get reply from that IP\nDestination: get a request from an external IP, and reply to that IP.\n\nBut the difference is that the solution here will make the traffic go outside of the qrouter namespace. I think that is the reason the functional test [2] breaks.\n\n[1] https://review.openstack.org/#/c/286392/\n[2] https://review.openstack.org/#/c/285982/\n[3] neutron.tests.functional.agent.l3.test_dvr_router.TestDvrRouter.test_connection_from_diff_address_scope_with_fip","commit_id":"df0409f1591e4c0ca0b875e3ab3c1002e899b823"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"9a82b9afa35497f1788412e02c6e4c8f88255f6e","unresolved":false,"context_lines":[{"line_number":62,"context_line":"            return []"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        rtr_2_fip_name \u003d self.fip_ns.get_rtr_ext_device_name(self.router_id)"},{"line_number":65,"context_line":"        return [(\u0027PREROUTING\u0027, \u0027-d %s/32 -i %s -j DNAT --to-destination %s\u0027 %"},{"line_number":66,"context_line":"                 (floating_ip, rtr_2_fip_name, fixed_ip)),"},{"line_number":67,"context_line":"                (\u0027float-snat\u0027, \u0027-s %s/32 -j SNAT --to-source %s\u0027 %"},{"line_number":68,"context_line":"                 (fixed_ip, floating_ip))]"}],"source_content_type":"text/x-python","patch_set":10,"id":"dab17558_c2ddc743","line":65,"range":{"start_line":65,"start_character":17,"end_line":65,"end_character":75},"updated":"2016-05-13 23:45:31.000000000","message":"Would you mind giving these helpful names like the rules on L75 and L78?  The names really help me to remember what the rules are meant to do.","commit_id":"aae10391f494d0fc906a0f5c36bde60796f0f6e2"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"4c16c6972f19086285ed9d3b81b60847f174b30c","unresolved":false,"context_lines":[{"line_number":62,"context_line":"            return []"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        rtr_2_fip_name \u003d self.fip_ns.get_rtr_ext_device_name(self.router_id)"},{"line_number":65,"context_line":"        return [(\u0027PREROUTING\u0027, \u0027-d %s/32 -i %s -j DNAT --to-destination %s\u0027 %"},{"line_number":66,"context_line":"                 (floating_ip, rtr_2_fip_name, fixed_ip)),"},{"line_number":67,"context_line":"                (\u0027float-snat\u0027, \u0027-s %s/32 -j SNAT --to-source %s\u0027 %"},{"line_number":68,"context_line":"                 (fixed_ip, floating_ip))]"}],"source_content_type":"text/x-python","patch_set":10,"id":"dab17558_ab896ecc","line":65,"range":{"start_line":65,"start_character":17,"end_line":65,"end_character":75},"in_reply_to":"dab17558_c2ddc743","updated":"2016-05-15 15:25:19.000000000","message":"Done","commit_id":"aae10391f494d0fc906a0f5c36bde60796f0f6e2"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"9a82b9afa35497f1788412e02c6e4c8f88255f6e","unresolved":false,"context_lines":[{"line_number":512,"context_line":"        if self.rtr_fip_subnet is None:"},{"line_number":513,"context_line":"            self.rtr_fip_subnet \u003d self.fip_ns.local_subnets.allocate("},{"line_number":514,"context_line":"                self.router_id)"},{"line_number":515,"context_line":"        rtr_2_fip, __ \u003d self.rtr_fip_subnet.get_pair()"},{"line_number":516,"context_line":"        exist_routes \u003d device.route.list_routes("},{"line_number":517,"context_line":"            l3_constants.IP_VERSION_4, **{\u0027via\u0027: str(rtr_2_fip.ip)})"},{"line_number":518,"context_line":"        return {common_utils.ip_to_cidr(route[\u0027cidr\u0027])"}],"source_content_type":"text/x-python","patch_set":10,"id":"dab17558_4466072a","line":515,"range":{"start_line":515,"start_character":19,"end_line":515,"end_character":21},"updated":"2016-05-13 23:45:31.000000000","message":"nit:  I think I\u0027d prefer _fip_2_rtr but that\u0027s just my own preference, I think.","commit_id":"aae10391f494d0fc906a0f5c36bde60796f0f6e2"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"4c16c6972f19086285ed9d3b81b60847f174b30c","unresolved":false,"context_lines":[{"line_number":512,"context_line":"        if self.rtr_fip_subnet is None:"},{"line_number":513,"context_line":"            self.rtr_fip_subnet \u003d self.fip_ns.local_subnets.allocate("},{"line_number":514,"context_line":"                self.router_id)"},{"line_number":515,"context_line":"        rtr_2_fip, __ \u003d self.rtr_fip_subnet.get_pair()"},{"line_number":516,"context_line":"        exist_routes \u003d device.route.list_routes("},{"line_number":517,"context_line":"            l3_constants.IP_VERSION_4, **{\u0027via\u0027: str(rtr_2_fip.ip)})"},{"line_number":518,"context_line":"        return {common_utils.ip_to_cidr(route[\u0027cidr\u0027])"}],"source_content_type":"text/x-python","patch_set":10,"id":"dab17558_cb8e72cf","line":515,"range":{"start_line":515,"start_character":19,"end_line":515,"end_character":21},"in_reply_to":"dab17558_4466072a","updated":"2016-05-15 15:25:19.000000000","message":"Done","commit_id":"aae10391f494d0fc906a0f5c36bde60796f0f6e2"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8c1b916f307ce869947c5fb58501639807840832","unresolved":false,"context_lines":[{"line_number":518,"context_line":"                self.router_id)"},{"line_number":519,"context_line":"        rtr_2_fip, _fip_2_rtr \u003d self.rtr_fip_subnet.get_pair()"},{"line_number":520,"context_line":"        exist_routes \u003d device.route.list_routes("},{"line_number":521,"context_line":"            l3_constants.IP_VERSION_4, **{\u0027via\u0027: str(rtr_2_fip.ip)})"},{"line_number":522,"context_line":"        return {common_utils.ip_to_cidr(route[\u0027cidr\u0027])"},{"line_number":523,"context_line":"                for route in exist_routes}"},{"line_number":524,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"bab6814e_7ce56236","line":521,"range":{"start_line":521,"start_character":39,"end_line":521,"end_character":67},"updated":"2016-05-20 16:30:25.000000000","message":"Just pass this like this:\n\n  exist_routes \u003d device.route.list_routes(\n      l3_constants.IP_VERSION_4, via\u003dstr(rtr_2_fip.ip))","commit_id":"b72a4099f8323f0834dd86dbbcb32ce841b4cf76"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"cd24edcd4f81824590d1eb73b3525c00c9d10f2e","unresolved":false,"context_lines":[{"line_number":518,"context_line":"                self.router_id)"},{"line_number":519,"context_line":"        rtr_2_fip, _fip_2_rtr \u003d self.rtr_fip_subnet.get_pair()"},{"line_number":520,"context_line":"        exist_routes \u003d device.route.list_routes("},{"line_number":521,"context_line":"            l3_constants.IP_VERSION_4, **{\u0027via\u0027: str(rtr_2_fip.ip)})"},{"line_number":522,"context_line":"        return {common_utils.ip_to_cidr(route[\u0027cidr\u0027])"},{"line_number":523,"context_line":"                for route in exist_routes}"},{"line_number":524,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"bab6814e_d3ee7fb3","line":521,"range":{"start_line":521,"start_character":39,"end_line":521,"end_character":67},"in_reply_to":"bab6814e_7ce56236","updated":"2016-05-24 12:59:49.000000000","message":"I\u0027ll push out a change for this so we can get this in.","commit_id":"b72a4099f8323f0834dd86dbbcb32ce841b4cf76"}],"neutron/tests/functional/agent/l3/test_dvr_router.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"9a82b9afa35497f1788412e02c6e4c8f88255f6e","unresolved":false,"context_lines":[{"line_number":895,"context_line":"        router.process(self.agent)"},{"line_number":896,"context_line":""},{"line_number":897,"context_line":"        # For the internal networks that are in the same address scope as"},{"line_number":898,"context_line":"        # external network, they should be able to reach the floating ip"},{"line_number":899,"context_line":"        net_helpers.assert_ping(machine_same_scope.namespace, fip, 5)"},{"line_number":900,"context_line":"        # For the port with fip, it should be able to reach the internal"},{"line_number":901,"context_line":"        # networks that are in the same address scope as external network"}],"source_content_type":"text/x-python","patch_set":10,"id":"dab17558_a77c1573","side":"PARENT","line":898,"range":{"start_line":898,"start_character":28,"end_line":898,"end_character":72},"updated":"2016-05-13 23:45:31.000000000","message":"I think I see now why this doesn\u0027t work.  So, for traffic from the internal port (external scope) to the floating IP.  The forward path will go through the snat namespace and arp for the floating ip on the external network.  The return path though is short-cut by the routing table in the qrouter.  I attempted to white-board it here [1].\n\n[1] https://drive.google.com/file/d/0B4AotMGstEW6bGU2aDJ4TTZnQjQ/view","commit_id":"36a04c9a308ec498f8e85b439a3b95ae22a15092"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"4c16c6972f19086285ed9d3b81b60847f174b30c","unresolved":false,"context_lines":[{"line_number":895,"context_line":"        router.process(self.agent)"},{"line_number":896,"context_line":""},{"line_number":897,"context_line":"        # For the internal networks that are in the same address scope as"},{"line_number":898,"context_line":"        # external network, they should be able to reach the floating ip"},{"line_number":899,"context_line":"        net_helpers.assert_ping(machine_same_scope.namespace, fip, 5)"},{"line_number":900,"context_line":"        # For the port with fip, it should be able to reach the internal"},{"line_number":901,"context_line":"        # networks that are in the same address scope as external network"}],"source_content_type":"text/x-python","patch_set":10,"id":"dab17558_a1686fbb","side":"PARENT","line":898,"range":{"start_line":898,"start_character":28,"end_line":898,"end_character":72},"in_reply_to":"dab17558_a77c1573","updated":"2016-05-15 15:25:19.000000000","message":"Things are little more complicated. From the observation, the icmp request can reach the rfp device, even the statistics of iptables DNAT(for floating IP) is increasing. But I can\u0027t tcpdump any icmp request from the vm\u0027s port. So the traffic is cut off because the real destined vm doesn\u0027t get the request.\n\nI guess it is because the router drop the request because:\n1) There is a route point to the source cidr in router namespace.\n2) The incoming port(rfp device) for request is not the same as the route.\n3) Router will treat this request as an invalid request, because the request comes from a port where it shouldn\u0027t.\n\nSo, I do this experiment, I delete the original route in qrouter namespace for the source cidr(ip r del 10.0.0.0/24 dev qr-xxxx)\n\nAfter that, I can tcpdump the icmp request from the vm\u0027s port. And after adding proper route to fip namespace. I can make this path connected.\n\nBut I think it is beyond the scope of this patch. It is more an address scope issue. And even if the path is connected. The functional test framework for DVR has some issues(for example, the duplicated mac address in line 269 and 300) which will not make the ping go through.  So I decided to remove this test case for DVR for now.","commit_id":"36a04c9a308ec498f8e85b439a3b95ae22a15092"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"9a82b9afa35497f1788412e02c6e4c8f88255f6e","unresolved":false,"context_lines":[{"line_number":897,"context_line":"        # For the internal networks that are in the same address scope as"},{"line_number":898,"context_line":"        # external network, they should be able to reach the floating ip"},{"line_number":899,"context_line":"        net_helpers.assert_ping(machine_same_scope.namespace, fip, 5)"},{"line_number":900,"context_line":"        # For the port with fip, it should be able to reach the internal"},{"line_number":901,"context_line":"        # networks that are in the same address scope as external network"},{"line_number":902,"context_line":"        net_helpers.assert_ping(machine_diff_scope.namespace,"},{"line_number":903,"context_line":"                                machine_same_scope.ip, 5)"}],"source_content_type":"text/x-python","patch_set":10,"id":"dab17558_e70c5d44","side":"PARENT","line":901,"range":{"start_line":900,"start_character":64,"end_line":901,"end_character":18},"updated":"2016-05-13 23:45:31.000000000","message":"I guess this doesn\u0027t work for a similar reason.  The routing table in qrouter1 will route traffic straight like other e/w traffic and that bypassed the DNAT part of the floating IP.  Is that right?","commit_id":"36a04c9a308ec498f8e85b439a3b95ae22a15092"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"4c16c6972f19086285ed9d3b81b60847f174b30c","unresolved":false,"context_lines":[{"line_number":897,"context_line":"        # For the internal networks that are in the same address scope as"},{"line_number":898,"context_line":"        # external network, they should be able to reach the floating ip"},{"line_number":899,"context_line":"        net_helpers.assert_ping(machine_same_scope.namespace, fip, 5)"},{"line_number":900,"context_line":"        # For the port with fip, it should be able to reach the internal"},{"line_number":901,"context_line":"        # networks that are in the same address scope as external network"},{"line_number":902,"context_line":"        net_helpers.assert_ping(machine_diff_scope.namespace,"},{"line_number":903,"context_line":"                                machine_same_scope.ip, 5)"}],"source_content_type":"text/x-python","patch_set":10,"id":"dab17558_8163abdc","side":"PARENT","line":901,"range":{"start_line":900,"start_character":64,"end_line":901,"end_character":18},"in_reply_to":"dab17558_e70c5d44","updated":"2016-05-15 15:25:19.000000000","message":"This actual is a success test case, because this is a traffic within host, which is also within the qrouter-namespace.\n\nI remove the test case because line 899.","commit_id":"36a04c9a308ec498f8e85b439a3b95ae22a15092"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"9a82b9afa35497f1788412e02c6e4c8f88255f6e","unresolved":false,"context_lines":[{"line_number":413,"context_line":"            self.assertTrue(ip_lib.device_exists("},{"line_number":414,"context_line":"                device_name, namespace\u003drouter.ns_name))"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"        # In the router namesapce, check the iptables rules are set correctly"},{"line_number":417,"context_line":"        for fip in floating_ips:"},{"line_number":418,"context_line":"            floatingip \u003d fip[\u0027floating_ip_address\u0027]"},{"line_number":419,"context_line":"            fixedip \u003d fip[\u0027fixed_ip_address\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"dab17558_444d6798","line":416,"range":{"start_line":416,"start_character":24,"end_line":416,"end_character":33},"updated":"2016-05-13 23:45:31.000000000","message":"*namespace","commit_id":"aae10391f494d0fc906a0f5c36bde60796f0f6e2"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"4c16c6972f19086285ed9d3b81b60847f174b30c","unresolved":false,"context_lines":[{"line_number":413,"context_line":"            self.assertTrue(ip_lib.device_exists("},{"line_number":414,"context_line":"                device_name, namespace\u003drouter.ns_name))"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"        # In the router namesapce, check the iptables rules are set correctly"},{"line_number":417,"context_line":"        for fip in floating_ips:"},{"line_number":418,"context_line":"            floatingip \u003d fip[\u0027floating_ip_address\u0027]"},{"line_number":419,"context_line":"            fixedip \u003d fip[\u0027fixed_ip_address\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"dab17558_0bbfda60","line":416,"range":{"start_line":416,"start_character":24,"end_line":416,"end_character":33},"in_reply_to":"dab17558_444d6798","updated":"2016-05-15 15:25:19.000000000","message":"Thanks","commit_id":"aae10391f494d0fc906a0f5c36bde60796f0f6e2"}]}
