)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cf50b2d8c4239e85dfb632482445ddaa9677f914","unresolved":false,"context_lines":[{"line_number":10,"context_line":"for DVR routers. But they are not added to the qrouter"},{"line_number":11,"context_line":"namespace."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Also while configuring the static routes to SNAT"},{"line_number":14,"context_line":"namespace, the router is not checked for the existence"},{"line_number":15,"context_line":"of the gateway."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"3a29b11f_64c0b650","line":13,"updated":"2015-10-22 20:16:18.000000000","message":"Whenever I see the word also in a commit message, I wonder if the patch should be split.","commit_id":"f1adfda39c2dc56d836a068380444600bf5a3b45"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"931c193896aaa37ff3cd533bc6ca736d2ecf5cd3","unresolved":false,"context_lines":[{"line_number":10,"context_line":"for DVR routers. But they are not added to the qrouter"},{"line_number":11,"context_line":"namespace."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Also while configuring the static routes to SNAT"},{"line_number":14,"context_line":"namespace, the router is not checked for the existence"},{"line_number":15,"context_line":"of the gateway."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"3a29b11f_05345c47","line":13,"in_reply_to":"3a29b11f_64c0b650","updated":"2015-10-22 21:18:16.000000000","message":"Do you think, we need to separate this into two?","commit_id":"f1adfda39c2dc56d836a068380444600bf5a3b45"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cf50b2d8c4239e85dfb632482445ddaa9677f914","unresolved":false,"context_lines":[{"line_number":17,"context_line":"When routes are added to a router without a gateway the"},{"line_number":18,"context_line":"routes are only configured in the router namespace, but"},{"line_number":19,"context_line":"when a gateway is set later, those routes have to be"},{"line_number":20,"context_line":"populated in the snat_namespace as well."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"This patch addresses the above mentioned issues."},{"line_number":23,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"3a29b11f_e4936659","line":20,"updated":"2015-10-22 20:16:18.000000000","message":"Why not just set it in the SNAT namespace too if it is being set in the qrouter.  I think the routes should be set in both qrouter and snat namespace under the same conditions.  Is there a reason I\u0027m missing that it shouldn\u0027t be?  Will it hurt to set it in the snat namespace at the same time as the qrouter?","commit_id":"f1adfda39c2dc56d836a068380444600bf5a3b45"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"931c193896aaa37ff3cd533bc6ca736d2ecf5cd3","unresolved":false,"context_lines":[{"line_number":17,"context_line":"When routes are added to a router without a gateway the"},{"line_number":18,"context_line":"routes are only configured in the router namespace, but"},{"line_number":19,"context_line":"when a gateway is set later, those routes have to be"},{"line_number":20,"context_line":"populated in the snat_namespace as well."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"This patch addresses the above mentioned issues."},{"line_number":23,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"3a29b11f_8502acb2","line":20,"in_reply_to":"3a29b11f_e4936659","updated":"2015-10-22 21:18:16.000000000","message":"Yes it would not be right to set all the routes in the snat namespace.\nSince the packet has already routed before hitting the snat namespace.\n\nIt makes sense to only add the external routes in the snat namespace since it is not handled in the qrouter.","commit_id":"f1adfda39c2dc56d836a068380444600bf5a3b45"}],"neutron/agent/l3/dvr_edge_router.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"6d8f3134f0f5ff51cd1a9530a699a90475b0607f","unresolved":false,"context_lines":[{"line_number":199,"context_line":"            ip_wrapper.netns.execute(cmd, check_exit_code\u003dFalse)"},{"line_number":200,"context_line":"        else:"},{"line_number":201,"context_line":"            LOG.warn(_LW(\"The SNAT Namespace %s does not exist for \""},{"line_number":202,"context_line":"                         \"the router. The namespace might have been \""},{"line_number":203,"context_line":"                         \"deleted concurrently.\"), namespace)"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"    def routes_updated(self, snat_old_routes\u003dNone):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_34c92479","line":202,"updated":"2015-09-27 07:14:12.000000000","message":"Can we drop the : The namespace might have been \"\n                         \"deleted concurrently.\nI am not really sure what value that has.","commit_id":"19025eac22ae63fb67d6527f0f3cb69148e62f6e"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"c1303e3f9934db428af9309c0dd3c6783139cf0c","unresolved":false,"context_lines":[{"line_number":199,"context_line":"            ip_wrapper.netns.execute(cmd, check_exit_code\u003dFalse)"},{"line_number":200,"context_line":"        else:"},{"line_number":201,"context_line":"            LOG.warn(_LW(\"The SNAT Namespace %s does not exist for \""},{"line_number":202,"context_line":"                         \"the router. The namespace might have been \""},{"line_number":203,"context_line":"                         \"deleted concurrently.\"), namespace)"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"    def routes_updated(self, snat_old_routes\u003dNone):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_169884bf","line":202,"in_reply_to":"9a1a9d01_34c92479","updated":"2015-09-28 15:59:10.000000000","message":"Done","commit_id":"19025eac22ae63fb67d6527f0f3cb69148e62f6e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"faa56b10f6273e2e34fff1498435bfcc6dd88f04","unresolved":false,"context_lines":[{"line_number":189,"context_line":"                operation, route, namespace\u003dNone)"},{"line_number":190,"context_line":"        else:"},{"line_number":191,"context_line":"            super(DvrEdgeRouter, self).update_routing_table("},{"line_number":192,"context_line":"                operation, route, namespace\u003dNone)"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    def _update_routing_table(self, operation, route, namespace):"},{"line_number":195,"context_line":"        cmd \u003d [\u0027ip\u0027, \u0027route\u0027, operation, \u0027to\u0027, route[\u0027destination\u0027],"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a1a9d01_59baa86f","line":192,"updated":"2015-09-28 18:15:55.000000000","message":"You only need one super() call here that can live outside the if: since they are both the same.  And should it use namespace\u003dnamespace or will that argument always be ignored?","commit_id":"06fc1ee295ec6c1410edd4841638f8547d20c8ce"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"44504508ad5ce4e608247c98828ec0a2a922d1b7","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            self._create_dvr_gateway(ex_gw_port, interface_name)"},{"line_number":40,"context_line":"            # NOTE: We need to call routes_updated here for situations"},{"line_number":41,"context_line":"            # were the gateway is added later to the router with routes."},{"line_number":42,"context_line":"            self.routes_updated()"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def external_gateway_updated(self, ex_gw_port, interface_name):"},{"line_number":45,"context_line":"        if not self._is_this_snat_host():"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a1a9d01_f36aabb2","line":42,"updated":"2015-09-29 02:35:04.000000000","message":"We don\u0027t do delta updates, i.e. every time a router is configured on an L3 agent we get the entire router contents (With all of its extra routes). Persisting self.routes doesn\u0027t smell right. Can you explain why is it needed?","commit_id":"af205325f16b8aba091a9b1c55a770eb9395f3d2"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"9298039a34c5d3b3290af31118219aaf2e32fbf8","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            self._create_dvr_gateway(ex_gw_port, interface_name)"},{"line_number":40,"context_line":"            # NOTE: We need to call routes_updated here for situations"},{"line_number":41,"context_line":"            # were the gateway is added later to the router with routes."},{"line_number":42,"context_line":"            self.routes_updated()"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def external_gateway_updated(self, ex_gw_port, interface_name):"},{"line_number":45,"context_line":"        if not self._is_this_snat_host():"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a29b11f_adab7c1c","line":42,"in_reply_to":"9a1a9d01_97220951","updated":"2015-10-20 20:18:24.000000000","message":"See what get populated in self.routes in L205.","commit_id":"af205325f16b8aba091a9b1c55a770eb9395f3d2"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"b87092219b9cd18af25f4285107d73d4672d8c3c","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            self._create_dvr_gateway(ex_gw_port, interface_name)"},{"line_number":40,"context_line":"            # NOTE: We need to call routes_updated here for situations"},{"line_number":41,"context_line":"            # were the gateway is added later to the router with routes."},{"line_number":42,"context_line":"            self.routes_updated()"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def external_gateway_updated(self, ex_gw_port, interface_name):"},{"line_number":45,"context_line":"        if not self._is_this_snat_host():"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a1a9d01_97220951","line":42,"in_reply_to":"9a1a9d01_c9b49836","updated":"2015-09-30 01:03:59.000000000","message":"That I understood from the comment on line 40. I\u0027m saying that it\u0027s hard to believe that we need \u0027self.routes\u0027 to accomplish that.","commit_id":"af205325f16b8aba091a9b1c55a770eb9395f3d2"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"987f7e625d416004a13b33a72c44328e760ac932","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            self._create_dvr_gateway(ex_gw_port, interface_name)"},{"line_number":40,"context_line":"            # NOTE: We need to call routes_updated here for situations"},{"line_number":41,"context_line":"            # were the gateway is added later to the router with routes."},{"line_number":42,"context_line":"            self.routes_updated()"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def external_gateway_updated(self, ex_gw_port, interface_name):"},{"line_number":45,"context_line":"        if not self._is_this_snat_host():"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a1a9d01_c9b49836","line":42,"in_reply_to":"9a1a9d01_f36aabb2","updated":"2015-09-29 04:23:22.000000000","message":"This is required when a gateway is added after the routes are added to the qrouter namespace.\nWe need to make sure the routes are also populated in the snat namespace.","commit_id":"af205325f16b8aba091a9b1c55a770eb9395f3d2"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"44504508ad5ce4e608247c98828ec0a2a922d1b7","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        if ip_wrapper.netns.exists(namespace):"},{"line_number":196,"context_line":"            ip_wrapper.netns.execute(cmd, check_exit_code\u003dFalse)"},{"line_number":197,"context_line":"        else:"},{"line_number":198,"context_line":"            LOG.warn(_LW(\"The SNAT Namespace %s does not exist for \""},{"line_number":199,"context_line":"                         \"the router.\"), namespace)"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    def routes_updated(self, snat_old_routes\u003dNone):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a1a9d01_d346874e","line":198,"updated":"2015-09-29 02:35:04.000000000","message":"Under what condition do you hit this log? I mean, it\u0027s either an ERROR (If it\u0027s unexpected), or you shouldn\u0027t log this at all (It is expected).","commit_id":"af205325f16b8aba091a9b1c55a770eb9395f3d2"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"987f7e625d416004a13b33a72c44328e760ac932","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        if ip_wrapper.netns.exists(namespace):"},{"line_number":196,"context_line":"            ip_wrapper.netns.execute(cmd, check_exit_code\u003dFalse)"},{"line_number":197,"context_line":"        else:"},{"line_number":198,"context_line":"            LOG.warn(_LW(\"The SNAT Namespace %s does not exist for \""},{"line_number":199,"context_line":"                         \"the router.\"), namespace)"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    def routes_updated(self, snat_old_routes\u003dNone):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a1a9d01_297af477","line":198,"in_reply_to":"9a1a9d01_d346874e","updated":"2015-09-29 04:23:22.000000000","message":"This is expected if there is no namespace. But there can be cases were the routes update can happen after the namespace is deleted. This warning message will at least provide information on what happenend.","commit_id":"af205325f16b8aba091a9b1c55a770eb9395f3d2"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cf50b2d8c4239e85dfb632482445ddaa9677f914","unresolved":false,"context_lines":[{"line_number":205,"context_line":"                if netaddr.IPAddress(route[\u0027nexthop\u0027]) in gw_subnet_cidr:"},{"line_number":206,"context_line":"                    self._update_routing_table("},{"line_number":207,"context_line":"                        operation, route, namespace\u003dns_name)"},{"line_number":208,"context_line":"        super(DvrEdgeRouter, self).update_routing_table("},{"line_number":209,"context_line":"            operation, route, namespace\u003dNone)"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    def _update_routing_table(self, operation, route, namespace):"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a29b11f_df3f13b2","line":208,"updated":"2015-10-22 20:16:18.000000000","message":"I made an attempt a couple of weeks ago to completely decouple the \"edge\" and the \"local\" router classes from each other.  It proved difficult and I ran out of time.  But, it would have fixed this and I would still like to do it.  This is one example of a problem that came from the tight coupling of the qrouter and the snat namespace code.  This is actually a tiny step toward decoupling them since it adds routes to snat here and calls super to do essentially the same in the local router.","commit_id":"f1adfda39c2dc56d836a068380444600bf5a3b45"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cf50b2d8c4239e85dfb632482445ddaa9677f914","unresolved":false,"context_lines":[{"line_number":206,"context_line":"                    self._update_routing_table("},{"line_number":207,"context_line":"                        operation, route, namespace\u003dns_name)"},{"line_number":208,"context_line":"        super(DvrEdgeRouter, self).update_routing_table("},{"line_number":209,"context_line":"            operation, route, namespace\u003dNone)"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    def _update_routing_table(self, operation, route, namespace):"},{"line_number":212,"context_line":"        cmd \u003d [\u0027ip\u0027, \u0027route\u0027, operation, \u0027to\u0027, route[\u0027destination\u0027],"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a29b11f_7f57df25","line":209,"updated":"2015-10-22 20:16:18.000000000","message":"namespace\u003dNone is the default.","commit_id":"f1adfda39c2dc56d836a068380444600bf5a3b45"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"931c193896aaa37ff3cd533bc6ca736d2ecf5cd3","unresolved":false,"context_lines":[{"line_number":206,"context_line":"                    self._update_routing_table("},{"line_number":207,"context_line":"                        operation, route, namespace\u003dns_name)"},{"line_number":208,"context_line":"        super(DvrEdgeRouter, self).update_routing_table("},{"line_number":209,"context_line":"            operation, route, namespace\u003dNone)"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    def _update_routing_table(self, operation, route, namespace):"},{"line_number":212,"context_line":"        cmd \u003d [\u0027ip\u0027, \u0027route\u0027, operation, \u0027to\u0027, route[\u0027destination\u0027],"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a29b11f_85194c24","line":209,"in_reply_to":"3a29b11f_7f57df25","updated":"2015-10-22 21:18:16.000000000","message":"Yes will fix it.","commit_id":"f1adfda39c2dc56d836a068380444600bf5a3b45"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cf50b2d8c4239e85dfb632482445ddaa9677f914","unresolved":false,"context_lines":[{"line_number":208,"context_line":"        super(DvrEdgeRouter, self).update_routing_table("},{"line_number":209,"context_line":"            operation, route, namespace\u003dNone)"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    def _update_routing_table(self, operation, route, namespace):"},{"line_number":212,"context_line":"        cmd \u003d [\u0027ip\u0027, \u0027route\u0027, operation, \u0027to\u0027, route[\u0027destination\u0027],"},{"line_number":213,"context_line":"               \u0027via\u0027, route[\u0027nexthop\u0027]]"},{"line_number":214,"context_line":"        ip_wrapper \u003d ip_lib.IPWrapper(namespace\u003dnamespace)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a29b11f_df52b366","line":211,"updated":"2015-10-22 20:16:18.000000000","message":"Since this isn\u0027t really meant to be coupled with the method of the same name defined in router_info.py, could we change the name to be unique to this class?  Like _update_snat_routing_table.  I think having the same name as a base class implies some sort of polymorphic behavior.  But, I don\u0027t think that is the case and would rather they be named differently to make the decoupling clearer.","commit_id":"f1adfda39c2dc56d836a068380444600bf5a3b45"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"931c193896aaa37ff3cd533bc6ca736d2ecf5cd3","unresolved":false,"context_lines":[{"line_number":208,"context_line":"        super(DvrEdgeRouter, self).update_routing_table("},{"line_number":209,"context_line":"            operation, route, namespace\u003dNone)"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    def _update_routing_table(self, operation, route, namespace):"},{"line_number":212,"context_line":"        cmd \u003d [\u0027ip\u0027, \u0027route\u0027, operation, \u0027to\u0027, route[\u0027destination\u0027],"},{"line_number":213,"context_line":"               \u0027via\u0027, route[\u0027nexthop\u0027]]"},{"line_number":214,"context_line":"        ip_wrapper \u003d ip_lib.IPWrapper(namespace\u003dnamespace)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a29b11f_e5ccc08a","line":211,"in_reply_to":"3a29b11f_df52b366","updated":"2015-10-22 21:18:16.000000000","message":"Sure will fix it.","commit_id":"f1adfda39c2dc56d836a068380444600bf5a3b45"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cf50b2d8c4239e85dfb632482445ddaa9677f914","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        new_routes \u003d super(DvrEdgeRouter, self).routes_updated("},{"line_number":224,"context_line":"            snat_old_routes\u003dold_routes)"},{"line_number":225,"context_line":"        # NOTE: Cache the routes for updating the snat_namespace later"},{"line_number":226,"context_line":"        self.routes \u003d new_routes"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a29b11f_7f927ff7","line":226,"updated":"2015-10-22 20:16:18.000000000","message":"I\u0027m not yet convinced this caching is needed.  See my comment in the commit message.","commit_id":"f1adfda39c2dc56d836a068380444600bf5a3b45"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"931c193896aaa37ff3cd533bc6ca736d2ecf5cd3","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        new_routes \u003d super(DvrEdgeRouter, self).routes_updated("},{"line_number":224,"context_line":"            snat_old_routes\u003dold_routes)"},{"line_number":225,"context_line":"        # NOTE: Cache the routes for updating the snat_namespace later"},{"line_number":226,"context_line":"        self.routes \u003d new_routes"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a29b11f_c598a47a","line":226,"in_reply_to":"3a29b11f_7f927ff7","updated":"2015-10-22 21:18:16.000000000","message":"This cache here is to set the routes in the snat_namespace when a gateway is added later to the router.","commit_id":"f1adfda39c2dc56d836a068380444600bf5a3b45"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"6720c1f7389f248abe52a68a07a6270ddc4af789","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        new_routes \u003d super(DvrEdgeRouter, self).routes_updated("},{"line_number":224,"context_line":"            snat_old_routes\u003dold_routes)"},{"line_number":225,"context_line":"        # NOTE: Cache the routes for updating the snat_namespace later"},{"line_number":226,"context_line":"        self.routes \u003d new_routes"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a29b11f_fae8dab4","line":226,"in_reply_to":"3a29b11f_852e2ca3","updated":"2015-10-22 22:40:58.000000000","message":"Assaf I would like you to check the routes_updated function in the router_info.py and how it handles new routes.\n\nhttps://github.com/openstack/neutron/blob/master/neutron/agent/l3/router_info.py#L123","commit_id":"f1adfda39c2dc56d836a068380444600bf5a3b45"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"e6c9e351e28dda4a30a55206d891e64318d415a2","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        new_routes \u003d super(DvrEdgeRouter, self).routes_updated("},{"line_number":224,"context_line":"            snat_old_routes\u003dold_routes)"},{"line_number":225,"context_line":"        # NOTE: Cache the routes for updating the snat_namespace later"},{"line_number":226,"context_line":"        self.routes \u003d new_routes"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a29b11f_da9dde0a","line":226,"in_reply_to":"3a29b11f_852e2ca3","updated":"2015-10-22 22:54:41.000000000","message":"Assaf, do you mean get the routes information from \"self.router.routes\",  \ninstead of saving it locally in the snat class.","commit_id":"f1adfda39c2dc56d836a068380444600bf5a3b45"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8da1e74a49a0cf818d080e3c614275bf524d5f93","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        new_routes \u003d super(DvrEdgeRouter, self).routes_updated("},{"line_number":224,"context_line":"            snat_old_routes\u003dold_routes)"},{"line_number":225,"context_line":"        # NOTE: Cache the routes for updating the snat_namespace later"},{"line_number":226,"context_line":"        self.routes \u003d new_routes"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a29b11f_852e2ca3","line":226,"in_reply_to":"3a29b11f_c598a47a","updated":"2015-10-22 21:32:23.000000000","message":"I\u0027ve made the same comment as Carl before. When the gateway is set, you get the routes from the server as well. Every update the agent receives contains *all* of the information about the router, including routes.","commit_id":"f1adfda39c2dc56d836a068380444600bf5a3b45"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"353f8fdf6527c3798008ee1b282b5112c45a1645","unresolved":false,"context_lines":[{"line_number":201,"context_line":"                # on the SNAT Namespace only if is associated with the"},{"line_number":202,"context_line":"                # external gateway subnets."},{"line_number":203,"context_line":"                if netaddr.IPAddress(route[\u0027nexthop\u0027]) in gw_subnet_cidr:"},{"line_number":204,"context_line":"                    self._update_routing_table("},{"line_number":205,"context_line":"                        operation, route, namespace\u003dns_name)"},{"line_number":206,"context_line":"        super(DvrEdgeRouter, self).update_routing_table(operation, route)"},{"line_number":207,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1a26ad4f_13ad6c88","line":204,"updated":"2015-10-27 07:04:01.000000000","message":"I suppose you are going to use _update_snat_routing_table, otherwise I didn\u0027t notice where _update_snat_routing_table will be used in this patch.","commit_id":"ee0595a2a6bee96cda5d9681c1c7e6f785311626"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"10db2cb91da03241064d62b561fb8045ca9b7808","unresolved":false,"context_lines":[{"line_number":201,"context_line":"        if self.snat_namespace:"},{"line_number":202,"context_line":"            self.snat_namespace.delete()"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    def _update_snat_routing_table(self, operation, route, namespace):"},{"line_number":205,"context_line":"        cmd \u003d [\u0027ip\u0027, \u0027route\u0027, operation, \u0027to\u0027, route[\u0027destination\u0027],"},{"line_number":206,"context_line":"               \u0027via\u0027, route[\u0027nexthop\u0027]]"},{"line_number":207,"context_line":"        ip_wrapper \u003d ip_lib.IPWrapper(namespace\u003dnamespace)"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a740942_ac9ca65d","line":204,"updated":"2015-12-07 19:56:00.000000000","message":"I think instead of duplicating the code from the parent class _update_routing_table(), you can just move this to  L196 and call super(namespace\u003dns_name)","commit_id":"4a70ef729d6c7e0a0647f085facd7e1febf72518"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"10db2cb91da03241064d62b561fb8045ca9b7808","unresolved":false,"context_lines":[{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    def routes_updated(self, snat_add_routes\u003dFalse):"},{"line_number":215,"context_line":"        super(DvrEdgeRouter, self).routes_updated("},{"line_number":216,"context_line":"            snat_add_routes\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a740942_acaee695","line":216,"updated":"2015-12-07 19:56:00.000000000","message":"This can fit on one line","commit_id":"4a70ef729d6c7e0a0647f085facd7e1febf72518"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"519bf7326e3c2b24bc9465c67f49c64ce006e445","unresolved":false,"context_lines":[{"line_number":194,"context_line":"            # NOTE: For now let us apply the static routes both in SNAT"},{"line_number":195,"context_line":"            # namespace and Router Namespace, to reduce the complexity."},{"line_number":196,"context_line":"            ip_wrapper \u003d ip_lib.IPWrapper(namespace\u003dns_name)"},{"line_number":197,"context_line":"            if ip_wrapper.netns.exists(namespace):"},{"line_number":198,"context_line":"                super(DvrEdgeRouter, self).update_routing_table("},{"line_number":199,"context_line":"                    operation, route, namespace\u003dns_name)"},{"line_number":200,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a740942_adfffdff","line":197,"updated":"2015-12-10 19:33:13.000000000","message":"Actually, the bug was a typo in this line, namespace should be ns_name, functional tests pass for me now.  Without that we won\u0027t add any routes into the snat namespace.","commit_id":"9bc1db095e3fb78b54472fbcb1294a9c744685e4"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"bd7b2c7584484b765e425754f5a7d40cd5c266bc","unresolved":false,"context_lines":[{"line_number":194,"context_line":"            # NOTE: For now let us apply the static routes both in SNAT"},{"line_number":195,"context_line":"            # namespace and Router Namespace, to reduce the complexity."},{"line_number":196,"context_line":"            ip_wrapper \u003d ip_lib.IPWrapper(namespace\u003dns_name)"},{"line_number":197,"context_line":"            if ip_wrapper.netns.exists(namespace):"},{"line_number":198,"context_line":"                super(DvrEdgeRouter, self).update_routing_table("},{"line_number":199,"context_line":"                    operation, route, namespace\u003dns_name)"},{"line_number":200,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a7e1126_4220fbf7","line":197,"in_reply_to":"3a7e1126_e202476f","updated":"2015-12-17 03:20:57.000000000","message":"Sorry, I just recognize this seems not the right place to ask a question.","commit_id":"9bc1db095e3fb78b54472fbcb1294a9c744685e4"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"5d3296bdb9d5c8ee6cb5db4f9287425d1ab551d1","unresolved":false,"context_lines":[{"line_number":194,"context_line":"            # NOTE: For now let us apply the static routes both in SNAT"},{"line_number":195,"context_line":"            # namespace and Router Namespace, to reduce the complexity."},{"line_number":196,"context_line":"            ip_wrapper \u003d ip_lib.IPWrapper(namespace\u003dns_name)"},{"line_number":197,"context_line":"            if ip_wrapper.netns.exists(namespace):"},{"line_number":198,"context_line":"                super(DvrEdgeRouter, self).update_routing_table("},{"line_number":199,"context_line":"                    operation, route, namespace\u003dns_name)"},{"line_number":200,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a7e1126_e202476f","line":197,"in_reply_to":"7a740942_adfffdff","updated":"2015-12-17 03:17:52.000000000","message":"Hi, Brian. A question, how will we delete static routes by current api? I know it\u0027s not so friendly to add static routes for now by:\n    neutron router-update ROUTER --routes type\u003ddict list\u003dtrue destination\u003dDEST,nexthop\u003dNEXT","commit_id":"9bc1db095e3fb78b54472fbcb1294a9c744685e4"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"e93f078c58750780b3bd644ca336351d0360f3f4","unresolved":false,"context_lines":[{"line_number":190,"context_line":"    def update_routing_table(self, operation, route, namespace\u003dNone):"},{"line_number":191,"context_line":"        if self.get_ex_gw_port() and self._is_this_snat_host():"},{"line_number":192,"context_line":"            ns_name \u003d dvr_snat_ns.SnatNamespace.get_snat_ns_name("},{"line_number":193,"context_line":"                self.router[\u0027id\u0027])"},{"line_number":194,"context_line":"            # NOTE: For now let us apply the static routes both in SNAT"},{"line_number":195,"context_line":"            # namespace and Router Namespace, to reduce the complexity."},{"line_number":196,"context_line":"            ip_wrapper \u003d ip_lib.IPWrapper(namespace\u003dns_name)"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa69d971_57d96cf2","line":193,"updated":"2015-12-31 07:13:41.000000000","message":"nit: I think it\u0027s same to:\n  ns_name \u003d self.snat_namespace.name\nbut both OK to me.","commit_id":"216829cebec147840e72713dfb3b148c4ad85365"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"5e60c9b92252d6d17e17585f22b2d8dbdfa6e5c9","unresolved":false,"context_lines":[{"line_number":190,"context_line":"    def update_routing_table(self, operation, route, namespace\u003dNone):"},{"line_number":191,"context_line":"        if self.get_ex_gw_port() and self._is_this_snat_host():"},{"line_number":192,"context_line":"            ns_name \u003d dvr_snat_ns.SnatNamespace.get_snat_ns_name("},{"line_number":193,"context_line":"                self.router[\u0027id\u0027])"},{"line_number":194,"context_line":"            # NOTE: For now let us apply the static routes both in SNAT"},{"line_number":195,"context_line":"            # namespace and Router Namespace, to reduce the complexity."},{"line_number":196,"context_line":"            ip_wrapper \u003d ip_lib.IPWrapper(namespace\u003dns_name)"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa69d971_71220354","line":193,"in_reply_to":"fa69d971_57d96cf2","updated":"2016-01-05 17:56:50.000000000","message":"For now let us use as is.","commit_id":"216829cebec147840e72713dfb3b148c4ad85365"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"e93f078c58750780b3bd644ca336351d0360f3f4","unresolved":false,"context_lines":[{"line_number":199,"context_line":"                    operation, route, namespace\u003dns_name)"},{"line_number":200,"context_line":"            else:"},{"line_number":201,"context_line":"                LOG.debug(\"The SNAT namespace %s does not exist for \""},{"line_number":202,"context_line":"                          \"the router.\", ns_name)"},{"line_number":203,"context_line":"        super(DvrEdgeRouter, self).update_routing_table(operation, route)"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"    def delete(self, agent):"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa69d971_baff6f00","line":202,"updated":"2015-12-31 07:13:41.000000000","message":"Will this happened, snat namespace does not exist?\n\nI think its has calling order like this:\n  process\n    ...\n    process_external\n      _process_external_gateway\n        external_gateway_added\n          _create_dvr_gateway\n            _create_snat_namespace\n    routes_updated\n      update_routing_table\n\nso snat_namespace should be created before update_routing_table is called, when this router has an external net. Otherwise it even couldn\u0027t enter the upper if branch for self.get_ex_gw_port will return false.\n\nAnd I\u0027m also curious, will checking self.snat_namespace is None make this method simpler.","commit_id":"216829cebec147840e72713dfb3b148c4ad85365"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"8c50a49069a96f5f2b6c44001fb89e7fbc65f9f0","unresolved":false,"context_lines":[{"line_number":199,"context_line":"                    operation, route, namespace\u003dns_name)"},{"line_number":200,"context_line":"            else:"},{"line_number":201,"context_line":"                LOG.debug(\"The SNAT namespace %s does not exist for \""},{"line_number":202,"context_line":"                          \"the router.\", ns_name)"},{"line_number":203,"context_line":"        super(DvrEdgeRouter, self).update_routing_table(operation, route)"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"    def delete(self, agent):"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa69d971_8beacd72","line":202,"in_reply_to":"fa69d971_91d0d7f7","updated":"2016-01-06 07:01:05.000000000","message":"\"some race conditions\", OK, I think that reason should be strong enough.\n\nOn another side, if SNAT namespace doesn\u0027t exist, or like you said, is deleted by another thread, that means we will fail to handle this snat router. And for that, can we raise the log level here?","commit_id":"216829cebec147840e72713dfb3b148c4ad85365"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"5e60c9b92252d6d17e17585f22b2d8dbdfa6e5c9","unresolved":false,"context_lines":[{"line_number":199,"context_line":"                    operation, route, namespace\u003dns_name)"},{"line_number":200,"context_line":"            else:"},{"line_number":201,"context_line":"                LOG.debug(\"The SNAT namespace %s does not exist for \""},{"line_number":202,"context_line":"                          \"the router.\", ns_name)"},{"line_number":203,"context_line":"        super(DvrEdgeRouter, self).update_routing_table(operation, route)"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"    def delete(self, agent):"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa69d971_91d0d7f7","line":202,"in_reply_to":"fa69d971_baff6f00","updated":"2016-01-05 17:56:50.000000000","message":"The reason we have a check to makesure the namespace exists before writing anything into the namespace is because we have seen some race conditions were the namespace gets deleted by another thread.\nThis should be harmless. So I would leave it as such.","commit_id":"216829cebec147840e72713dfb3b148c4ad85365"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"bb3f0fd10a16f9eba63d245ca68e147747447971","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from oslo_log import log as logging"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from neutron._i18n import _LE"},{"line_number":18,"context_line":"from neutron.agent.l3 import dvr_local_router"},{"line_number":19,"context_line":"from neutron.agent.l3 import dvr_snat_ns"},{"line_number":20,"context_line":"from neutron.agent.l3 import router_info as router"}],"source_content_type":"text/x-python","patch_set":22,"id":"fa69d971_d9f6388e","line":17,"updated":"2016-01-06 23:45:29.000000000","message":"think this is supposed to be neutron.i18n, no _","commit_id":"402ae23996cd6e855cde966e93e29102d5fc5770"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"67b2ece7a66ace9eaf0aea6f7b38edee5b4acd53","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from oslo_log import log as logging"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from neutron._i18n import _LE"},{"line_number":18,"context_line":"from neutron.agent.l3 import dvr_local_router"},{"line_number":19,"context_line":"from neutron.agent.l3 import dvr_snat_ns"},{"line_number":20,"context_line":"from neutron.agent.l3 import router_info as router"}],"source_content_type":"text/x-python","patch_set":22,"id":"fa69d971_d4935d59","line":17,"in_reply_to":"fa69d971_d9f6388e","updated":"2016-01-07 00:12:41.000000000","message":"Brian this line was a copy paste from another file, so I don\u0027t think it would be wrong and I also verified with other files, it does have an ._ ( underscore).","commit_id":"402ae23996cd6e855cde966e93e29102d5fc5770"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"bb3f0fd10a16f9eba63d245ca68e147747447971","unresolved":false,"context_lines":[{"line_number":200,"context_line":"                    operation, route, namespace\u003dns_name)"},{"line_number":201,"context_line":"            else:"},{"line_number":202,"context_line":"                LOG.error(_LE(\"The SNAT namespace %s does not exist for \""},{"line_number":203,"context_line":"                          \"the router.\"), ns_name)"},{"line_number":204,"context_line":"        super(DvrEdgeRouter, self).update_routing_table(operation, route)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    def delete(self, agent):"}],"source_content_type":"text/x-python","patch_set":22,"id":"fa69d971_3992f44c","line":203,"updated":"2016-01-06 23:45:29.000000000","message":"nit: indentation","commit_id":"402ae23996cd6e855cde966e93e29102d5fc5770"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"67b2ece7a66ace9eaf0aea6f7b38edee5b4acd53","unresolved":false,"context_lines":[{"line_number":200,"context_line":"                    operation, route, namespace\u003dns_name)"},{"line_number":201,"context_line":"            else:"},{"line_number":202,"context_line":"                LOG.error(_LE(\"The SNAT namespace %s does not exist for \""},{"line_number":203,"context_line":"                          \"the router.\"), ns_name)"},{"line_number":204,"context_line":"        super(DvrEdgeRouter, self).update_routing_table(operation, route)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    def delete(self, agent):"}],"source_content_type":"text/x-python","patch_set":22,"id":"fa69d971_74c39138","line":203,"in_reply_to":"fa69d971_3992f44c","updated":"2016-01-07 00:12:41.000000000","message":"Done","commit_id":"402ae23996cd6e855cde966e93e29102d5fc5770"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"52909371de4073403182b68346b444151285595b","unresolved":false,"context_lines":[{"line_number":40,"context_line":"            # added to the router namespace, but if we wanted to populate"},{"line_number":41,"context_line":"            # the same routes to the snat namespace after the gateway port"},{"line_number":42,"context_line":"            # is added, we need to call routes_updated here."},{"line_number":43,"context_line":"            self.routes_updated(ignore_old_routes\u003dTrue)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def external_gateway_updated(self, ex_gw_port, interface_name):"},{"line_number":46,"context_line":"        if not self._is_this_snat_host():"}],"source_content_type":"text/x-python","patch_set":25,"id":"da6ed579_4620d19b","line":43,"range":{"start_line":43,"start_character":32,"end_line":43,"end_character":54},"updated":"2016-01-12 20:56:39.000000000","message":"I think its almost always a bad idea to pass a boolean switch to a method for a special case like this.  I don\u0027t usually support pushing special case logic down in to common methods and adding a switch to enable it like this.\n\nI played around with a bit and came up with this [1].  I don\u0027t have time to test it now but I put it up to illustrate the idea.\n\n [1] https://review.openstack.org/266572","commit_id":"30e4834065eade02c9519e9372ad3459b8bd27be"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"52909371de4073403182b68346b444151285595b","unresolved":false,"context_lines":[{"line_number":196,"context_line":"            # namespace and Router Namespace, to reduce the complexity."},{"line_number":197,"context_line":"            ip_wrapper \u003d ip_lib.IPWrapper(namespace\u003dns_name)"},{"line_number":198,"context_line":"            if ip_wrapper.netns.exists(ns_name):"},{"line_number":199,"context_line":"                super(DvrEdgeRouter, self).update_routing_table("},{"line_number":200,"context_line":"                    operation, route, namespace\u003dns_name)"},{"line_number":201,"context_line":"            else:"},{"line_number":202,"context_line":"                LOG.error(_LE(\"The SNAT namespace %s does not exist for \""}],"source_content_type":"text/x-python","patch_set":25,"id":"da6ed579_70034f74","line":199,"range":{"start_line":199,"start_character":43,"end_line":199,"end_character":63},"updated":"2016-01-12 20:56:39.000000000","message":"This feels strange.  Could you change this to call _update_routing_table.  It is very strange for this method to call the super version of update_routing_table in two different spots.  Since this one knows the namespace already, there is no reason to call update_routing_table.","commit_id":"30e4834065eade02c9519e9372ad3459b8bd27be"}],"neutron/agent/l3/ha_router.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cf50b2d8c4239e85dfb632482445ddaa9677f914","unresolved":false,"context_lines":[{"line_number":181,"context_line":"    def get_router_cidrs(self, device):"},{"line_number":182,"context_line":"        return set(self._get_cidrs_from_keepalived(device.name))"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    def routes_updated(self, snat_old_routes\u003dNone):"},{"line_number":185,"context_line":"        new_routes \u003d self.router[\u0027routes\u0027]"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"        instance \u003d self._get_keepalived_instance()"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a29b11f_ff10cf5a","line":184,"updated":"2015-10-22 20:16:18.000000000","message":"Noticing snat stuff leaking over in to the ha class.","commit_id":"f1adfda39c2dc56d836a068380444600bf5a3b45"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"931c193896aaa37ff3cd533bc6ca736d2ecf5cd3","unresolved":false,"context_lines":[{"line_number":181,"context_line":"    def get_router_cidrs(self, device):"},{"line_number":182,"context_line":"        return set(self._get_cidrs_from_keepalived(device.name))"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    def routes_updated(self, snat_old_routes\u003dNone):"},{"line_number":185,"context_line":"        new_routes \u003d self.router[\u0027routes\u0027]"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"        instance \u003d self._get_keepalived_instance()"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a29b11f_a5700841","line":184,"in_reply_to":"3a29b11f_ff10cf5a","updated":"2015-10-22 21:18:16.000000000","message":"Yes since this has the routes_updated function overload, we need a way to prevent this.","commit_id":"f1adfda39c2dc56d836a068380444600bf5a3b45"}],"neutron/agent/l3/router_info.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cf50b2d8c4239e85dfb632482445ddaa9677f914","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        ip_wrapper \u003d ip_lib.IPWrapper(namespace\u003dnamespace)"},{"line_number":112,"context_line":"        ip_wrapper.netns.execute(cmd, check_exit_code\u003dFalse)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def update_routing_table(self, operation, route, namespace\u003dNone):"},{"line_number":115,"context_line":"        if namespace is None:"},{"line_number":116,"context_line":"            namespace \u003d self.ns_name"},{"line_number":117,"context_line":"        self._update_routing_table(operation, route, namespace)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a29b11f_5f50e331","line":114,"updated":"2015-10-22 20:16:18.000000000","message":"No one passing namespace that is not None anymore.","commit_id":"f1adfda39c2dc56d836a068380444600bf5a3b45"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cf50b2d8c4239e85dfb632482445ddaa9677f914","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        new_routes \u003d self.router[\u0027routes\u0027]"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        old_routes \u003d self.routes"},{"line_number":123,"context_line":"        if snat_old_routes \u003d\u003d old_routes:"},{"line_number":124,"context_line":"            old_routes \u003d []"},{"line_number":125,"context_line":"        adds, removes \u003d common_utils.diff_list_of_dict(old_routes,"},{"line_number":126,"context_line":"                                                       new_routes)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a29b11f_5f69c3f7","line":123,"updated":"2015-10-22 20:16:18.000000000","message":"Noticing snat stuff leaking in to the base class.  This makes me wonder what is really wrong.","commit_id":"f1adfda39c2dc56d836a068380444600bf5a3b45"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"931c193896aaa37ff3cd533bc6ca736d2ecf5cd3","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        new_routes \u003d self.router[\u0027routes\u0027]"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        old_routes \u003d self.routes"},{"line_number":123,"context_line":"        if snat_old_routes \u003d\u003d old_routes:"},{"line_number":124,"context_line":"            old_routes \u003d []"},{"line_number":125,"context_line":"        adds, removes \u003d common_utils.diff_list_of_dict(old_routes,"},{"line_number":126,"context_line":"                                                       new_routes)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a29b11f_e5f6008e","line":123,"in_reply_to":"3a29b11f_5f69c3f7","updated":"2015-10-22 21:18:16.000000000","message":"I need a way to pass back the cached routes for snat in the event were the routes are added to router namespace and not added to the snat namespace.\n\nThe routes_updated function will only try to apply the \"delta\" from old to new.\n\nSo the current snat_old_routes retains or caches the route entries for later use by the snat_namespace.","commit_id":"f1adfda39c2dc56d836a068380444600bf5a3b45"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"10db2cb91da03241064d62b561fb8045ca9b7808","unresolved":false,"context_lines":[{"line_number":112,"context_line":"            namespace \u003d self.ns_name"},{"line_number":113,"context_line":"        self._update_routing_table(operation, route, namespace)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def routes_updated(self, snat_add_routes\u003dFalse):"},{"line_number":116,"context_line":"        new_routes \u003d self.router[\u0027routes\u0027]"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        old_routes \u003d self.routes"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a740942_4ccd0265","line":115,"updated":"2015-12-07 19:56:00.000000000","message":"ignore_old_routes ?","commit_id":"4a70ef729d6c7e0a0647f085facd7e1febf72518"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"10db2cb91da03241064d62b561fb8045ca9b7808","unresolved":false,"context_lines":[{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        old_routes \u003d self.routes"},{"line_number":119,"context_line":"        if snat_add_routes:"},{"line_number":120,"context_line":"            old_routes \u003d []"},{"line_number":121,"context_line":"        adds, removes \u003d common_utils.diff_list_of_dict(old_routes,"},{"line_number":122,"context_line":"                                                       new_routes)"},{"line_number":123,"context_line":"        for route in adds:"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a740942_ec0b8e8c","line":120,"updated":"2015-12-07 19:56:00.000000000","message":"This initialization can be on one line:\n\nold_routes \u003d [] if ignore_old_routes else self.routes","commit_id":"4a70ef729d6c7e0a0647f085facd7e1febf72518"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"52909371de4073403182b68346b444151285595b","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        ip_wrapper \u003d ip_lib.IPWrapper(namespace\u003dnamespace)"},{"line_number":108,"context_line":"        ip_wrapper.netns.execute(cmd, check_exit_code\u003dFalse)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def update_routing_table(self, operation, route, namespace\u003dNone):"},{"line_number":111,"context_line":"        if namespace is None:"},{"line_number":112,"context_line":"            namespace \u003d self.ns_name"},{"line_number":113,"context_line":"        self._update_routing_table(operation, route, namespace)"}],"source_content_type":"text/x-python","patch_set":25,"id":"da6ed579_70882fe8","line":110,"range":{"start_line":110,"start_character":53,"end_line":110,"end_character":67},"updated":"2016-01-12 20:56:39.000000000","message":"Remove this argument.","commit_id":"30e4834065eade02c9519e9372ad3459b8bd27be"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"52909371de4073403182b68346b444151285595b","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        ip_wrapper.netns.execute(cmd, check_exit_code\u003dFalse)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def update_routing_table(self, operation, route, namespace\u003dNone):"},{"line_number":111,"context_line":"        if namespace is None:"},{"line_number":112,"context_line":"            namespace \u003d self.ns_name"},{"line_number":113,"context_line":"        self._update_routing_table(operation, route, namespace)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def routes_updated(self, ignore_old_routes\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":25,"id":"da6ed579_f01dffbd","line":112,"range":{"start_line":111,"start_character":0,"end_line":112,"end_character":36},"updated":"2016-01-12 20:56:39.000000000","message":"Remove these two lines.","commit_id":"30e4834065eade02c9519e9372ad3459b8bd27be"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"52909371de4073403182b68346b444151285595b","unresolved":false,"context_lines":[{"line_number":110,"context_line":"    def update_routing_table(self, operation, route, namespace\u003dNone):"},{"line_number":111,"context_line":"        if namespace is None:"},{"line_number":112,"context_line":"            namespace \u003d self.ns_name"},{"line_number":113,"context_line":"        self._update_routing_table(operation, route, namespace)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def routes_updated(self, ignore_old_routes\u003dFalse):"},{"line_number":116,"context_line":"        new_routes \u003d self.router[\u0027routes\u0027]"}],"source_content_type":"text/x-python","patch_set":25,"id":"da6ed579_3024f70b","line":113,"range":{"start_line":113,"start_character":53,"end_line":113,"end_character":62},"updated":"2016-01-12 20:56:39.000000000","message":"Just pass self.ns_name directly here.","commit_id":"30e4834065eade02c9519e9372ad3459b8bd27be"}],"neutron/tests/functional/agent/l3/test_dvr_router.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"bb3f0fd10a16f9eba63d245ca68e147747447971","unresolved":false,"context_lines":[{"line_number":671,"context_line":"        router_updated \u003d self.agent.router_info[router_info[\u0027id\u0027]]"},{"line_number":672,"context_line":"        self._assert_extra_routes(router_updated, namespace\u003dsnat_ns_name)"},{"line_number":673,"context_line":"        self._assert_extra_routes("},{"line_number":674,"context_line":"            router_updated, namespace\u003drouter_updated.ns_name)"}],"source_content_type":"text/x-python","patch_set":22,"id":"fa69d971_f933fc5f","line":674,"updated":"2016-01-06 23:45:29.000000000","message":"nit: don\u0027t need the namespace arg here as it will be pulled from the router passed.","commit_id":"402ae23996cd6e855cde966e93e29102d5fc5770"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"67b2ece7a66ace9eaf0aea6f7b38edee5b4acd53","unresolved":false,"context_lines":[{"line_number":671,"context_line":"        router_updated \u003d self.agent.router_info[router_info[\u0027id\u0027]]"},{"line_number":672,"context_line":"        self._assert_extra_routes(router_updated, namespace\u003dsnat_ns_name)"},{"line_number":673,"context_line":"        self._assert_extra_routes("},{"line_number":674,"context_line":"            router_updated, namespace\u003drouter_updated.ns_name)"}],"source_content_type":"text/x-python","patch_set":22,"id":"fa69d971_94be45ac","line":674,"in_reply_to":"fa69d971_f933fc5f","updated":"2016-01-07 00:12:41.000000000","message":"Done","commit_id":"402ae23996cd6e855cde966e93e29102d5fc5770"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"bb3f0fd10a16f9eba63d245ca68e147747447971","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":22,"id":"fa69d971_b94264ac","line":675,"updated":"2016-01-06 23:45:29.000000000","message":"nit: extra line","commit_id":"402ae23996cd6e855cde966e93e29102d5fc5770"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"67b2ece7a66ace9eaf0aea6f7b38edee5b4acd53","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":22,"id":"fa69d971_34e0b9cc","line":675,"in_reply_to":"fa69d971_b94264ac","updated":"2016-01-07 00:12:41.000000000","message":"Done","commit_id":"402ae23996cd6e855cde966e93e29102d5fc5770"}],"neutron/tests/functional/agent/test_l3_agent.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"6d8f3134f0f5ff51cd1a9530a699a90475b0607f","unresolved":false,"context_lines":[{"line_number":1490,"context_line":"    def _assert_dvr_extra_routes(self, router, snat_enabled\u003dFalse):"},{"line_number":1491,"context_line":"        if not snat_enabled:"},{"line_number":1492,"context_line":"            routes \u003d ip_lib.get_routing_table(4, namespace\u003drouter.ns_name)"},{"line_number":1493,"context_line":"            LOG.info(\"SWAMI: SWAMI: routes: %s\", routes)"},{"line_number":1494,"context_line":"        else:"},{"line_number":1495,"context_line":"            namespace \u003d dvr_snat_ns.SnatNamespace.get_snat_ns_name("},{"line_number":1496,"context_line":"                router.router_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_b4b454f2","line":1493,"updated":"2015-09-27 07:14:12.000000000","message":"we do not need this","commit_id":"19025eac22ae63fb67d6527f0f3cb69148e62f6e"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"c1303e3f9934db428af9309c0dd3c6783139cf0c","unresolved":false,"context_lines":[{"line_number":1490,"context_line":"    def _assert_dvr_extra_routes(self, router, snat_enabled\u003dFalse):"},{"line_number":1491,"context_line":"        if not snat_enabled:"},{"line_number":1492,"context_line":"            routes \u003d ip_lib.get_routing_table(4, namespace\u003drouter.ns_name)"},{"line_number":1493,"context_line":"            LOG.info(\"SWAMI: SWAMI: routes: %s\", routes)"},{"line_number":1494,"context_line":"        else:"},{"line_number":1495,"context_line":"            namespace \u003d dvr_snat_ns.SnatNamespace.get_snat_ns_name("},{"line_number":1496,"context_line":"                router.router_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_56f4bcf0","line":1493,"in_reply_to":"9a1a9d01_9386eb11","updated":"2015-09-28 15:59:10.000000000","message":"Done","commit_id":"19025eac22ae63fb67d6527f0f3cb69148e62f6e"},{"author":{"_account_id":11682,"name":"Ryan Moats","email":"rmoats@us.ibm.com","username":"regXboi"},"change_message_id":"333c32ff72d01e91e9688cafafaea2f1a35c60a5","unresolved":false,"context_lines":[{"line_number":1490,"context_line":"    def _assert_dvr_extra_routes(self, router, snat_enabled\u003dFalse):"},{"line_number":1491,"context_line":"        if not snat_enabled:"},{"line_number":1492,"context_line":"            routes \u003d ip_lib.get_routing_table(4, namespace\u003drouter.ns_name)"},{"line_number":1493,"context_line":"            LOG.info(\"SWAMI: SWAMI: routes: %s\", routes)"},{"line_number":1494,"context_line":"        else:"},{"line_number":1495,"context_line":"            namespace \u003d dvr_snat_ns.SnatNamespace.get_snat_ns_name("},{"line_number":1496,"context_line":"                router.router_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_9386eb11","line":1493,"in_reply_to":"9a1a9d01_b4b454f2","updated":"2015-09-28 14:13:57.000000000","message":"+1","commit_id":"19025eac22ae63fb67d6527f0f3cb69148e62f6e"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"44504508ad5ce4e608247c98828ec0a2a922d1b7","unresolved":false,"context_lines":[{"line_number":1487,"context_line":"            floating_agent_gw_port[0][\u0027network_id\u0027])"},{"line_number":1488,"context_line":"        self.assertFalse(self._namespace_exists(fip_ns))"},{"line_number":1489,"context_line":""},{"line_number":1490,"context_line":"    def _assert_dvr_extra_routes(self, router, snat_enabled\u003dFalse):"},{"line_number":1491,"context_line":"        if not snat_enabled:"},{"line_number":1492,"context_line":"            routes \u003d ip_lib.get_routing_table(4, namespace\u003drouter.ns_name)"},{"line_number":1493,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a1a9d01_532357a7","line":1490,"updated":"2015-09-29 02:35:04.000000000","message":"There\u0027s no need for this method. You can just edit the existing _assert_extra_routes method.","commit_id":"af205325f16b8aba091a9b1c55a770eb9395f3d2"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"987f7e625d416004a13b33a72c44328e760ac932","unresolved":false,"context_lines":[{"line_number":1487,"context_line":"            floating_agent_gw_port[0][\u0027network_id\u0027])"},{"line_number":1488,"context_line":"        self.assertFalse(self._namespace_exists(fip_ns))"},{"line_number":1489,"context_line":""},{"line_number":1490,"context_line":"    def _assert_dvr_extra_routes(self, router, snat_enabled\u003dFalse):"},{"line_number":1491,"context_line":"        if not snat_enabled:"},{"line_number":1492,"context_line":"            routes \u003d ip_lib.get_routing_table(4, namespace\u003drouter.ns_name)"},{"line_number":1493,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a1a9d01_e9987cc2","line":1490,"in_reply_to":"9a1a9d01_532357a7","updated":"2015-09-29 04:23:22.000000000","message":"Will fix it.","commit_id":"af205325f16b8aba091a9b1c55a770eb9395f3d2"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"44504508ad5ce4e608247c98828ec0a2a922d1b7","unresolved":false,"context_lines":[{"line_number":1501,"context_line":"        for extra_route in router.router[\u0027routes\u0027]:"},{"line_number":1502,"context_line":"            self.assertIn(extra_route, routes)"},{"line_number":1503,"context_line":""},{"line_number":1504,"context_line":"    def test_dvr_router_static_routes(self):"},{"line_number":1505,"context_line":"        \"\"\"Test to validate the snat namespaces for static routes.\"\"\""},{"line_number":1506,"context_line":"        self.agent.conf.agent_mode \u003d \u0027dvr_snat\u0027"},{"line_number":1507,"context_line":"        router_info \u003d self.generate_dvr_router_info(extra_routes\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a1a9d01_133abfcc","line":1504,"updated":"2015-09-29 02:35:04.000000000","message":"There\u0027s no need for an extra test. You can incorporate the assertion for extra routes in the existing dvr_lifecycle test. (These tests are not free to run :)","commit_id":"af205325f16b8aba091a9b1c55a770eb9395f3d2"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"987f7e625d416004a13b33a72c44328e760ac932","unresolved":false,"context_lines":[{"line_number":1501,"context_line":"        for extra_route in router.router[\u0027routes\u0027]:"},{"line_number":1502,"context_line":"            self.assertIn(extra_route, routes)"},{"line_number":1503,"context_line":""},{"line_number":1504,"context_line":"    def test_dvr_router_static_routes(self):"},{"line_number":1505,"context_line":"        \"\"\"Test to validate the snat namespaces for static routes.\"\"\""},{"line_number":1506,"context_line":"        self.agent.conf.agent_mode \u003d \u0027dvr_snat\u0027"},{"line_number":1507,"context_line":"        router_info \u003d self.generate_dvr_router_info(extra_routes\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a1a9d01_c98b3867","line":1504,"in_reply_to":"9a1a9d01_133abfcc","updated":"2015-09-29 04:23:22.000000000","message":"Will fix it.","commit_id":"af205325f16b8aba091a9b1c55a770eb9395f3d2"}],"neutron/tests/unit/agent/l3/test_agent.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"c7fa197e7d5aeb9efa635932a8b3e3d00d558373","unresolved":false,"context_lines":[{"line_number":1119,"context_line":"            fake_route1)"},{"line_number":1120,"context_line":"        self.assertTrue(snat_host.called)"},{"line_number":1121,"context_line":"        self.assertTrue(1, update_rtr.call_count)"},{"line_number":1122,"context_line":"        update_rtr.called_once_with(\u0027replace\u0027, fake_route1)"},{"line_number":1123,"context_line":""},{"line_number":1124,"context_line":"    def test_process_update_snat_routing_table_not_called(self):"},{"line_number":1125,"context_line":"        fake_route1 \u003d {\u0027destination\u0027: \u0027135.207.0.0/16\u0027,"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a740942_e5df1c38","line":1122,"updated":"2015-12-07 22:06:32.000000000","message":"This doesn\u0027t look right either, would have to be assert_called_once_with","commit_id":"4a70ef729d6c7e0a0647f085facd7e1febf72518"}]}
