)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"dbad8cfbfe9afbc332a24b461be8139b9bacd931","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Two things will cause DVR floating IP \u0027shortcut\u0027"},{"line_number":10,"context_line":"issue mentioned in bug #1462154:"},{"line_number":11,"context_line":"1) DVR floating IP DNAT iptable rules will do"},{"line_number":12,"context_line":"   DNAT to packets for VMs when they pinging"},{"line_number":13,"context_line":"   floating IPs, which belong to VMs on the"},{"line_number":14,"context_line":"   same router\u0027s private subnets, on the same"},{"line_number":15,"context_line":"   host."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1a26ad4f_d46ae3ed","line":12,"updated":"2015-11-02 11:40:52.000000000","message":"ping","commit_id":"56e6faf80c2afa389febaa10d5cd7e56d839152d"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"dbad8cfbfe9afbc332a24b461be8139b9bacd931","unresolved":false,"context_lines":[{"line_number":13,"context_line":"   floating IPs, which belong to VMs on the"},{"line_number":14,"context_line":"   same router\u0027s private subnets, on the same"},{"line_number":15,"context_line":"   host."},{"line_number":16,"context_line":"2) Current designment will add floating IPs onto"},{"line_number":17,"context_line":"   rfp devices, so even we fix 1), packets will"},{"line_number":18,"context_line":"   go to rfp devices, the wrong destinations."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1a26ad4f_746bcff1","line":16,"updated":"2015-11-02 11:40:52.000000000","message":"designment? do you mean design?","commit_id":"56e6faf80c2afa389febaa10d5cd7e56d839152d"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"dbad8cfbfe9afbc332a24b461be8139b9bacd931","unresolved":false,"context_lines":[{"line_number":14,"context_line":"   same router\u0027s private subnets, on the same"},{"line_number":15,"context_line":"   host."},{"line_number":16,"context_line":"2) Current designment will add floating IPs onto"},{"line_number":17,"context_line":"   rfp devices, so even we fix 1), packets will"},{"line_number":18,"context_line":"   go to rfp devices, the wrong destinations."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"This patch will try to fix the issue by:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1a26ad4f_9470ebdd","line":17,"updated":"2015-11-02 11:40:52.000000000","message":"will still go","commit_id":"56e6faf80c2afa389febaa10d5cd7e56d839152d"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"dbad8cfbfe9afbc332a24b461be8139b9bacd931","unresolved":false,"context_lines":[{"line_number":18,"context_line":"   go to rfp devices, the wrong destinations."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"This patch will try to fix the issue by:"},{"line_number":21,"context_line":"1) fix PREROUTING rule for DVR floating IPs."},{"line_number":22,"context_line":"2) remove code try to add floating IPs onto rfp"},{"line_number":23,"context_line":"   devices. And for method like \u0027scan_fip_ports\u0027,"},{"line_number":24,"context_line":"   try scanning floating IP routes in fip netns"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1a26ad4f_347a37be","line":21,"updated":"2015-11-02 11:40:52.000000000","message":"fixing PREROUTING rules for DVR floating IPs","commit_id":"56e6faf80c2afa389febaa10d5cd7e56d839152d"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"dbad8cfbfe9afbc332a24b461be8139b9bacd931","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"This patch will try to fix the issue by:"},{"line_number":21,"context_line":"1) fix PREROUTING rule for DVR floating IPs."},{"line_number":22,"context_line":"2) remove code try to add floating IPs onto rfp"},{"line_number":23,"context_line":"   devices. And for method like \u0027scan_fip_ports\u0027,"},{"line_number":24,"context_line":"   try scanning floating IP routes in fip netns"},{"line_number":25,"context_line":"   instead."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1a26ad4f_5477b3d2","line":22,"updated":"2015-11-02 11:40:52.000000000","message":"Remove code that tries to add floating IPs onto rfp","commit_id":"56e6faf80c2afa389febaa10d5cd7e56d839152d"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"dbad8cfbfe9afbc332a24b461be8139b9bacd931","unresolved":false,"context_lines":[{"line_number":20,"context_line":"This patch will try to fix the issue by:"},{"line_number":21,"context_line":"1) fix PREROUTING rule for DVR floating IPs."},{"line_number":22,"context_line":"2) remove code try to add floating IPs onto rfp"},{"line_number":23,"context_line":"   devices. And for method like \u0027scan_fip_ports\u0027,"},{"line_number":24,"context_line":"   try scanning floating IP routes in fip netns"},{"line_number":25,"context_line":"   instead."},{"line_number":26,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1a26ad4f_f47fdfa8","line":23,"updated":"2015-11-02 11:40:52.000000000","message":"Change methods like \u0027scan_fip_ports\u0027 to try scanning for floating IP routes in fip netns instread","commit_id":"56e6faf80c2afa389febaa10d5cd7e56d839152d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ef8f83baea846faf93eb2c9c6d24fbe74bdae6c6","unresolved":false,"context_lines":[{"line_number":7,"context_line":"fix DVR floating IP shortcut issue"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently, there is a \"shortcut\" issue existing on DVR floating IP."},{"line_number":10,"context_line":"Image we have VM-1 and VM-2 on the same host, and their subnets are"},{"line_number":11,"context_line":"attached onto the same router, and VM-2 has floating IP associated."},{"line_number":12,"context_line":"When VM-1 ping VM-2 by floating IP, its packets will directly routed"},{"line_number":13,"context_line":"by DVR local router to VM-2, not going external network by passing"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"1a26ad4f_0dce092e","line":10,"updated":"2015-11-02 14:59:35.000000000","message":"Image \u003d\u003e Imagine","commit_id":"52281edb9f8790d58fdbea2d6563beb5f1b04c58"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ef8f83baea846faf93eb2c9c6d24fbe74bdae6c6","unresolved":false,"context_lines":[{"line_number":18,"context_line":"Fixing PREROUTING rules for DVR floating IP will be one point this"},{"line_number":19,"context_line":"patch trying to do."},{"line_number":20,"context_line":"After we fix DNAT rules, rfp device in DVR local router namespace,"},{"line_number":21,"context_line":"which hosting floating IP address will \"hijack\" VM-1\u0027s packets to VM-2"},{"line_number":22,"context_line":"floating IP. So this patch will also try to remove code which try"},{"line_number":23,"context_line":"to add floating IP onto rfp device, and change methods like"},{"line_number":24,"context_line":"\"scan_fip_ports\" to try scanning for floating IP routes in fip netns"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"1a26ad4f_4de08196","line":21,"updated":"2015-11-02 14:59:35.000000000","message":"This sounds like a major security issue","commit_id":"52281edb9f8790d58fdbea2d6563beb5f1b04c58"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"409ba45a41edcdb6cf7acafd33fd0a978c037ed7","unresolved":false,"context_lines":[{"line_number":19,"context_line":"changing the destination IP address of the packet. This patch will try"},{"line_number":20,"context_line":"to fix that."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"The patch also removes code which tries to add the floating IP to the rfp"},{"line_number":23,"context_line":"device in the DVR local router namespace. Since DVR floating IP DNAT rules"},{"line_number":24,"context_line":"no longer change destination IP address for egress traffic, the rfp device"},{"line_number":25,"context_line":"hosting floating IP address will prevents egress traffic from reaching the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"fa80f949_1c25fdbf","line":22,"updated":"2015-11-06 03:08:55.000000000","message":"Aside:  I think this is probably the right approach and is almost exactly what I had in mind when I reviewed [1].\n\nI wonder if a future patch should take this even further.  I have been wondering if the router should ever have the floating ips configured on a local interface.  I would like to see a follow-on patch to this one to change non-DVR routers to use proxy arp for floating ips instead of configuring them on the interface.  I\u0027m a little uncomfortable doing it differently for DVR than for non-DVR.\n\nIf we decide to do this, it might come as a surprise to people and/or tools which are accustomed to looking on the gateway interface to see what floating ips are configured in the router.  We\u0027ll want to be sure any documentation around this gets updated.\n\n [1] https://review.openstack.org/#/c/233334/1//COMMIT_MSG","commit_id":"c699f9c6e8a8b40a4aba47d5ea1266b3c49276d1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"174d8ef64af7f1ff470a4caaff69480e01d34ecc","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     lzklibj \u003clzklibj@cn.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-11-11 00:47:37 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"WIP fix DVR floating IP iptables rules"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"WIP: will update UT and commit message later"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"da85f559_675edb45","line":7,"updated":"2015-11-11 09:58:42.000000000","message":"@Zong Kai, based on Carl\u0027s comment on patch 10. It is the right thing to do here. \n\nBut the commit message here is still \"DVR XXXXX\". So, either change the message here, or split the change into DVR/HA/Legacy","commit_id":"37370c30cc09031e9bc4cc8e8ef8b6930dd8a80d"}],"neutron/agent/l3/dvr_fip_ns.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"409ba45a41edcdb6cf7acafd33fd0a978c037ed7","unresolved":false,"context_lines":[{"line_number":252,"context_line":"        fip_2_rtr_name \u003d self.get_int_device_name(ri.router_id)"},{"line_number":253,"context_line":"        if not ip_lib.device_exists(fip_2_rtr_name, namespace\u003dfip_ns_name):"},{"line_number":254,"context_line":"            return"},{"line_number":255,"context_line":"        fip_routes \u003d ip_lib.get_routing_table(4, fip_ns_name)"},{"line_number":256,"context_line":"        fip_ips \u003d ["},{"line_number":257,"context_line":"            r.get(\u0027destination\u0027) for r in fip_routes"},{"line_number":258,"context_line":"            if (\u0027/\u0027 not in r.get(\u0027destination\u0027) and"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa80f949_9c1fad6b","line":255,"updated":"2015-11-06 03:08:55.000000000","message":"Nit:  Use a constant instead of the hard-coded 4.","commit_id":"c699f9c6e8a8b40a4aba47d5ea1266b3c49276d1"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"4e16fce9995aee2087f51eda15fba54bc0373ebc","unresolved":false,"context_lines":[{"line_number":260,"context_line":"            if re.search(float_snat_pattern, rule):"},{"line_number":261,"context_line":"                rule \u003d rule.split()"},{"line_number":262,"context_line":"                fip_ip \u003d rule[-1]"},{"line_number":263,"context_line":"                fixed_ip \u003d rule[4]"},{"line_number":264,"context_line":"                rule_pr \u003d existing_rule.get(fixed_ip)"},{"line_number":265,"context_line":"                if not rule_pr:"},{"line_number":266,"context_line":"                    rule_pr \u003d self._rule_priorities.allocate(fip_ip)"}],"source_content_type":"text/x-python","patch_set":11,"id":"da85f559_2c2ed3fa","line":263,"updated":"2015-11-13 23:05:04.000000000","message":"A \u0027rule\u0027 line looks like this:\n   \u0027-A neutron-l3-agent-float-snat -s \u003cfixed_ip_cidr\u003e -j SNAT --to-source \u003cfip\u003e\u0027\nSo rule[4] is \u0027-j\u0027.  \nAlso fixed_ip should only the part on the left side of the \u0027/\u0027 because the \u0027from\u0027 part of a ip rule element is only the fixed ip address, not the fixed_ip cidr.","commit_id":"37370c30cc09031e9bc4cc8e8ef8b6930dd8a80d"}],"neutron/agent/l3/router_info.py":[{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"f41af832934557a517c8805dfa1cbf1d716af107","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        \"\"\"Filter Floating IPs to be hosted on this agent.\"\"\""},{"line_number":143,"context_line":"        return self.router.get(l3_constants.FLOATINGIP_KEY, [])"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"    def floating_forward_rules(self, floating_ip, fixed_ip, distributed):"},{"line_number":146,"context_line":"        if distributed:"},{"line_number":147,"context_line":"            prerouting_rule \u003d (\u0027! -i qr-+ -d %s -j DNAT --to %s\u0027 %"},{"line_number":148,"context_line":"                 (floating_ip, fixed_ip))"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a26ad4f_d5f0aa93","line":145,"updated":"2015-11-02 04:49:47.000000000","message":"should override this method for DvrLocalRouter.  The method here is meant for centralized router.","commit_id":"97db99fa5858ccd3e38c661a37d4c9279767517e"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"680bf31cb0d01ff176f11d87d6fec9786e9850bd","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        \"\"\"Filter Floating IPs to be hosted on this agent.\"\"\""},{"line_number":143,"context_line":"        return self.router.get(l3_constants.FLOATINGIP_KEY, [])"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"    def floating_forward_rules(self, floating_ip, fixed_ip, distributed):"},{"line_number":146,"context_line":"        if distributed:"},{"line_number":147,"context_line":"            prerouting_rule \u003d (\u0027! -i qr-+ -d %s -j DNAT --to %s\u0027 %"},{"line_number":148,"context_line":"                 (floating_ip, fixed_ip))"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a26ad4f_9b2ee141","line":145,"in_reply_to":"1a26ad4f_383f9325","updated":"2015-11-02 06:41:35.000000000","message":"Done","commit_id":"97db99fa5858ccd3e38c661a37d4c9279767517e"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"afc47d9678947bf56f99c028e83607135e03b4cb","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        \"\"\"Filter Floating IPs to be hosted on this agent.\"\"\""},{"line_number":143,"context_line":"        return self.router.get(l3_constants.FLOATINGIP_KEY, [])"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"    def floating_forward_rules(self, floating_ip, fixed_ip, distributed):"},{"line_number":146,"context_line":"        if distributed:"},{"line_number":147,"context_line":"            prerouting_rule \u003d (\u0027! -i qr-+ -d %s -j DNAT --to %s\u0027 %"},{"line_number":148,"context_line":"                 (floating_ip, fixed_ip))"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a26ad4f_383f9325","line":145,"in_reply_to":"1a26ad4f_d5f0aa93","updated":"2015-11-02 05:47:22.000000000","message":"OK, acceptable to me.","commit_id":"97db99fa5858ccd3e38c661a37d4c9279767517e"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"f41af832934557a517c8805dfa1cbf1d716af107","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        # Clear out all iptables rules for floating ips"},{"line_number":164,"context_line":"        self.iptables_manager.ipv4[\u0027nat\u0027].clear_rules_by_tag(\u0027floating_ip\u0027)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        distributed \u003d self.router.get(\u0027distributed\u0027, False)"},{"line_number":167,"context_line":"        floating_ips \u003d self.get_floating_ips()"},{"line_number":168,"context_line":"        # Loop once to ensure that floating ips are configured."},{"line_number":169,"context_line":"        for fip in floating_ips:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a26ad4f_f5eda6b7","line":166,"updated":"2015-11-02 04:49:47.000000000","message":"See comments for L145.","commit_id":"97db99fa5858ccd3e38c661a37d4c9279767517e"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"680bf31cb0d01ff176f11d87d6fec9786e9850bd","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        # Clear out all iptables rules for floating ips"},{"line_number":164,"context_line":"        self.iptables_manager.ipv4[\u0027nat\u0027].clear_rules_by_tag(\u0027floating_ip\u0027)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        distributed \u003d self.router.get(\u0027distributed\u0027, False)"},{"line_number":167,"context_line":"        floating_ips \u003d self.get_floating_ips()"},{"line_number":168,"context_line":"        # Loop once to ensure that floating ips are configured."},{"line_number":169,"context_line":"        for fip in floating_ips:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a26ad4f_bb339daa","line":166,"in_reply_to":"1a26ad4f_f5eda6b7","updated":"2015-11-02 06:41:35.000000000","message":"Done","commit_id":"97db99fa5858ccd3e38c661a37d4c9279767517e"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"f41af832934557a517c8805dfa1cbf1d716af107","unresolved":false,"context_lines":[{"line_number":225,"context_line":""},{"line_number":226,"context_line":"        device \u003d ip_lib.IPDevice(interface_name, namespace\u003dself.ns_name)"},{"line_number":227,"context_line":"        if self.router.get(\u0027distributed\u0027):"},{"line_number":228,"context_line":"            fip_routes \u003d ip_lib.get_routing_table(4, self.fip_ns.name)"},{"line_number":229,"context_line":"            existing_cidrs \u003d set(["},{"line_number":230,"context_line":"                common_utils.ip_to_cidr(r.get(\u0027destination\u0027))"},{"line_number":231,"context_line":"                for r in fip_routes"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a26ad4f_1542a2ae","line":228,"updated":"2015-11-02 04:49:47.000000000","message":"Why not just override get_router_cidrs in DvrLocalRouter?","commit_id":"97db99fa5858ccd3e38c661a37d4c9279767517e"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"afc47d9678947bf56f99c028e83607135e03b4cb","unresolved":false,"context_lines":[{"line_number":225,"context_line":""},{"line_number":226,"context_line":"        device \u003d ip_lib.IPDevice(interface_name, namespace\u003dself.ns_name)"},{"line_number":227,"context_line":"        if self.router.get(\u0027distributed\u0027):"},{"line_number":228,"context_line":"            fip_routes \u003d ip_lib.get_routing_table(4, self.fip_ns.name)"},{"line_number":229,"context_line":"            existing_cidrs \u003d set(["},{"line_number":230,"context_line":"                common_utils.ip_to_cidr(r.get(\u0027destination\u0027))"},{"line_number":231,"context_line":"                for r in fip_routes"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a26ad4f_d8c69f67","line":228,"in_reply_to":"1a26ad4f_1542a2ae","updated":"2015-11-02 05:47:22.000000000","message":"Good point, will do it in next PS.","commit_id":"97db99fa5858ccd3e38c661a37d4c9279767517e"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"680bf31cb0d01ff176f11d87d6fec9786e9850bd","unresolved":false,"context_lines":[{"line_number":225,"context_line":""},{"line_number":226,"context_line":"        device \u003d ip_lib.IPDevice(interface_name, namespace\u003dself.ns_name)"},{"line_number":227,"context_line":"        if self.router.get(\u0027distributed\u0027):"},{"line_number":228,"context_line":"            fip_routes \u003d ip_lib.get_routing_table(4, self.fip_ns.name)"},{"line_number":229,"context_line":"            existing_cidrs \u003d set(["},{"line_number":230,"context_line":"                common_utils.ip_to_cidr(r.get(\u0027destination\u0027))"},{"line_number":231,"context_line":"                for r in fip_routes"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a26ad4f_1b23b157","line":228,"in_reply_to":"1a26ad4f_d8c69f67","updated":"2015-11-02 06:41:35.000000000","message":"Well, after try, I found it\u0027s not easy to override this method. I\u0027d like to override like:\n\n    def get_router_cidrs(self, device\u003dNone):\n        if device:\n            return super(DvrLocalRouter, self).get_router_cidrs(device)\n        else:\n            fip_routes \u003d ip_lib.get_routing_table(4, self.fip_ns.name)\n            existing_cidrs \u003d set([\n                common_utils.ip_to_cidr(r.get(\u0027destination\u0027))\n                for r in fip_routes\n                if (r.get(\u0027destination\u0027) !\u003d \u0027default\u0027 and\n                    \u0027/\u0027 not in r.get(\u0027destination\u0027))])\n\nI think that will be acceptable both for this case or for case try to get cidrs on device.\n\nBut we will always pass device to get_router_cidrs, so the else branch in previous override will never be entered in this case.\n\nSo, I think we can keep code here, not to override a DvrLocalRouter one.","commit_id":"97db99fa5858ccd3e38c661a37d4c9279767517e"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"f41af832934557a517c8805dfa1cbf1d716af107","unresolved":false,"context_lines":[{"line_number":257,"context_line":"        else:"},{"line_number":258,"context_line":"            fips_to_remove \u003d ("},{"line_number":259,"context_line":"                ip_cidr for ip_cidr in existing_cidrs - new_cidrs"},{"line_number":260,"context_line":"                if common_utils.is_cidr_host(ip_cidr))"},{"line_number":261,"context_line":"        for ip_cidr in fips_to_remove:"},{"line_number":262,"context_line":"            LOG.debug(\"Removing floating ip %s from interface %s in \""},{"line_number":263,"context_line":"                      \"namespace %s\", ip_cidr, interface_name, self.ns_name)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a26ad4f_353f9e25","line":260,"updated":"2015-11-02 04:49:47.000000000","message":"Ditto.","commit_id":"97db99fa5858ccd3e38c661a37d4c9279767517e"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"b2b277b311465022be97d9e7b6db8dd80b326c87","unresolved":false,"context_lines":[{"line_number":225,"context_line":"                if (r.get(\u0027destination\u0027) !\u003d \u0027default\u0027 and"},{"line_number":226,"context_line":"                    \u0027/\u0027 not in r.get(\u0027destination\u0027))])"},{"line_number":227,"context_line":"        else:"},{"line_number":228,"context_line":"            existing_cidrs \u003d self.get_router_cidrs(device)"},{"line_number":229,"context_line":"        new_cidrs \u003d set()"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        floating_ips \u003d self.get_floating_ips()"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a26ad4f_7b741367","line":228,"updated":"2015-11-02 16:00:58.000000000","message":"L220 - 226 is another case where the DVR specific handling can be defined in a get_router_cidrs method in the DvrLocalRouter class.","commit_id":"48d9331d81b93dcf8a815cd62099cee5dea68416"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"03868726beaf04f4822d000625b72c74cc0ad040","unresolved":false,"context_lines":[{"line_number":225,"context_line":"                if (r.get(\u0027destination\u0027) !\u003d \u0027default\u0027 and"},{"line_number":226,"context_line":"                    \u0027/\u0027 not in r.get(\u0027destination\u0027))])"},{"line_number":227,"context_line":"        else:"},{"line_number":228,"context_line":"            existing_cidrs \u003d self.get_router_cidrs(device)"},{"line_number":229,"context_line":"        new_cidrs \u003d set()"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        floating_ips \u003d self.get_floating_ips()"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa80f949_753ce22f","line":228,"in_reply_to":"1a26ad4f_7b741367","updated":"2015-11-03 10:21:30.000000000","message":"Done","commit_id":"48d9331d81b93dcf8a815cd62099cee5dea68416"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"b2b277b311465022be97d9e7b6db8dd80b326c87","unresolved":false,"context_lines":[{"line_number":250,"context_line":"        else:"},{"line_number":251,"context_line":"            fips_to_remove \u003d ("},{"line_number":252,"context_line":"                ip_cidr for ip_cidr in existing_cidrs - new_cidrs"},{"line_number":253,"context_line":"                if common_utils.is_cidr_host(ip_cidr))"},{"line_number":254,"context_line":"        for ip_cidr in fips_to_remove:"},{"line_number":255,"context_line":"            LOG.debug(\"Removing floating ip %s from interface %s in \""},{"line_number":256,"context_line":"                      \"namespace %s\", ip_cidr, interface_name, self.ns_name)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a26ad4f_7b6f332b","line":253,"updated":"2015-11-02 16:00:58.000000000","message":"You can also do an the same method override here by introducing a calculate_fips_to_remove method for RouterInfo and DvrLocalRouter.","commit_id":"48d9331d81b93dcf8a815cd62099cee5dea68416"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"3f149a104adde9c4ca7adb3f404bad95d87a6d3c","unresolved":false,"context_lines":[{"line_number":250,"context_line":"        else:"},{"line_number":251,"context_line":"            fips_to_remove \u003d ("},{"line_number":252,"context_line":"                ip_cidr for ip_cidr in existing_cidrs - new_cidrs"},{"line_number":253,"context_line":"                if common_utils.is_cidr_host(ip_cidr))"},{"line_number":254,"context_line":"        for ip_cidr in fips_to_remove:"},{"line_number":255,"context_line":"            LOG.debug(\"Removing floating ip %s from interface %s in \""},{"line_number":256,"context_line":"                      \"namespace %s\", ip_cidr, interface_name, self.ns_name)"}],"source_content_type":"text/x-python","patch_set":7,"id":"da85f559_828d7a7d","line":253,"in_reply_to":"1a26ad4f_7b6f332b","updated":"2015-11-08 02:54:52.000000000","message":"Hi, stephen, I will try to follow comments here. Thanks.","commit_id":"48d9331d81b93dcf8a815cd62099cee5dea68416"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"03868726beaf04f4822d000625b72c74cc0ad040","unresolved":false,"context_lines":[{"line_number":250,"context_line":"        else:"},{"line_number":251,"context_line":"            fips_to_remove \u003d ("},{"line_number":252,"context_line":"                ip_cidr for ip_cidr in existing_cidrs - new_cidrs"},{"line_number":253,"context_line":"                if common_utils.is_cidr_host(ip_cidr))"},{"line_number":254,"context_line":"        for ip_cidr in fips_to_remove:"},{"line_number":255,"context_line":"            LOG.debug(\"Removing floating ip %s from interface %s in \""},{"line_number":256,"context_line":"                      \"namespace %s\", ip_cidr, interface_name, self.ns_name)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa80f949_95594691","line":253,"in_reply_to":"1a26ad4f_7b6f332b","updated":"2015-11-03 10:21:30.000000000","message":"I\u0027m not sure whether it worth to write a new method for this if-else block. I tried to write in a better way.","commit_id":"48d9331d81b93dcf8a815cd62099cee5dea68416"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"62ac7cbe6cf43c3b4acdd3049133d8a8a3213912","unresolved":false,"context_lines":[{"line_number":238,"context_line":"                # that\u0027s how the caller determines that it was removed"},{"line_number":239,"context_line":"                fip_statuses[fip[\u0027id\u0027]] \u003d FLOATINGIP_STATUS_NOCHANGE"},{"line_number":240,"context_line":"        fips_to_remove \u003d existing_cidrs - new_cidrs"},{"line_number":241,"context_line":"        if not self.router.get(\u0027distributed\u0027, False):"},{"line_number":242,"context_line":"            fips_to_remove \u003d (ip_cidr for ip_cidr in fips_to_remove"},{"line_number":243,"context_line":"                              if common_utils.is_cidr_host(ip_cidr))"},{"line_number":244,"context_line":"        for ip_cidr in fips_to_remove:"}],"source_content_type":"text/x-python","patch_set":10,"id":"da85f559_7774e8ce","line":241,"updated":"2015-11-06 22:24:52.000000000","message":"Hmm.  This class (from what I remember) tries to be agnostic and not have any DVR-aware code in it, so this will need to be put into its own method, then over-ridden (in dvr_local_router.py ?) to do something different.","commit_id":"c699f9c6e8a8b40a4aba47d5ea1266b3c49276d1"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"f9958dd09ff95e2c1d5437b4936f424306f83bc0","unresolved":false,"context_lines":[{"line_number":238,"context_line":"                # that\u0027s how the caller determines that it was removed"},{"line_number":239,"context_line":"                fip_statuses[fip[\u0027id\u0027]] \u003d FLOATINGIP_STATUS_NOCHANGE"},{"line_number":240,"context_line":"        fips_to_remove \u003d existing_cidrs - new_cidrs"},{"line_number":241,"context_line":"        if not self.router.get(\u0027distributed\u0027, False):"},{"line_number":242,"context_line":"            fips_to_remove \u003d (ip_cidr for ip_cidr in fips_to_remove"},{"line_number":243,"context_line":"                              if common_utils.is_cidr_host(ip_cidr))"},{"line_number":244,"context_line":"        for ip_cidr in fips_to_remove:"}],"source_content_type":"text/x-python","patch_set":10,"id":"da85f559_a2967e92","line":241,"in_reply_to":"da85f559_7774e8ce","updated":"2015-11-08 02:54:32.000000000","message":"OK, I will try.","commit_id":"c699f9c6e8a8b40a4aba47d5ea1266b3c49276d1"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"62ac7cbe6cf43c3b4acdd3049133d8a8a3213912","unresolved":false,"context_lines":[{"line_number":242,"context_line":"            fips_to_remove \u003d (ip_cidr for ip_cidr in fips_to_remove"},{"line_number":243,"context_line":"                              if common_utils.is_cidr_host(ip_cidr))"},{"line_number":244,"context_line":"        for ip_cidr in fips_to_remove:"},{"line_number":245,"context_line":"            LOG.debug(\"Removing floating ip\", ip_cidr)"},{"line_number":246,"context_line":"            self.remove_floating_ip(device, ip_cidr)"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"        return fip_statuses"}],"source_content_type":"text/x-python","patch_set":10,"id":"da85f559_97814cfe","line":245,"updated":"2015-11-06 22:24:52.000000000","message":"Missing %s here","commit_id":"c699f9c6e8a8b40a4aba47d5ea1266b3c49276d1"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"f9958dd09ff95e2c1d5437b4936f424306f83bc0","unresolved":false,"context_lines":[{"line_number":242,"context_line":"            fips_to_remove \u003d (ip_cidr for ip_cidr in fips_to_remove"},{"line_number":243,"context_line":"                              if common_utils.is_cidr_host(ip_cidr))"},{"line_number":244,"context_line":"        for ip_cidr in fips_to_remove:"},{"line_number":245,"context_line":"            LOG.debug(\"Removing floating ip\", ip_cidr)"},{"line_number":246,"context_line":"            self.remove_floating_ip(device, ip_cidr)"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"        return fip_statuses"}],"source_content_type":"text/x-python","patch_set":10,"id":"da85f559_62909696","line":245,"in_reply_to":"da85f559_97814cfe","updated":"2015-11-08 02:54:32.000000000","message":"Done","commit_id":"c699f9c6e8a8b40a4aba47d5ea1266b3c49276d1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"174d8ef64af7f1ff470a4caaff69480e01d34ecc","unresolved":false,"context_lines":[{"line_number":192,"context_line":"                         \"floating IP: %s\"), fip[\u0027id\u0027])"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    def add_floating_ip(self, fip, interface_name, device):"},{"line_number":195,"context_line":"        # As GARP is processed in a distinct thread the call below"},{"line_number":196,"context_line":"        # won\u0027t raise an exception to be handled."},{"line_number":197,"context_line":"        (ip_lib.IPDevice(ip_lib.LOOPBACK_DEVNAME, self.ns_name)."},{"line_number":198,"context_line":"         route.add_route(str(netaddr.IPNetwork(fip[\u0027floating_ip_address\u0027]))))"}],"source_content_type":"text/x-python","patch_set":11,"id":"da85f559_02bd7d01","line":195,"updated":"2015-11-11 09:58:42.000000000","message":"Have you considered that when HA router state changed, (for example, master router down and a new master router is elected)\n\nwill this  route still apply in the new master router? I am afraid not~","commit_id":"37370c30cc09031e9bc4cc8e8ef8b6930dd8a80d"}],"neutron/agent/linux/ip_lib.py":[{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"b2b277b311465022be97d9e7b6db8dd80b326c87","unresolved":false,"context_lines":[{"line_number":44,"context_line":"METRIC_PATTERN \u003d re.compile(r\"metric (\\S+)\")"},{"line_number":45,"context_line":"DEVICE_NAME_PATTERN \u003d re.compile(r\"(\\d+?): (\\S+?):.*\")"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"ROUTER_2_FIP_DEV_PREFIX \u003d \u0027rfp-\u0027"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"class AddressNotReady(exceptions.NeutronException):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a26ad4f_9b5d6f49","line":47,"updated":"2015-11-02 16:00:58.000000000","message":"The rfp device prefix is already defined in neutron/agent/l3/namespaces.py. Also, the methods of the classes defined in this file shouldn\u0027t need to be aware how DVR is realized.","commit_id":"48d9331d81b93dcf8a815cd62099cee5dea68416"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"03868726beaf04f4822d000625b72c74cc0ad040","unresolved":false,"context_lines":[{"line_number":44,"context_line":"METRIC_PATTERN \u003d re.compile(r\"metric (\\S+)\")"},{"line_number":45,"context_line":"DEVICE_NAME_PATTERN \u003d re.compile(r\"(\\d+?): (\\S+?):.*\")"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"ROUTER_2_FIP_DEV_PREFIX \u003d \u0027rfp-\u0027"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"class AddressNotReady(exceptions.NeutronException):"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa80f949_75514262","line":47,"in_reply_to":"1a26ad4f_9b5d6f49","updated":"2015-11-03 10:21:30.000000000","message":"Done","commit_id":"48d9331d81b93dcf8a815cd62099cee5dea68416"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"b2b277b311465022be97d9e7b6db8dd80b326c87","unresolved":false,"context_lines":[{"line_number":269,"context_line":"            can also be passed."},{"line_number":270,"context_line":"        \"\"\""},{"line_number":271,"context_line":"        if not self.name.startswith(ROUTER_2_FIP_DEV_PREFIX):"},{"line_number":272,"context_line":"            self.addr.delete(cidr)"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"        ip_str \u003d str(netaddr.IPNetwork(cidr).ip)"},{"line_number":275,"context_line":"        ip_wrapper \u003d IPWrapper(namespace\u003dself.namespace)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a26ad4f_9b248fc5","line":272,"updated":"2015-11-02 16:00:58.000000000","message":"Can the statements above be added to a new or existing method in the DvrLocalRouter class?  Also the objects from the classes in this file shouldn\u0027t be aware of how DVR is implemented.","commit_id":"48d9331d81b93dcf8a815cd62099cee5dea68416"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"03868726beaf04f4822d000625b72c74cc0ad040","unresolved":false,"context_lines":[{"line_number":269,"context_line":"            can also be passed."},{"line_number":270,"context_line":"        \"\"\""},{"line_number":271,"context_line":"        if not self.name.startswith(ROUTER_2_FIP_DEV_PREFIX):"},{"line_number":272,"context_line":"            self.addr.delete(cidr)"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"        ip_str \u003d str(netaddr.IPNetwork(cidr).ip)"},{"line_number":275,"context_line":"        ip_wrapper \u003d IPWrapper(namespace\u003dself.namespace)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa80f949_55dbdeed","line":272,"in_reply_to":"1a26ad4f_9b248fc5","updated":"2015-11-03 10:21:30.000000000","message":"Yes, you\u0027re right, this file shouldn\u0027t know that.","commit_id":"48d9331d81b93dcf8a815cd62099cee5dea68416"}],"neutron/tests/unit/agent/l3/test_dvr_local_router.py":[{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"4d7582ecd330ad880c86e65cd7c894530ff8654a","unresolved":false,"context_lines":[{"line_number":614,"context_line":"                                                      \u002719.4.4.2/32\u0027)"},{"line_number":615,"context_line":""},{"line_number":616,"context_line":"    @mock.patch.object(ip_lib, \u0027get_routing_table\u0027)"},{"line_number":617,"context_line":"    def test_get_router_cidrs(self, get_routing_table):"},{"line_number":618,"context_line":"        ri \u003d self._create_router(mock.MagicMock())"},{"line_number":619,"context_line":"        ri.fip_ns \u003d mock.Mock()"},{"line_number":620,"context_line":"        get_routing_table.return_value \u003d ["}],"source_content_type":"text/x-python","patch_set":11,"id":"da85f559_e01a557c","line":617,"updated":"2015-11-12 18:39:26.000000000","message":"test_get_existing_fips","commit_id":"37370c30cc09031e9bc4cc8e8ef8b6930dd8a80d"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"4d7582ecd330ad880c86e65cd7c894530ff8654a","unresolved":false,"context_lines":[{"line_number":635,"context_line":"        ]"},{"line_number":636,"context_line":"        self.mock_ip_dev.name \u003d \u0027rfp-aaa\u0027"},{"line_number":637,"context_line":"        ri.fip_ns.get_int_device_name.return_value \u003d \u0027fpr-aaa\u0027"},{"line_number":638,"context_line":"        observed1 \u003d ri.get_router_cidrs(self.mock_ip_dev)"},{"line_number":639,"context_line":"        self.assertEqual(set([\u002719.4.4.5/32\u0027, \u002719.4.4.6/32\u0027]), observed1)"},{"line_number":640,"context_line":"        self.mock_ip_dev.name \u003d \u0027non-rfp-1234\u0027"},{"line_number":641,"context_line":"        observed2 \u003d ri.get_router_cidrs(self.mock_ip_dev)"}],"source_content_type":"text/x-python","patch_set":11,"id":"da85f559_40524136","line":638,"updated":"2015-11-12 18:39:26.000000000","message":"get_router_cidrs -\u003e get_existing_fips?","commit_id":"37370c30cc09031e9bc4cc8e8ef8b6930dd8a80d"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"4d7582ecd330ad880c86e65cd7c894530ff8654a","unresolved":false,"context_lines":[{"line_number":638,"context_line":"        observed1 \u003d ri.get_router_cidrs(self.mock_ip_dev)"},{"line_number":639,"context_line":"        self.assertEqual(set([\u002719.4.4.5/32\u0027, \u002719.4.4.6/32\u0027]), observed1)"},{"line_number":640,"context_line":"        self.mock_ip_dev.name \u003d \u0027non-rfp-1234\u0027"},{"line_number":641,"context_line":"        observed2 \u003d ri.get_router_cidrs(self.mock_ip_dev)"},{"line_number":642,"context_line":"        self.assertEqual(set(), observed2)"}],"source_content_type":"text/x-python","patch_set":11,"id":"da85f559_c03cf1e2","line":641,"updated":"2015-11-12 18:39:26.000000000","message":"get_router_cidrs -\u003e get_existing_fips","commit_id":"37370c30cc09031e9bc4cc8e8ef8b6930dd8a80d"}],"neutron/tests/unit/agent/l3/test_router_info.py":[{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"4e16fce9995aee2087f51eda15fba54bc0373ebc","unresolved":false,"context_lines":[{"line_number":235,"context_line":"            side_effect\u003dException)"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        self.assertRaises(n_exc.FloatingIpSetupException,"},{"line_number":238,"context_line":"                          ri.configure_fip_addresses,"},{"line_number":239,"context_line":"                          mock.sentinel.interface_name)"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"        ri.process_floating_ip_addresses.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":11,"id":"da85f559_76f62f90","line":238,"updated":"2015-11-13 23:05:04.000000000","message":"missed the existing_fips parameter.","commit_id":"37370c30cc09031e9bc4cc8e8ef8b6930dd8a80d"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"change_message_id":"4e16fce9995aee2087f51eda15fba54bc0373ebc","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        addresses \u003d [\u002715.1.2.2/24\u0027, \u002715.1.2.3/32\u0027]"},{"line_number":247,"context_line":"        device \u003d mock.MagicMock()"},{"line_number":248,"context_line":"        device.addr.list.return_value \u003d [{\u0027cidr\u0027: addresses[0]},"},{"line_number":249,"context_line":"                                         {\u0027cidr\u0027: addresses[1]}]"},{"line_number":250,"context_line":"        self.assertEqual(set(addresses), ri.get_router_cidrs(device))"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"da85f559_11c7ad64","line":249,"updated":"2015-11-13 23:05:04.000000000","message":"get_router_cidrs --\u003e get_existing_fips.  This test needs to be changed to retrieve the data from the iptables nat chains.","commit_id":"37370c30cc09031e9bc4cc8e8ef8b6930dd8a80d"}]}
