)]}'
{"neutron/agent/l3/router_info.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"a4337634b993ad2ad69e60e26bd3feb8f11ff39e","unresolved":false,"context_lines":[{"line_number":601,"context_line":"        return \u0027-o %s -m mark ! --mark %s -j DROP\u0027 % ("},{"line_number":602,"context_line":"            device_name, mark_mask)"},{"line_number":603,"context_line":""},{"line_number":604,"context_line":"    def _process_internal_ports(self):"},{"line_number":605,"context_line":"        existing_port_ids \u003d set(p[\u0027id\u0027] for p in self.internal_ports)"},{"line_number":606,"context_line":""},{"line_number":607,"context_line":"        internal_ports \u003d self.router.get(lib_constants.INTERFACE_KEY, [])"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_046004d0","line":604,"updated":"2019-12-19 16:02:03.000000000","message":"This method can be called from two separate threads; as you pointed in the bug, the first one deleting the subnet and the second one adding a new one with same CIDR. There is no guarantee that the deletion call is done before the addition one. IMO, just moving this code won\u0027t prevent both threads to be executed in any order.","commit_id":"3faba7cae0c5f0b8ac93c025ca057e2f533445cf"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"dcea3ae81ccf3fd8d8e21b07f9f82cbaf8927b5a","unresolved":false,"context_lines":[{"line_number":601,"context_line":"        return \u0027-o %s -m mark ! --mark %s -j DROP\u0027 % ("},{"line_number":602,"context_line":"            device_name, mark_mask)"},{"line_number":603,"context_line":""},{"line_number":604,"context_line":"    def _process_internal_ports(self):"},{"line_number":605,"context_line":"        existing_port_ids \u003d set(p[\u0027id\u0027] for p in self.internal_ports)"},{"line_number":606,"context_line":""},{"line_number":607,"context_line":"        internal_ports \u003d self.router.get(lib_constants.INTERFACE_KEY, [])"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_64269825","line":604,"in_reply_to":"3fa7e38b_046004d0","updated":"2019-12-19 16:28:49.000000000","message":"The l3-agent should have queued both updates to the same thread since they are hashed by the router id, unless _process_routers_if_compatible() isn\u0027t working as i thought.","commit_id":"3faba7cae0c5f0b8ac93c025ca057e2f533445cf"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"29cfe8dc5682a1c0edb78bddcd5ecbe45e21e14b","unresolved":false,"context_lines":[{"line_number":601,"context_line":"        return \u0027-o %s -m mark ! --mark %s -j DROP\u0027 % ("},{"line_number":602,"context_line":"            device_name, mark_mask)"},{"line_number":603,"context_line":""},{"line_number":604,"context_line":"    def _process_internal_ports(self):"},{"line_number":605,"context_line":"        existing_port_ids \u003d set(p[\u0027id\u0027] for p in self.internal_ports)"},{"line_number":606,"context_line":""},{"line_number":607,"context_line":"        internal_ports \u003d self.router.get(lib_constants.INTERFACE_KEY, [])"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_defdd009","line":604,"in_reply_to":"3fa7e38b_64269825","updated":"2019-12-20 08:11:36.000000000","message":"@Rodolfo, it\u0027s not exactly like that. In case of removing or adding new subnet to the router, even which comes to L3 agent is always router_update. And this triggers this method. So for one router it\u0027s always in one thread. And it than calculates and compares ports from cache and ports actually plugged to the router. So if we will change this order we should always first remove old port and than add new one which would solve the issue described in the related bug.","commit_id":"3faba7cae0c5f0b8ac93c025ca057e2f533445cf"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"32a56617e68e3a3bd2421ed39f047f71a402e740","unresolved":false,"context_lines":[{"line_number":601,"context_line":"        return \u0027-o %s -m mark ! --mark %s -j DROP\u0027 % ("},{"line_number":602,"context_line":"            device_name, mark_mask)"},{"line_number":603,"context_line":""},{"line_number":604,"context_line":"    def _process_internal_ports(self):"},{"line_number":605,"context_line":"        existing_port_ids \u003d set(p[\u0027id\u0027] for p in self.internal_ports)"},{"line_number":606,"context_line":""},{"line_number":607,"context_line":"        internal_ports \u003d self.router.get(lib_constants.INTERFACE_KEY, [])"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_805475fe","line":604,"in_reply_to":"3fa7e38b_defdd009","updated":"2020-01-07 11:09:09.000000000","message":"@Brian @Slawek, I missed that part: the update messages are queued in L3NATAgent._queue and the the \"_process_routers_loop\" spawns several threads to process those messages. But those related to the same router will be processed in the same one.\n\nKnowing that, I\u0027m ok with this patch.","commit_id":"3faba7cae0c5f0b8ac93c025ca057e2f533445cf"}]}
