)]}'
{"neutron/agent/l3/dvr_edge_router.py":[{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"1d4719450d34ce6c1774ac22da27ad030a538480","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        with self.snat_iptables_manager.defer_apply():"},{"line_number":190,"context_line":"            self._empty_snat_chains(self.snat_iptables_manager)"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"            # NOTE DVR doesn\u0027t add the jump to float snat like the super class."},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"            self._add_snat_rules(ex_gw_port, self.snat_iptables_manager,"},{"line_number":195,"context_line":"                                 interface_name)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa0719c6_0a607c00","line":192,"range":{"start_line":192,"start_character":43,"end_line":192,"end_character":44},"updated":"2016-03-22 19:13:22.000000000","message":"May be we might have to change this \u0027NOTE\u0027 since we are adding the jump to float right now.\n\nIt would be nice if we say we are not adding the Jump to float in the snat namespace and only adding it in the router namespace.","commit_id":"2f405606c0640c4ba6c60696a91a875c114e9401"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"3129e59de1ef82639185340a25411ccdc87a33f2","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        with self.snat_iptables_manager.defer_apply():"},{"line_number":190,"context_line":"            self._empty_snat_chains(self.snat_iptables_manager)"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"            # NOTE DVR doesn\u0027t add the jump to float snat like the super class."},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"            self._add_snat_rules(ex_gw_port, self.snat_iptables_manager,"},{"line_number":195,"context_line":"                                 interface_name)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa0719c6_ede40ae1","line":192,"range":{"start_line":192,"start_character":43,"end_line":192,"end_character":44},"in_reply_to":"fa0719c6_0a607c00","updated":"2016-03-23 16:46:46.000000000","message":"Done","commit_id":"2f405606c0640c4ba6c60696a91a875c114e9401"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"8360f57bd5c056d09795e8dbcf7f70f10067e01f","unresolved":false,"context_lines":[{"line_number":190,"context_line":"            self._empty_snat_chains(self.snat_iptables_manager)"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"            # NOTE: DVR adds the jump to float snat via super class,"},{"line_number":193,"context_line":"            # but that is in the router namespace and not snat."},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"            self._add_snat_rules(ex_gw_port, self.snat_iptables_manager,"},{"line_number":196,"context_line":"                                 interface_name)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa0719c6_fe1304b6","line":193,"range":{"start_line":193,"start_character":14,"end_line":193,"end_character":63},"updated":"2016-03-23 21:45:24.000000000","message":"I tried once to tease the Edge and Local routers apart so that it was clearer what the responsibility of each is.  I failed because I didn\u0027t have the time and it turned out to be very invasive.  This makes me wish I\u0027d succeeded.  But, I don\u0027t think it\u0027ll ever happen.  :(","commit_id":"1cea77b0aafbada6cad89a6fe0f5450004aef4e1"}],"neutron/agent/l3/dvr_local_router.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"3052fc7e80fcbfd1042221ea728258d668f87f8f","unresolved":false,"context_lines":[{"line_number":411,"context_line":"        self.iptables_manager.ipv4[\u0027nat\u0027].add_rule(\u0027snat\u0027, \u0027-j $float-snat\u0027)"},{"line_number":412,"context_line":"        rules \u003d self.external_gateway_nat_postroute_rules(ext_device_name)"},{"line_number":413,"context_line":"        for rule in rules:"},{"line_number":414,"context_line":"            self.iptables_manager.ipv4[\u0027nat\u0027].add_rule(*rule)"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    def _get_address_scope_mark(self):"},{"line_number":417,"context_line":"        # Prepare address scope iptables rule for internal ports"}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_68101aa9","line":414,"updated":"2016-03-02 21:03:01.000000000","message":"The self.iptables_manager.apply() got dropped here, but it looks process_external() takes care of that.  Just had to sanity check it myself.","commit_id":"144e2794c005a8a5eefe57b655bded73e47fa08a"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"9fc6bdd6eec468879b6dbdacf838d90e1d2ed2f0","unresolved":false,"context_lines":[{"line_number":411,"context_line":"        self.iptables_manager.ipv4[\u0027nat\u0027].add_rule(\u0027snat\u0027, \u0027-j $float-snat\u0027)"},{"line_number":412,"context_line":"        rules \u003d self.external_gateway_nat_postroute_rules(ext_device_name)"},{"line_number":413,"context_line":"        for rule in rules:"},{"line_number":414,"context_line":"            self.iptables_manager.ipv4[\u0027nat\u0027].add_rule(*rule)"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    def _get_address_scope_mark(self):"},{"line_number":417,"context_line":"        # Prepare address scope iptables rule for internal ports"}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_e20b9028","line":414,"in_reply_to":"7af24918_68101aa9","updated":"2016-03-03 05:18:01.000000000","message":"Thanks Brian. The apply() is dropped here on purpose. _handle_router_snat_rules() will be in the \"with self.iptables_manager.defer_apply()\" block, and it will be applied in process_external() as you found. So, I think it is ok to drop it here.","commit_id":"144e2794c005a8a5eefe57b655bded73e47fa08a"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"b25afd030dfcec2a692fe60c127db64e212036a7","unresolved":false,"context_lines":[{"line_number":415,"context_line":"        # ex_gw_port and floating ip here"},{"line_number":416,"context_line":"        ex_gw_ip \u003d None"},{"line_number":417,"context_line":"        for ip_addr in ex_gw_port[\u0027fixed_ips\u0027]:"},{"line_number":418,"context_line":"            ex_gw_ip \u003d ip_addr[\u0027ip_address\u0027]"},{"line_number":419,"context_line":"            if netaddr.IPAddress(ex_gw_ip).version \u003d\u003d 4:"},{"line_number":420,"context_line":"                break"},{"line_number":421,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa0719c6_ecf9e581","line":418,"updated":"2016-03-22 20:34:08.000000000","message":"This doesn\u0027t look right, this assignment should happen only if the netaddr check succeeds.  I know the existence of a floating IP implies a port with a fixed IP(v4) is here, but we might as well verify, else ex_gw_ip could be an IPv6 address.","commit_id":"2f405606c0640c4ba6c60696a91a875c114e9401"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"b25afd030dfcec2a692fe60c127db64e212036a7","unresolved":false,"context_lines":[{"line_number":417,"context_line":"        for ip_addr in ex_gw_port[\u0027fixed_ips\u0027]:"},{"line_number":418,"context_line":"            ex_gw_ip \u003d ip_addr[\u0027ip_address\u0027]"},{"line_number":419,"context_line":"            if netaddr.IPAddress(ex_gw_ip).version \u003d\u003d 4:"},{"line_number":420,"context_line":"                break"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"        # Add back the jump to float-snat"},{"line_number":423,"context_line":"        self.iptables_manager.ipv4[\u0027nat\u0027].add_rule(\u0027snat\u0027, \u0027-j $float-snat\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa0719c6_8c394944","line":420,"updated":"2016-03-22 20:34:08.000000000","message":"An extra check should be added here in case the above loop fails to find an IP:\n\nif not ex_gw_ip:\n    return\n\nOr maybe a change like this as is done in the DB code:\n\n+        ipv4_fixed_ips \u003d [ip for ip in ex_gw_port[\u0027fixed_ips\u0027]\n+                          if netaddr.IPAddress(ip[\u0027ip_address\u0027]).version \u003d\u003d 4]\n+        if not ipv4_fixed_ips:\n+            return\n+        ex_gw_ip \u003d ipv4_fixed_ips[0][\u0027ip_address\u0027]","commit_id":"2f405606c0640c4ba6c60696a91a875c114e9401"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"3129e59de1ef82639185340a25411ccdc87a33f2","unresolved":false,"context_lines":[{"line_number":417,"context_line":"        for ip_addr in ex_gw_port[\u0027fixed_ips\u0027]:"},{"line_number":418,"context_line":"            ex_gw_ip \u003d ip_addr[\u0027ip_address\u0027]"},{"line_number":419,"context_line":"            if netaddr.IPAddress(ex_gw_ip).version \u003d\u003d 4:"},{"line_number":420,"context_line":"                break"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"        # Add back the jump to float-snat"},{"line_number":423,"context_line":"        self.iptables_manager.ipv4[\u0027nat\u0027].add_rule(\u0027snat\u0027, \u0027-j $float-snat\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa0719c6_4ded36b6","line":420,"in_reply_to":"fa0719c6_8c394944","updated":"2016-03-23 16:46:46.000000000","message":"I\u0027ve made this change and will push it out for review.","commit_id":"2f405606c0640c4ba6c60696a91a875c114e9401"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"756a61cbe1fc607277084a3b7ed974cb14e4acdc","unresolved":false,"context_lines":[{"line_number":393,"context_line":"            internal_interface \u003d self.get_internal_device_name(p[\u0027id\u0027])"},{"line_number":394,"context_line":"            self._snat_redirect_remove(gateway, p, internal_interface)"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":"    def _handle_router_snat_rules(self, ex_gw_port, interface_name):"},{"line_number":397,"context_line":"        \"\"\"Configures NAT rules for Floating IPs for DVR.\"\"\""},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"        self.iptables_manager.ipv4[\u0027nat\u0027].empty_chain(\u0027POSTROUTING\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a061dce_354d2773","line":396,"range":{"start_line":396,"start_character":8,"end_line":396,"end_character":33},"updated":"2016-04-04 20:56:14.000000000","message":"IMO, we can\u0027t do SNAT in all of the qrouter namespaces all over the place.  SNAT is centralized for a reason.  The reason is to coordinate the use of source ports for the 1 router gateway address.  If we distribute it, we\u0027ll have qrouters all over the place using the same source ports on the same IP address.  We might get lucky most of the time but when I connection gets dropped and we have no idea where to even start to look, it is going to be a real pain.","commit_id":"1cea77b0aafbada6cad89a6fe0f5450004aef4e1"}]}
