)]}'
{"neutron/agent/l2/extensions/dhcp/extension.py":[{"author":{"_account_id":25058,"name":"huangshan","email":"huangshan@fiberhome.com","username":"huangshan"},"change_message_id":"3709d0572b88010820609e73723656c16dd421fc","unresolved":true,"context_lines":[{"line_number":128,"context_line":"            return"},{"line_number":129,"context_line":"        LOG.info(\"DHCP extension add DHCP related flows for port %s\","},{"line_number":130,"context_line":"                 port_detail[\u0027port_id\u0027])"},{"line_number":131,"context_line":"        self.int_br.add_dhcp_ipv4_flow(port_detail[\u0027port_id\u0027],"},{"line_number":132,"context_line":"                                       port.ofport,"},{"line_number":133,"context_line":"                                       port.vif_mac)"},{"line_number":134,"context_line":"        if cfg.CONF.DHCP.enable_dhcp_ipv6:"},{"line_number":135,"context_line":"            self.int_br.add_dhcp_ipv6_flow(port_detail[\u0027port_id\u0027],"},{"line_number":136,"context_line":"                                           port.ofport,"},{"line_number":137,"context_line":"                                           port.vif_mac)"},{"line_number":138,"context_line":"        self.set_ofport_cache(port_detail[\u0027port_id\u0027], port)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def get_ofport(self, port_id):"}],"source_content_type":"text/x-python","patch_set":2,"id":"b9ffa8dd_8920d51b","line":137,"range":{"start_line":131,"start_character":0,"end_line":137,"end_character":56},"updated":"2021-02-22 02:25:11.000000000","message":"In this way, when this port only has an IPV4 address, there will be rules on the ipv6 table.\n\nVerify each port to be DHCPv4 or DHCPv6","commit_id":"9546269a71c76f7480906b419d318ac15828a77d"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"8642a45948f6c6a66602b2a8dd4166df44ff86d8","unresolved":true,"context_lines":[{"line_number":128,"context_line":"            return"},{"line_number":129,"context_line":"        LOG.info(\"DHCP extension add DHCP related flows for port %s\","},{"line_number":130,"context_line":"                 port_detail[\u0027port_id\u0027])"},{"line_number":131,"context_line":"        self.int_br.add_dhcp_ipv4_flow(port_detail[\u0027port_id\u0027],"},{"line_number":132,"context_line":"                                       port.ofport,"},{"line_number":133,"context_line":"                                       port.vif_mac)"},{"line_number":134,"context_line":"        if cfg.CONF.DHCP.enable_dhcp_ipv6:"},{"line_number":135,"context_line":"            self.int_br.add_dhcp_ipv6_flow(port_detail[\u0027port_id\u0027],"},{"line_number":136,"context_line":"                                           port.ofport,"},{"line_number":137,"context_line":"                                           port.vif_mac)"},{"line_number":138,"context_line":"        self.set_ofport_cache(port_detail[\u0027port_id\u0027], port)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def get_ofport(self, port_id):"}],"source_content_type":"text/x-python","patch_set":2,"id":"58721818_648ee70b","line":137,"range":{"start_line":131,"start_character":0,"end_line":137,"end_character":56},"in_reply_to":"b9ffa8dd_8920d51b","updated":"2021-02-22 02:50:03.000000000","message":"Yep, my original thoughts is to install these flows no matter if it has IP for it. In order to make the logical simple, just install only ONE flow for a port to cover the following cases:\n1. IPv4 only or IPv6 only\n2. IPv4 and IPv6\n3. Add IPv6 address for a v4 only port\n4. Add IPv4 address for a v6 only port\n\nRemember the point its only one flow for v4/v6. 😊","commit_id":"9546269a71c76f7480906b419d318ac15828a77d"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"a87e841abc553d2363d4cd1b048eaaecaec501fe","unresolved":true,"context_lines":[{"line_number":113,"context_line":"        self.dhcp4_app.register_packet_in_handler("},{"line_number":114,"context_line":"            self.dhcp4_app._packet_in_handler)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def start_dhcp_ipv6(self):"},{"line_number":117,"context_line":"        self.dhcp6_app \u003d self.app_mgr.instantiate("},{"line_number":118,"context_line":"            ipv6.DHCPIPv6Responder,"},{"line_number":119,"context_line":"            self.agent_api,"}],"source_content_type":"text/x-python","patch_set":6,"id":"18a10308_9ec43db9","line":116,"updated":"2021-03-05 09:07:57.000000000","message":"shouldn\u0027t this be done only if dhcp for IPv6 is enabled in config?","commit_id":"e097303a8babb766ef3d3382e58a1357815ad1e0"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"a7fc24ed56eb1f1875fd8a82a05f399dbc1507ce","unresolved":true,"context_lines":[{"line_number":113,"context_line":"        self.dhcp4_app.register_packet_in_handler("},{"line_number":114,"context_line":"            self.dhcp4_app._packet_in_handler)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def start_dhcp_ipv6(self):"},{"line_number":117,"context_line":"        self.dhcp6_app \u003d self.app_mgr.instantiate("},{"line_number":118,"context_line":"            ipv6.DHCPIPv6Responder,"},{"line_number":119,"context_line":"            self.agent_api,"}],"source_content_type":"text/x-python","patch_set":6,"id":"d92fa411_c5754b0f","line":116,"in_reply_to":"18a10308_9ec43db9","updated":"2021-03-05 09:19:35.000000000","message":"See line 104","commit_id":"e097303a8babb766ef3d3382e58a1357815ad1e0"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"342ed6f4c43a3fcb13f723418c28ac50c0d3b7a0","unresolved":true,"context_lines":[{"line_number":113,"context_line":"        self.dhcp4_app.register_packet_in_handler("},{"line_number":114,"context_line":"            self.dhcp4_app._packet_in_handler)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def start_dhcp_ipv6(self):"},{"line_number":117,"context_line":"        self.dhcp6_app \u003d self.app_mgr.instantiate("},{"line_number":118,"context_line":"            ipv6.DHCPIPv6Responder,"},{"line_number":119,"context_line":"            self.agent_api,"}],"source_content_type":"text/x-python","patch_set":6,"id":"b438892a_2a519746","line":116,"in_reply_to":"d92fa411_c5754b0f","updated":"2021-03-08 11:26:57.000000000","message":"ok","commit_id":"e097303a8babb766ef3d3382e58a1357815ad1e0"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"a87e841abc553d2363d4cd1b048eaaecaec501fe","unresolved":true,"context_lines":[{"line_number":131,"context_line":"                    not fixed_ips or len(fixed_ips) \u003d\u003d 0)):"},{"line_number":132,"context_line":"            return"},{"line_number":133,"context_line":"        LOG.info(\"DHCP extension add DHCP related flows for port %s\","},{"line_number":134,"context_line":"                 port_detail[\u0027port_id\u0027])"},{"line_number":135,"context_line":"        self.int_br.add_dhcp_ipv4_flow(port_detail[\u0027port_id\u0027],"},{"line_number":136,"context_line":"                                       port.ofport,"},{"line_number":137,"context_line":"                                       port.vif_mac)"}],"source_content_type":"text/x-python","patch_set":6,"id":"0c804df9_aece2a02","line":134,"updated":"2021-03-05 09:07:57.000000000","message":"do we need that in INFO level? Isn\u0027t debug enough?","commit_id":"e097303a8babb766ef3d3382e58a1357815ad1e0"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"a7fc24ed56eb1f1875fd8a82a05f399dbc1507ce","unresolved":true,"context_lines":[{"line_number":131,"context_line":"                    not fixed_ips or len(fixed_ips) \u003d\u003d 0)):"},{"line_number":132,"context_line":"            return"},{"line_number":133,"context_line":"        LOG.info(\"DHCP extension add DHCP related flows for port %s\","},{"line_number":134,"context_line":"                 port_detail[\u0027port_id\u0027])"},{"line_number":135,"context_line":"        self.int_br.add_dhcp_ipv4_flow(port_detail[\u0027port_id\u0027],"},{"line_number":136,"context_line":"                                       port.ofport,"},{"line_number":137,"context_line":"                                       port.vif_mac)"}],"source_content_type":"text/x-python","patch_set":6,"id":"45392562_c3989812","line":134,"in_reply_to":"0c804df9_aece2a02","updated":"2021-03-05 09:19:35.000000000","message":"IMO, if user enable this function, the work of this extension should be knowable to the users. And one port will be processed once basically. And for users, this looks a big change after they remove DHCP agent. So, it\u0027s better to tell what the agent is doing now.","commit_id":"e097303a8babb766ef3d3382e58a1357815ad1e0"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"a87e841abc553d2363d4cd1b048eaaecaec501fe","unresolved":true,"context_lines":[{"line_number":159,"context_line":"                        port_detail[\u0027port_id\u0027])"},{"line_number":160,"context_line":"            return"},{"line_number":161,"context_line":"        LOG.info(\"DHCP extension remove DHCP related flows for port %s\","},{"line_number":162,"context_line":"                 port_detail[\u0027port_id\u0027])"},{"line_number":163,"context_line":"        self.int_br.del_dhcp_flow(port.ofport, port.vif_mac)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5af73707_e4166218","line":162,"updated":"2021-03-05 09:07:57.000000000","message":"same question here","commit_id":"e097303a8babb766ef3d3382e58a1357815ad1e0"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"2c16d186ea55d504d9a5a2fe1171072d195f9545","unresolved":true,"context_lines":[{"line_number":61,"context_line":"            net_ip \u003d netaddr.IPNetwork(ip.ip_address)"},{"line_number":62,"context_line":"            info \u003d {\u0027subnet_id\u0027: ip.subnet_id,"},{"line_number":63,"context_line":"                    \u0027ip_address\u0027: str(ip.ip_address),"},{"line_number":64,"context_line":"                    \u0027version\u0027: net_ip.version}"},{"line_number":65,"context_line":"            info.update({\u0027cidr\u0027: subnet.cidr,"},{"line_number":66,"context_line":"                         \u0027host_routes\u0027: subnet.host_routes,"},{"line_number":67,"context_line":"                         \u0027dns_nameservers\u0027: subnet.dns_nameservers,"}],"source_content_type":"text/x-python","patch_set":19,"id":"291e8fd1_1fd1639b","line":64,"updated":"2021-05-19 11:14:41.000000000","message":"can\u0027t You get this version from the subnet directly?","commit_id":"270e3ac410a4dc0abee311d27bda83c2c8589e62"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"491b0409260c8041563c5bfe25d2be6fa6267f59","unresolved":false,"context_lines":[{"line_number":61,"context_line":"            net_ip \u003d netaddr.IPNetwork(ip.ip_address)"},{"line_number":62,"context_line":"            info \u003d {\u0027subnet_id\u0027: ip.subnet_id,"},{"line_number":63,"context_line":"                    \u0027ip_address\u0027: str(ip.ip_address),"},{"line_number":64,"context_line":"                    \u0027version\u0027: net_ip.version}"},{"line_number":65,"context_line":"            info.update({\u0027cidr\u0027: subnet.cidr,"},{"line_number":66,"context_line":"                         \u0027host_routes\u0027: subnet.host_routes,"},{"line_number":67,"context_line":"                         \u0027dns_nameservers\u0027: subnet.dns_nameservers,"}],"source_content_type":"text/x-python","patch_set":19,"id":"16835c52_0b1f2b65","line":64,"in_reply_to":"291e8fd1_1fd1639b","updated":"2021-05-20 03:20:05.000000000","message":"Done","commit_id":"270e3ac410a4dc0abee311d27bda83c2c8589e62"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"2c16d186ea55d504d9a5a2fe1171072d195f9545","unresolved":true,"context_lines":[{"line_number":62,"context_line":"            info \u003d {\u0027subnet_id\u0027: ip.subnet_id,"},{"line_number":63,"context_line":"                    \u0027ip_address\u0027: str(ip.ip_address),"},{"line_number":64,"context_line":"                    \u0027version\u0027: net_ip.version}"},{"line_number":65,"context_line":"            info.update({\u0027cidr\u0027: subnet.cidr,"},{"line_number":66,"context_line":"                         \u0027host_routes\u0027: subnet.host_routes,"},{"line_number":67,"context_line":"                         \u0027dns_nameservers\u0027: subnet.dns_nameservers,"},{"line_number":68,"context_line":"                         \u0027gateway_ip\u0027: subnet.gateway_ip})"}],"source_content_type":"text/x-python","patch_set":19,"id":"cb94673e_4abdd95b","line":65,"updated":"2021-05-19 11:14:41.000000000","message":"Why You simple don\u0027t set it in the initialization of the \"info\" dict above?","commit_id":"270e3ac410a4dc0abee311d27bda83c2c8589e62"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"491b0409260c8041563c5bfe25d2be6fa6267f59","unresolved":false,"context_lines":[{"line_number":62,"context_line":"            info \u003d {\u0027subnet_id\u0027: ip.subnet_id,"},{"line_number":63,"context_line":"                    \u0027ip_address\u0027: str(ip.ip_address),"},{"line_number":64,"context_line":"                    \u0027version\u0027: net_ip.version}"},{"line_number":65,"context_line":"            info.update({\u0027cidr\u0027: subnet.cidr,"},{"line_number":66,"context_line":"                         \u0027host_routes\u0027: subnet.host_routes,"},{"line_number":67,"context_line":"                         \u0027dns_nameservers\u0027: subnet.dns_nameservers,"},{"line_number":68,"context_line":"                         \u0027gateway_ip\u0027: subnet.gateway_ip})"}],"source_content_type":"text/x-python","patch_set":19,"id":"62c364ad_955cb304","line":65,"in_reply_to":"cb94673e_4abdd95b","updated":"2021-05-20 03:20:05.000000000","message":"Done","commit_id":"270e3ac410a4dc0abee311d27bda83c2c8589e62"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"2c16d186ea55d504d9a5a2fe1171072d195f9545","unresolved":true,"context_lines":[{"line_number":68,"context_line":"                         \u0027gateway_ip\u0027: subnet.gateway_ip})"},{"line_number":69,"context_line":"            fixed_ips.append(info)"},{"line_number":70,"context_line":"        extra_info \u003d {\u0027fixed_ips\u0027: fixed_ips}"},{"line_number":71,"context_line":"        extra_info[\u0027mtu\u0027] \u003d net.mtu"},{"line_number":72,"context_line":"        entry.update(extra_info)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        LOG.debug(\"DHCP extension API return port info: %s\", entry)"}],"source_content_type":"text/x-python","patch_set":19,"id":"e3240026_5a78ed68","line":71,"updated":"2021-05-19 11:14:41.000000000","message":"nit: why not:\n\n    extra_info \u003d {\u0027fixed_ips\u0027: fixed_ips, \u0027mtu\u0027: net.mtu}\n\n?","commit_id":"270e3ac410a4dc0abee311d27bda83c2c8589e62"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"491b0409260c8041563c5bfe25d2be6fa6267f59","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                         \u0027gateway_ip\u0027: subnet.gateway_ip})"},{"line_number":69,"context_line":"            fixed_ips.append(info)"},{"line_number":70,"context_line":"        extra_info \u003d {\u0027fixed_ips\u0027: fixed_ips}"},{"line_number":71,"context_line":"        extra_info[\u0027mtu\u0027] \u003d net.mtu"},{"line_number":72,"context_line":"        entry.update(extra_info)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        LOG.debug(\"DHCP extension API return port info: %s\", entry)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1fb9f538_88f5a3dd","line":71,"in_reply_to":"e3240026_5a78ed68","updated":"2021-05-20 03:20:05.000000000","message":"Done","commit_id":"270e3ac410a4dc0abee311d27bda83c2c8589e62"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"821e41cf8f472261c053886c75f45c706c5c7676","unresolved":true,"context_lines":[{"line_number":29,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class DHCPExtensionPortInfoAPI(object):"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def __init__(self, cache_api):"},{"line_number":35,"context_line":"        self.cache_api \u003d cache_api"}],"source_content_type":"text/x-python","patch_set":21,"id":"157bebc2_8df3bf6e","line":32,"range":{"start_line":32,"start_character":0,"end_line":32,"end_character":30},"updated":"2021-05-24 09:14:39.000000000","message":"Why need a separate class for get_port_info? can\u0027t it be just method of DHCPAgentExtension?","commit_id":"4c5ebe7ad8d3749c154c79577d87c050c4cc25b7"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"599f438e6f277979d730bd78b4a09a12c3a1877c","unresolved":true,"context_lines":[{"line_number":29,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class DHCPExtensionPortInfoAPI(object):"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def __init__(self, cache_api):"},{"line_number":35,"context_line":"        self.cache_api \u003d cache_api"}],"source_content_type":"text/x-python","patch_set":21,"id":"e293bad1_f424cfdc","line":32,"range":{"start_line":32,"start_character":0,"end_line":32,"end_character":30},"in_reply_to":"157bebc2_8df3bf6e","updated":"2021-05-24 11:34:11.000000000","message":"No special purpose, something like neutron RPC style, neutron agent will call methods from \"AgentAPI\" to retrieve informations. Another thing is to reduce coupling between classes. And maybe someday this port_info API can be refactored to achive a higher proformance.","commit_id":"4c5ebe7ad8d3749c154c79577d87c050c4cc25b7"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"821e41cf8f472261c053886c75f45c706c5c7676","unresolved":true,"context_lines":[{"line_number":37,"context_line":"    def get_port_info(self, port_id):"},{"line_number":38,"context_line":"        port_obj \u003d self.cache_api.get_resource_by_id("},{"line_number":39,"context_line":"            resources.PORT, port_id)"},{"line_number":40,"context_line":"        if not port_obj.device_owner.startswith("},{"line_number":41,"context_line":"                constants.DEVICE_OWNER_COMPUTE_PREFIX):"},{"line_number":42,"context_line":"            return"},{"line_number":43,"context_line":"        net \u003d self.cache_api.get_resource_by_id("}],"source_content_type":"text/x-python","patch_set":21,"id":"6082cb4f_dc6b822c","line":40,"range":{"start_line":40,"start_character":8,"end_line":40,"end_character":48},"updated":"2021-05-24 09:14:39.000000000","message":"please check port_obj !\u003d None first","commit_id":"4c5ebe7ad8d3749c154c79577d87c050c4cc25b7"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"729c2e983392c5bb9fcbf6fef6e8ae5aec734d16","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    def get_port_info(self, port_id):"},{"line_number":38,"context_line":"        port_obj \u003d self.cache_api.get_resource_by_id("},{"line_number":39,"context_line":"            resources.PORT, port_id)"},{"line_number":40,"context_line":"        if not port_obj.device_owner.startswith("},{"line_number":41,"context_line":"                constants.DEVICE_OWNER_COMPUTE_PREFIX):"},{"line_number":42,"context_line":"            return"},{"line_number":43,"context_line":"        net \u003d self.cache_api.get_resource_by_id("}],"source_content_type":"text/x-python","patch_set":21,"id":"a33c0dab_9b19219f","line":40,"range":{"start_line":40,"start_character":8,"end_line":40,"end_character":48},"in_reply_to":"6082cb4f_dc6b822c","updated":"2021-05-25 03:28:11.000000000","message":"Done","commit_id":"4c5ebe7ad8d3749c154c79577d87c050c4cc25b7"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"821e41cf8f472261c053886c75f45c706c5c7676","unresolved":true,"context_lines":[{"line_number":40,"context_line":"        if not port_obj.device_owner.startswith("},{"line_number":41,"context_line":"                constants.DEVICE_OWNER_COMPUTE_PREFIX):"},{"line_number":42,"context_line":"            return"},{"line_number":43,"context_line":"        net \u003d self.cache_api.get_resource_by_id("},{"line_number":44,"context_line":"            resources.NETWORK, port_obj.network_id)"},{"line_number":45,"context_line":"        mac_addr \u003d str(netaddr.EUI(str(port_obj.mac_address),"},{"line_number":46,"context_line":"                                   dialect\u003dnetaddr.mac_unix_expanded))"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"ae28949a_71905e25","line":44,"range":{"start_line":43,"start_character":8,"end_line":44,"end_character":51},"updated":"2021-05-24 09:14:39.000000000","message":"please define net var right before usage, this helps understanding","commit_id":"4c5ebe7ad8d3749c154c79577d87c050c4cc25b7"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"729c2e983392c5bb9fcbf6fef6e8ae5aec734d16","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        if not port_obj.device_owner.startswith("},{"line_number":41,"context_line":"                constants.DEVICE_OWNER_COMPUTE_PREFIX):"},{"line_number":42,"context_line":"            return"},{"line_number":43,"context_line":"        net \u003d self.cache_api.get_resource_by_id("},{"line_number":44,"context_line":"            resources.NETWORK, port_obj.network_id)"},{"line_number":45,"context_line":"        mac_addr \u003d str(netaddr.EUI(str(port_obj.mac_address),"},{"line_number":46,"context_line":"                                   dialect\u003dnetaddr.mac_unix_expanded))"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"c2636f35_5c579383","line":44,"range":{"start_line":43,"start_character":8,"end_line":44,"end_character":51},"in_reply_to":"ae28949a_71905e25","updated":"2021-05-25 03:28:11.000000000","message":"Done","commit_id":"4c5ebe7ad8d3749c154c79577d87c050c4cc25b7"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"821e41cf8f472261c053886c75f45c706c5c7676","unresolved":true,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    OFPORT_CACHE \u003d {}"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    @lockutils.synchronized(\u0027DHCP-ofport-cache\u0027)"},{"line_number":82,"context_line":"    def set_ofport_cache(self, port_id, ofport):"},{"line_number":83,"context_line":"        self.OFPORT_CACHE[port_id] \u003d ofport"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"52528bde_38fc6f21","line":81,"range":{"start_line":81,"start_character":4,"end_line":81,"end_character":48},"updated":"2021-05-24 09:14:39.000000000","message":"just curios: why need locking for the cache update? Do you expect frequent ofport change for same port?","commit_id":"4c5ebe7ad8d3749c154c79577d87c050c4cc25b7"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"59300cbed303e43a663c4142df9b10174b2c0451","unresolved":true,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    OFPORT_CACHE \u003d {}"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    @lockutils.synchronized(\u0027DHCP-ofport-cache\u0027)"},{"line_number":82,"context_line":"    def set_ofport_cache(self, port_id, ofport):"},{"line_number":83,"context_line":"        self.OFPORT_CACHE[port_id] \u003d ofport"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"82db13c2_d63241f6","line":81,"range":{"start_line":81,"start_character":4,"end_line":81,"end_character":48},"in_reply_to":"01a76456_4282954b","updated":"2021-05-24 12:00:23.000000000","message":"Sorry, I meant why need to lock atomic operation?","commit_id":"4c5ebe7ad8d3749c154c79577d87c050c4cc25b7"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"599f438e6f277979d730bd78b4a09a12c3a1877c","unresolved":true,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    OFPORT_CACHE \u003d {}"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    @lockutils.synchronized(\u0027DHCP-ofport-cache\u0027)"},{"line_number":82,"context_line":"    def set_ofport_cache(self, port_id, ofport):"},{"line_number":83,"context_line":"        self.OFPORT_CACHE[port_id] \u003d ofport"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"01a76456_4282954b","line":81,"range":{"start_line":81,"start_character":4,"end_line":81,"end_character":48},"in_reply_to":"52528bde_38fc6f21","updated":"2021-05-24 11:34:11.000000000","message":"This memory lock should be light. Mainly purpose is to prevent the port down/up action for ofport number change.","commit_id":"4c5ebe7ad8d3749c154c79577d87c050c4cc25b7"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"821e41cf8f472261c053886c75f45c706c5c7676","unresolved":true,"context_lines":[{"line_number":82,"context_line":"    def set_ofport_cache(self, port_id, ofport):"},{"line_number":83,"context_line":"        self.OFPORT_CACHE[port_id] \u003d ofport"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    @lockutils.synchronized(\u0027DHCP-ofport-cache\u0027)"},{"line_number":86,"context_line":"    def get_ofport_from_cache(self, port_id):"},{"line_number":87,"context_line":"        return self.OFPORT_CACHE.pop(port_id, None)"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"ceb3c7ea_3cbc71d5","line":85,"range":{"start_line":85,"start_character":4,"end_line":85,"end_character":48},"updated":"2021-05-24 09:14:39.000000000","message":"why need lock to read from dict?","commit_id":"4c5ebe7ad8d3749c154c79577d87c050c4cc25b7"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"59300cbed303e43a663c4142df9b10174b2c0451","unresolved":true,"context_lines":[{"line_number":82,"context_line":"    def set_ofport_cache(self, port_id, ofport):"},{"line_number":83,"context_line":"        self.OFPORT_CACHE[port_id] \u003d ofport"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    @lockutils.synchronized(\u0027DHCP-ofport-cache\u0027)"},{"line_number":86,"context_line":"    def get_ofport_from_cache(self, port_id):"},{"line_number":87,"context_line":"        return self.OFPORT_CACHE.pop(port_id, None)"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"0308317d_dc184cbc","line":85,"range":{"start_line":85,"start_character":4,"end_line":85,"end_character":48},"in_reply_to":"08775ce0_8d810f4f","updated":"2021-05-24 12:00:23.000000000","message":"Sorry, I can\u0027t understand, can you please describe the case where this lock will serve its purpose?","commit_id":"4c5ebe7ad8d3749c154c79577d87c050c4cc25b7"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"599f438e6f277979d730bd78b4a09a12c3a1877c","unresolved":true,"context_lines":[{"line_number":82,"context_line":"    def set_ofport_cache(self, port_id, ofport):"},{"line_number":83,"context_line":"        self.OFPORT_CACHE[port_id] \u003d ofport"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    @lockutils.synchronized(\u0027DHCP-ofport-cache\u0027)"},{"line_number":86,"context_line":"    def get_ofport_from_cache(self, port_id):"},{"line_number":87,"context_line":"        return self.OFPORT_CACHE.pop(port_id, None)"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"08775ce0_8d810f4f","line":85,"range":{"start_line":85,"start_character":4,"end_line":85,"end_character":48},"in_reply_to":"ceb3c7ea_3cbc71d5","updated":"2021-05-24 11:34:11.000000000","message":"A RW (read write) lock for this cache dict, lock will be set no matter the action is.","commit_id":"4c5ebe7ad8d3749c154c79577d87c050c4cc25b7"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"821e41cf8f472261c053886c75f45c706c5c7676","unresolved":true,"context_lines":[{"line_number":103,"context_line":"        if cfg.CONF.DHCP.enable_ipv6:"},{"line_number":104,"context_line":"            self.start_dhcp_ipv6()"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def start_dhcp(self):"},{"line_number":107,"context_line":"        self.dhcp4_app \u003d self.app_mgr.instantiate("},{"line_number":108,"context_line":"            ipv4.DHCPIPv4Responder,"},{"line_number":109,"context_line":"            self.agent_api,"},{"line_number":110,"context_line":"            self.ext_api)"},{"line_number":111,"context_line":"        self.dhcp4_app.start()"},{"line_number":112,"context_line":"        self.dhcp4_app.register_packet_in_handler("},{"line_number":113,"context_line":"            self.dhcp4_app._packet_in_handler)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def start_dhcp_ipv6(self):"},{"line_number":116,"context_line":"        self.dhcp6_app \u003d self.app_mgr.instantiate("},{"line_number":117,"context_line":"            ipv6.DHCPIPv6Responder,"},{"line_number":118,"context_line":"            self.agent_api,"},{"line_number":119,"context_line":"            self.ext_api)"},{"line_number":120,"context_line":"        self.dhcp6_app.start()"},{"line_number":121,"context_line":"        self.dhcp6_app.register_packet_in_handler("},{"line_number":122,"context_line":"            self.dhcp6_app._packet_in_handler)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def handle_port(self, context, port_detail):"},{"line_number":125,"context_line":"        fixed_ips \u003d port_detail.get(\u0027fixed_ips\u0027)"}],"source_content_type":"text/x-python","patch_set":21,"id":"84ce5b8d_14673a70","line":122,"range":{"start_line":106,"start_character":4,"end_line":122,"end_character":46},"updated":"2021-05-24 09:14:39.000000000","message":"duplicated logic could be refactored","commit_id":"4c5ebe7ad8d3749c154c79577d87c050c4cc25b7"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"729c2e983392c5bb9fcbf6fef6e8ae5aec734d16","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        if cfg.CONF.DHCP.enable_ipv6:"},{"line_number":104,"context_line":"            self.start_dhcp_ipv6()"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def start_dhcp(self):"},{"line_number":107,"context_line":"        self.dhcp4_app \u003d self.app_mgr.instantiate("},{"line_number":108,"context_line":"            ipv4.DHCPIPv4Responder,"},{"line_number":109,"context_line":"            self.agent_api,"},{"line_number":110,"context_line":"            self.ext_api)"},{"line_number":111,"context_line":"        self.dhcp4_app.start()"},{"line_number":112,"context_line":"        self.dhcp4_app.register_packet_in_handler("},{"line_number":113,"context_line":"            self.dhcp4_app._packet_in_handler)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def start_dhcp_ipv6(self):"},{"line_number":116,"context_line":"        self.dhcp6_app \u003d self.app_mgr.instantiate("},{"line_number":117,"context_line":"            ipv6.DHCPIPv6Responder,"},{"line_number":118,"context_line":"            self.agent_api,"},{"line_number":119,"context_line":"            self.ext_api)"},{"line_number":120,"context_line":"        self.dhcp6_app.start()"},{"line_number":121,"context_line":"        self.dhcp6_app.register_packet_in_handler("},{"line_number":122,"context_line":"            self.dhcp6_app._packet_in_handler)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def handle_port(self, context, port_detail):"},{"line_number":125,"context_line":"        fixed_ips \u003d port_detail.get(\u0027fixed_ips\u0027)"}],"source_content_type":"text/x-python","patch_set":21,"id":"b75e0abd_62c2e454","line":122,"range":{"start_line":106,"start_character":4,"end_line":122,"end_character":46},"in_reply_to":"84ce5b8d_14673a70","updated":"2021-05-25 03:28:11.000000000","message":"Done","commit_id":"4c5ebe7ad8d3749c154c79577d87c050c4cc25b7"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"821e41cf8f472261c053886c75f45c706c5c7676","unresolved":true,"context_lines":[{"line_number":127,"context_line":"        # TODO(liuyulong): DHCP for baremetal"},{"line_number":128,"context_line":"        if (not port_detail[\u0027device_owner\u0027].startswith("},{"line_number":129,"context_line":"                constants.DEVICE_OWNER_COMPUTE_PREFIX) or ("},{"line_number":130,"context_line":"                    not fixed_ips or len(fixed_ips) \u003d\u003d 0)):"},{"line_number":131,"context_line":"            return"},{"line_number":132,"context_line":"        LOG.info(\"DHCP extension add DHCP related flows for port %s\","},{"line_number":133,"context_line":"                 port_detail[\u0027port_id\u0027])"}],"source_content_type":"text/x-python","patch_set":21,"id":"952fb771_e17891cd","line":130,"range":{"start_line":130,"start_character":34,"end_line":130,"end_character":57},"updated":"2021-05-24 09:14:39.000000000","message":"\u0027not fixed_ips\u0027 should cover this","commit_id":"4c5ebe7ad8d3749c154c79577d87c050c4cc25b7"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"729c2e983392c5bb9fcbf6fef6e8ae5aec734d16","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        # TODO(liuyulong): DHCP for baremetal"},{"line_number":128,"context_line":"        if (not port_detail[\u0027device_owner\u0027].startswith("},{"line_number":129,"context_line":"                constants.DEVICE_OWNER_COMPUTE_PREFIX) or ("},{"line_number":130,"context_line":"                    not fixed_ips or len(fixed_ips) \u003d\u003d 0)):"},{"line_number":131,"context_line":"            return"},{"line_number":132,"context_line":"        LOG.info(\"DHCP extension add DHCP related flows for port %s\","},{"line_number":133,"context_line":"                 port_detail[\u0027port_id\u0027])"}],"source_content_type":"text/x-python","patch_set":21,"id":"97a19734_60a24e01","line":130,"range":{"start_line":130,"start_character":34,"end_line":130,"end_character":57},"in_reply_to":"952fb771_e17891cd","updated":"2021-05-25 03:28:11.000000000","message":"Done","commit_id":"4c5ebe7ad8d3749c154c79577d87c050c4cc25b7"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"821e41cf8f472261c053886c75f45c706c5c7676","unresolved":true,"context_lines":[{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def delete_port(self, context, port_detail):"},{"line_number":150,"context_line":"        port \u003d port_detail.get(\u0027vif_port\u0027)"},{"line_number":151,"context_line":"        if not port:"},{"line_number":152,"context_line":"            port \u003d self.get_ofport(port_detail[\u0027port_id\u0027])"},{"line_number":153,"context_line":"        if not port or port.ofport \u003c\u003d 0:"},{"line_number":154,"context_line":"            port \u003d self.get_ofport_from_cache(port_detail[\u0027port_id\u0027])"},{"line_number":155,"context_line":"        if not port:"}],"source_content_type":"text/x-python","patch_set":21,"id":"0e61e718_08529c49","line":152,"range":{"start_line":151,"start_character":8,"end_line":152,"end_character":58},"updated":"2021-05-24 09:14:39.000000000","message":"why not check cache first?","commit_id":"4c5ebe7ad8d3749c154c79577d87c050c4cc25b7"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"599f438e6f277979d730bd78b4a09a12c3a1877c","unresolved":true,"context_lines":[{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def delete_port(self, context, port_detail):"},{"line_number":150,"context_line":"        port \u003d port_detail.get(\u0027vif_port\u0027)"},{"line_number":151,"context_line":"        if not port:"},{"line_number":152,"context_line":"            port \u003d self.get_ofport(port_detail[\u0027port_id\u0027])"},{"line_number":153,"context_line":"        if not port or port.ofport \u003c\u003d 0:"},{"line_number":154,"context_line":"            port \u003d self.get_ofport_from_cache(port_detail[\u0027port_id\u0027])"},{"line_number":155,"context_line":"        if not port:"}],"source_content_type":"text/x-python","patch_set":21,"id":"591d0cd3_66f5e664","line":152,"range":{"start_line":151,"start_character":8,"end_line":152,"end_character":58},"in_reply_to":"0e61e718_08529c49","updated":"2021-05-24 11:34:11.000000000","message":"Cache may not get ready if the deletion processed first at the begining of the rpc_loop.","commit_id":"4c5ebe7ad8d3749c154c79577d87c050c4cc25b7"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"729c2e983392c5bb9fcbf6fef6e8ae5aec734d16","unresolved":true,"context_lines":[{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def delete_port(self, context, port_detail):"},{"line_number":150,"context_line":"        port \u003d port_detail.get(\u0027vif_port\u0027)"},{"line_number":151,"context_line":"        if not port:"},{"line_number":152,"context_line":"            port \u003d self.get_ofport(port_detail[\u0027port_id\u0027])"},{"line_number":153,"context_line":"        if not port or port.ofport \u003c\u003d 0:"},{"line_number":154,"context_line":"            port \u003d self.get_ofport_from_cache(port_detail[\u0027port_id\u0027])"},{"line_number":155,"context_line":"        if not port:"}],"source_content_type":"text/x-python","patch_set":21,"id":"20d2d25f_3f9336a4","line":152,"range":{"start_line":151,"start_character":8,"end_line":152,"end_character":58},"in_reply_to":"3031eb40_a8490875","updated":"2021-05-25 03:28:11.000000000","message":"Get the ofport from ovsdb should be the first way, because in there the data should be right always. The cache is just in case the race condition between ovsdb port deletation and this get_ofport method. The cache is a backup. All this cache works are because in some extrem case during our local testing, the ofport may get deleted, then the flow can not be deleted due to no ofport found.","commit_id":"4c5ebe7ad8d3749c154c79577d87c050c4cc25b7"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"59300cbed303e43a663c4142df9b10174b2c0451","unresolved":true,"context_lines":[{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def delete_port(self, context, port_detail):"},{"line_number":150,"context_line":"        port \u003d port_detail.get(\u0027vif_port\u0027)"},{"line_number":151,"context_line":"        if not port:"},{"line_number":152,"context_line":"            port \u003d self.get_ofport(port_detail[\u0027port_id\u0027])"},{"line_number":153,"context_line":"        if not port or port.ofport \u003c\u003d 0:"},{"line_number":154,"context_line":"            port \u003d self.get_ofport_from_cache(port_detail[\u0027port_id\u0027])"},{"line_number":155,"context_line":"        if not port:"}],"source_content_type":"text/x-python","patch_set":21,"id":"3031eb40_a8490875","line":152,"range":{"start_line":151,"start_character":8,"end_line":152,"end_character":58},"in_reply_to":"591d0cd3_66f5e664","updated":"2021-05-24 12:00:23.000000000","message":"It\u0027s clear, I mean look into cache first - and if not found do full search","commit_id":"4c5ebe7ad8d3749c154c79577d87c050c4cc25b7"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"46ab78ad816864ccc04802b54dc8fa2d24100bf8","unresolved":true,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    OFPORT_CACHE \u003d {}"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    @lockutils.synchronized(\u0027DHCP-ofport-cache\u0027)"},{"line_number":83,"context_line":"    def set_ofport_cache(self, port_id, ofport):"},{"line_number":84,"context_line":"        self.OFPORT_CACHE[port_id] \u003d ofport"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"fd79a70b_58f8cac6","line":82,"range":{"start_line":82,"start_character":4,"end_line":82,"end_character":48},"updated":"2021-05-25 07:35:36.000000000","message":"please check my previous comment, why need to lock atomic operation?","commit_id":"b1e59a58667892011cb06c2790f4b8bfa662e329"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"0810a93e3f685a843d25b236c3978e3e7abc2fe4","unresolved":true,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    OFPORT_CACHE \u003d {}"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    @lockutils.synchronized(\u0027DHCP-ofport-cache\u0027)"},{"line_number":83,"context_line":"    def set_ofport_cache(self, port_id, ofport):"},{"line_number":84,"context_line":"        self.OFPORT_CACHE[port_id] \u003d ofport"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"80a5f4e6_23cc80e9","line":82,"range":{"start_line":82,"start_character":4,"end_line":82,"end_character":48},"in_reply_to":"57dad77f_e9ffbe11","updated":"2021-05-26 11:11:31.000000000","message":"Do not know what will happen if we remove the lock here, the locking code is running in our local deployment for years. And in some extrem condition, python dictionary is not thread-safe. But anyway, I will remove this temporarily. Unless someday we meet bad things.","commit_id":"b1e59a58667892011cb06c2790f4b8bfa662e329"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"83caa08fd3d9bff8b08faf96fb42f00471d0d9e9","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    OFPORT_CACHE \u003d {}"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    @lockutils.synchronized(\u0027DHCP-ofport-cache\u0027)"},{"line_number":83,"context_line":"    def set_ofport_cache(self, port_id, ofport):"},{"line_number":84,"context_line":"        self.OFPORT_CACHE[port_id] \u003d ofport"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"9328869c_816e7948","line":82,"range":{"start_line":82,"start_character":4,"end_line":82,"end_character":48},"in_reply_to":"80a5f4e6_23cc80e9","updated":"2021-05-26 11:15:58.000000000","message":"Done","commit_id":"b1e59a58667892011cb06c2790f4b8bfa662e329"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"847e87642ae13b51b834896338d6f9ec81914993","unresolved":true,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    OFPORT_CACHE \u003d {}"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    @lockutils.synchronized(\u0027DHCP-ofport-cache\u0027)"},{"line_number":83,"context_line":"    def set_ofport_cache(self, port_id, ofport):"},{"line_number":84,"context_line":"        self.OFPORT_CACHE[port_id] \u003d ofport"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"57dad77f_e9ffbe11","line":82,"range":{"start_line":82,"start_character":4,"end_line":82,"end_character":48},"in_reply_to":"bcfe3098_8ab15315","updated":"2021-05-25 08:27:15.000000000","message":"QoS agent extension adds locks on complex methods where thread switch could lead to an inconsistency in the middle of the method. Here single atomic dict value update can\u0027t be prone to any race condition, lock here is an overhead.","commit_id":"b1e59a58667892011cb06c2790f4b8bfa662e329"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"c3b47b4f92dd2a645e756423602625d7fc2cac2c","unresolved":true,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    OFPORT_CACHE \u003d {}"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    @lockutils.synchronized(\u0027DHCP-ofport-cache\u0027)"},{"line_number":83,"context_line":"    def set_ofport_cache(self, port_id, ofport):"},{"line_number":84,"context_line":"        self.OFPORT_CACHE[port_id] \u003d ofport"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"bcfe3098_8ab15315","line":82,"range":{"start_line":82,"start_character":4,"end_line":82,"end_character":48},"in_reply_to":"fd79a70b_58f8cac6","updated":"2021-05-25 08:09:50.000000000","message":"Some potential race conditions: ovs-agent has port_delete, network_update and port_update which will casue the port to be processed, all these method will have race condition to port unplug from the bridge or each other. The patch [1] adds the lock to QoS agent extension, but for this patch here the granularity of lock is reduced, we only care about the cache.\n\n[1] https://review.opendev.org/c/openstack/neutron/+/211044","commit_id":"b1e59a58667892011cb06c2790f4b8bfa662e329"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"46ab78ad816864ccc04802b54dc8fa2d24100bf8","unresolved":true,"context_lines":[{"line_number":83,"context_line":"    def set_ofport_cache(self, port_id, ofport):"},{"line_number":84,"context_line":"        self.OFPORT_CACHE[port_id] \u003d ofport"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    @lockutils.synchronized(\u0027DHCP-ofport-cache\u0027)"},{"line_number":87,"context_line":"    def get_ofport_from_cache(self, port_id):"},{"line_number":88,"context_line":"        return self.OFPORT_CACHE.pop(port_id, None)"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"2b95b4aa_cc04f7b1","line":86,"range":{"start_line":86,"start_character":4,"end_line":86,"end_character":48},"updated":"2021-05-25 07:35:36.000000000","message":"ditto","commit_id":"b1e59a58667892011cb06c2790f4b8bfa662e329"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"4dce861aff5adf82a39994d440b40a09907fbff5","unresolved":true,"context_lines":[{"line_number":138,"context_line":"            self.int_br.add_dhcp_ipv6_flow(port_detail[\u0027port_id\u0027],"},{"line_number":139,"context_line":"                                           port.ofport,"},{"line_number":140,"context_line":"                                           port.vif_mac)"},{"line_number":141,"context_line":"        self.set_ofport_cache(port_detail[\u0027port_id\u0027], port)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def get_ofport(self, port_id):"},{"line_number":144,"context_line":"        vifs \u003d self.int_br.get_vif_ports()"}],"source_content_type":"text/x-python","patch_set":22,"id":"c0535399_75158e96","line":141,"range":{"start_line":141,"start_character":54,"end_line":141,"end_character":58},"updated":"2021-05-26 08:10:21.000000000","message":"should be port.ofport here","commit_id":"b1e59a58667892011cb06c2790f4b8bfa662e329"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"0810a93e3f685a843d25b236c3978e3e7abc2fe4","unresolved":true,"context_lines":[{"line_number":138,"context_line":"            self.int_br.add_dhcp_ipv6_flow(port_detail[\u0027port_id\u0027],"},{"line_number":139,"context_line":"                                           port.ofport,"},{"line_number":140,"context_line":"                                           port.vif_mac)"},{"line_number":141,"context_line":"        self.set_ofport_cache(port_detail[\u0027port_id\u0027], port)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def get_ofport(self, port_id):"},{"line_number":144,"context_line":"        vifs \u003d self.int_br.get_vif_ports()"}],"source_content_type":"text/x-python","patch_set":22,"id":"2905938d_c56bbb16","line":141,"range":{"start_line":141,"start_character":54,"end_line":141,"end_character":58},"in_reply_to":"c0535399_75158e96","updated":"2021-05-26 11:11:31.000000000","message":"Cache value is same to get_ofport return_value in order to make the next step line 153 have the same arrtribute getter action \"port.ofport\".","commit_id":"b1e59a58667892011cb06c2790f4b8bfa662e329"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"4dce861aff5adf82a39994d440b40a09907fbff5","unresolved":true,"context_lines":[{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def delete_port(self, context, port_detail):"},{"line_number":150,"context_line":"        port \u003d port_detail.get(\u0027vif_port\u0027)"},{"line_number":151,"context_line":"        if not port:"},{"line_number":152,"context_line":"            port \u003d self.get_ofport(port_detail[\u0027port_id\u0027])"},{"line_number":153,"context_line":"        if not port or port.ofport \u003c\u003d 0:"},{"line_number":154,"context_line":"            port \u003d self.get_ofport_from_cache(port_detail[\u0027port_id\u0027])"},{"line_number":155,"context_line":"        if not port:"},{"line_number":156,"context_line":"            LOG.warning(\"DHCP extension skipping delete DHCP related flow, \""},{"line_number":157,"context_line":"                        \"failed to get port %s ofport and MAC.\","}],"source_content_type":"text/x-python","patch_set":22,"id":"d96e9a5f_1d8e6982","line":154,"range":{"start_line":151,"start_character":8,"end_line":154,"end_character":69},"updated":"2021-05-26 08:10:21.000000000","message":"I think cache should be used for optimization purpose (to not scan full list of ports on br-int every time - there could be thousands of ports there): indeed, we can only change dhcp flow\u0027s ofport in self.handle_port() which will also update cache value, so flow\u0027s ofport and cache will always be in sync. Am I missing something?","commit_id":"b1e59a58667892011cb06c2790f4b8bfa662e329"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"2c0520279a7e53168bc8c6e7f28b6706b252a5aa","unresolved":true,"context_lines":[{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def delete_port(self, context, port_detail):"},{"line_number":150,"context_line":"        port \u003d port_detail.get(\u0027vif_port\u0027)"},{"line_number":151,"context_line":"        if not port:"},{"line_number":152,"context_line":"            port \u003d self.get_ofport(port_detail[\u0027port_id\u0027])"},{"line_number":153,"context_line":"        if not port or port.ofport \u003c\u003d 0:"},{"line_number":154,"context_line":"            port \u003d self.get_ofport_from_cache(port_detail[\u0027port_id\u0027])"},{"line_number":155,"context_line":"        if not port:"},{"line_number":156,"context_line":"            LOG.warning(\"DHCP extension skipping delete DHCP related flow, \""},{"line_number":157,"context_line":"                        \"failed to get port %s ofport and MAC.\","}],"source_content_type":"text/x-python","patch_set":22,"id":"145aef4f_7cf5dfc7","line":154,"range":{"start_line":151,"start_character":8,"end_line":154,"end_character":69},"in_reply_to":"a2b4c753_e059c389","updated":"2021-05-26 12:42:01.000000000","message":"\u003e Some earlier comments from here: https://review.opendev.org/c/openstack/neutron/+/776567/21/neutron/agent/l2/extensions/dhcp/extension.py#152.\n\u003e \"\"\"\n\u003e All this cache works are because in some extrem case during our local testing, the ofport may get deleted, then the flow can not be deleted due to no ofport found.\n\u003e \"\"\"\n\u003e \n\u003e Another extrem case is the cache ofport number may be inconsistent with ovsdb. And this simple cache has no consistency assurance. So \"get from ovsdb\" is a bit safer than \"get from cache\". Otherwise, cache ofport number may cause flow delete for wrong port. Thanks to the ovs ofport generative mechanism, the ofport number is in a linear growth. Unless the generator meets the maximum value of ofport number, such case will be in extremly low chance.\n\neven if cache value is inconsistent with ovsdb we still need to delete flow with cached ofport - this is exact ofport that the flow was created with (lines 134, 138) and that was then put into the cache (141). I suppose flow will not be updated when ofport of interface changes in ovsdb only, or am I wrong here?\n\nMore detailed example:\n 1) port id1 is created with ofport 1\n 2) dhcp flows are added for ofport 1\n 3) ofport 1 is added to the cache for port id1\n 4) race condition/whatever happens and leads to ofport change and hence to inconsistency of ovsdb ofport and cache ofport for port id1\n 5) so in ovsdb port id1 now has ofport 2\n 6) delete port handler will take ofport 2 from ovsdb and will delete no flows, while flow added for ofport 1 will stay\n 7) later port that gets ofport 1 may get conflicts with orphaned dhcp flow of port id1\n\nI might be completely wrong here but please help me understand where.","commit_id":"b1e59a58667892011cb06c2790f4b8bfa662e329"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"0810a93e3f685a843d25b236c3978e3e7abc2fe4","unresolved":true,"context_lines":[{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def delete_port(self, context, port_detail):"},{"line_number":150,"context_line":"        port \u003d port_detail.get(\u0027vif_port\u0027)"},{"line_number":151,"context_line":"        if not port:"},{"line_number":152,"context_line":"            port \u003d self.get_ofport(port_detail[\u0027port_id\u0027])"},{"line_number":153,"context_line":"        if not port or port.ofport \u003c\u003d 0:"},{"line_number":154,"context_line":"            port \u003d self.get_ofport_from_cache(port_detail[\u0027port_id\u0027])"},{"line_number":155,"context_line":"        if not port:"},{"line_number":156,"context_line":"            LOG.warning(\"DHCP extension skipping delete DHCP related flow, \""},{"line_number":157,"context_line":"                        \"failed to get port %s ofport and MAC.\","}],"source_content_type":"text/x-python","patch_set":22,"id":"a2b4c753_e059c389","line":154,"range":{"start_line":151,"start_character":8,"end_line":154,"end_character":69},"in_reply_to":"d96e9a5f_1d8e6982","updated":"2021-05-26 11:11:31.000000000","message":"Some earlier comments from here: https://review.opendev.org/c/openstack/neutron/+/776567/21/neutron/agent/l2/extensions/dhcp/extension.py#152.\n\"\"\"\nAll this cache works are because in some extrem case during our local testing, the ofport may get deleted, then the flow can not be deleted due to no ofport found.\n\"\"\"\n\nAnother extrem case is the cache ofport number may be inconsistent with ovsdb. And this simple cache has no consistency assurance. So \"get from ovsdb\" is a bit safer than \"get from cache\". Otherwise, cache ofport number may cause flow delete for wrong port. Thanks to the ovs ofport generative mechanism, the ofport number is in a linear growth. Unless the generator meets the maximum value of ofport number, such case will be in extremly low chance.","commit_id":"b1e59a58667892011cb06c2790f4b8bfa662e329"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"2c0520279a7e53168bc8c6e7f28b6706b252a5aa","unresolved":true,"context_lines":[{"line_number":135,"context_line":"            self.int_br.add_dhcp_ipv6_flow(port_detail[\u0027port_id\u0027],"},{"line_number":136,"context_line":"                                           port.ofport,"},{"line_number":137,"context_line":"                                           port.vif_mac)"},{"line_number":138,"context_line":"        self.set_ofport_cache(port_detail[\u0027port_id\u0027], port)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def get_ofport(self, port_id):"},{"line_number":141,"context_line":"        vifs \u003d self.int_br.get_vif_ports()"}],"source_content_type":"text/x-python","patch_set":24,"id":"19043324_16de262e","line":138,"range":{"start_line":138,"start_character":13,"end_line":138,"end_character":59},"updated":"2021-05-26 12:42:01.000000000","message":"method name implies putting \u0027ofport\u0027 to the cache, not port object. method parameter name is also \u0027ofport\u0027. Please either fix naming or what is actually put into the cache, but seems that entire port obj is not needed in the cache.","commit_id":"ae3a94d318cc2e0abb7b2052afbc677c62757438"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"fbd4d567ee237e81d23209ee97f1a6792d1b7588","unresolved":true,"context_lines":[{"line_number":135,"context_line":"            self.int_br.add_dhcp_ipv6_flow(port_detail[\u0027port_id\u0027],"},{"line_number":136,"context_line":"                                           port.ofport,"},{"line_number":137,"context_line":"                                           port.vif_mac)"},{"line_number":138,"context_line":"        self.set_ofport_cache(port_detail[\u0027port_id\u0027], port)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def get_ofport(self, port_id):"},{"line_number":141,"context_line":"        vifs \u003d self.int_br.get_vif_ports()"}],"source_content_type":"text/x-python","patch_set":24,"id":"9faad5c4_71e81251","line":138,"range":{"start_line":138,"start_character":13,"end_line":138,"end_character":59},"in_reply_to":"19043324_16de262e","updated":"2021-05-26 14:59:19.000000000","message":"No, vif_mac is also needed if ovsdb get None. See line 159.","commit_id":"ae3a94d318cc2e0abb7b2052afbc677c62757438"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"2c0520279a7e53168bc8c6e7f28b6706b252a5aa","unresolved":true,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def delete_port(self, context, port_detail):"},{"line_number":147,"context_line":"        port \u003d port_detail.get(\u0027vif_port\u0027)"},{"line_number":148,"context_line":"        if not port:"},{"line_number":149,"context_line":"            port \u003d self.get_ofport(port_detail[\u0027port_id\u0027])"},{"line_number":150,"context_line":"        if not port or port.ofport \u003c\u003d 0:"},{"line_number":151,"context_line":"            port \u003d self.get_ofport_from_cache(port_detail[\u0027port_id\u0027])"},{"line_number":152,"context_line":"        if not port:"},{"line_number":153,"context_line":"            LOG.warning(\"DHCP extension skipping delete DHCP related flow, \""},{"line_number":154,"context_line":"                        \"failed to get port %s ofport and MAC.\","}],"source_content_type":"text/x-python","patch_set":24,"id":"50029ac5_aa47abc8","line":151,"range":{"start_line":148,"start_character":8,"end_line":151,"end_character":69},"updated":"2021-05-26 12:42:01.000000000","message":"also please check my comment in previous PS on getting ofport from cache of from ovsdb.","commit_id":"ae3a94d318cc2e0abb7b2052afbc677c62757438"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"2c0520279a7e53168bc8c6e7f28b6706b252a5aa","unresolved":true,"context_lines":[{"line_number":148,"context_line":"        if not port:"},{"line_number":149,"context_line":"            port \u003d self.get_ofport(port_detail[\u0027port_id\u0027])"},{"line_number":150,"context_line":"        if not port or port.ofport \u003c\u003d 0:"},{"line_number":151,"context_line":"            port \u003d self.get_ofport_from_cache(port_detail[\u0027port_id\u0027])"},{"line_number":152,"context_line":"        if not port:"},{"line_number":153,"context_line":"            LOG.warning(\"DHCP extension skipping delete DHCP related flow, \""},{"line_number":154,"context_line":"                        \"failed to get port %s ofport and MAC.\","}],"source_content_type":"text/x-python","patch_set":24,"id":"9142e5fa_59bbeae8","line":151,"range":{"start_line":151,"start_character":24,"end_line":151,"end_character":45},"updated":"2021-05-26 12:42:01.000000000","message":"this name also implies getting \u0027ofport\u0027, not port object.","commit_id":"ae3a94d318cc2e0abb7b2052afbc677c62757438"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"981d9949ba44c439bb288904de37998b296a83c0","unresolved":true,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    VIF_PORT_CACHE \u003d {}"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def set_vif_port_cache(self, port_id, ofport):"},{"line_number":82,"context_line":"        self.VIF_PORT_CACHE[port_id] \u003d ofport"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def get_vip_port_from_cache(self, port_id):"},{"line_number":85,"context_line":"        return self.VIF_PORT_CACHE.pop(port_id, None)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def consume_api(self, agent_api):"},{"line_number":88,"context_line":"        \"\"\"Allows an extension to gain access to resources internal to the"}],"source_content_type":"text/x-python","patch_set":25,"id":"79337fd8_479c57d7","line":85,"range":{"start_line":81,"start_character":4,"end_line":85,"end_character":53},"updated":"2021-06-07 07:57:40.000000000","message":"nit: probably these one-liner methods are not needed","commit_id":"403c69542943c1b884dbc12dd86cccc3a6f610b2"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"981d9949ba44c439bb288904de37998b296a83c0","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":25,"id":"ec06b0cb_6de0d60f","line":160,"updated":"2021-06-07 07:57:40.000000000","message":"now can remove vif_port from cache, otherwise memory usage will grow constantly","commit_id":"403c69542943c1b884dbc12dd86cccc3a6f610b2"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"8ae0b6b89b6193711a36c06f764fc6975ca6d7b6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":25,"id":"9f2942be_d2f4673d","line":160,"in_reply_to":"011ab98e_13ce6796","updated":"2021-06-10 01:14:01.000000000","message":"Done","commit_id":"403c69542943c1b884dbc12dd86cccc3a6f610b2"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"edf4564e6d8d8f7575f8bf2e24c939743266cb1d","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":25,"id":"011ab98e_13ce6796","line":160,"in_reply_to":"7ae30a5c_4f68e26c","updated":"2021-06-07 08:35:15.000000000","message":"ah indeed, sorry. So this is a confusion: at #149 I read get_vip_port_from_cache as \u0027get\u0027, not \u0027pop\u0027. As I commented earlier these methods not needed.","commit_id":"403c69542943c1b884dbc12dd86cccc3a6f610b2"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"914546a42a49ff2d89ee78612d0a58f62b73d3da","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":25,"id":"7ae30a5c_4f68e26c","line":160,"in_reply_to":"ec06b0cb_6de0d60f","updated":"2021-06-07 08:08:02.000000000","message":"It is a \"pop\" method in line 85.","commit_id":"403c69542943c1b884dbc12dd86cccc3a6f610b2"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"d4261e2f9b7e9cc0b6f455ade74720fed0066bd1","unresolved":true,"context_lines":[{"line_number":140,"context_line":"    def delete_port(self, context, port_detail):"},{"line_number":141,"context_line":"        port \u003d port_detail.get(\u0027vif_port\u0027)"},{"line_number":142,"context_line":"        if not port or port.ofport \u003c\u003d 0:"},{"line_number":143,"context_line":"            port \u003d self.VIF_PORT_CACHE.pop(port_detail[\u0027port_id\u0027], None)"},{"line_number":144,"context_line":"        if not port:"},{"line_number":145,"context_line":"            port \u003d self.get_ofport(port_detail[\u0027port_id\u0027])"},{"line_number":146,"context_line":"        if not port:"}],"source_content_type":"text/x-python","patch_set":26,"id":"e936938c_27c52f13","line":143,"range":{"start_line":143,"start_character":12,"end_line":143,"end_character":72},"updated":"2021-06-10 07:16:17.000000000","message":"if port is found at #141 this pop() won\u0027t happen, and cache will grow, right?","commit_id":"d7b15a5eaee7403eabd6c3beb23c37899df8e03e"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"f37f2605566e845878bc26cc55c7e7f575fb3eff","unresolved":false,"context_lines":[{"line_number":140,"context_line":"    def delete_port(self, context, port_detail):"},{"line_number":141,"context_line":"        port \u003d port_detail.get(\u0027vif_port\u0027)"},{"line_number":142,"context_line":"        if not port or port.ofport \u003c\u003d 0:"},{"line_number":143,"context_line":"            port \u003d self.VIF_PORT_CACHE.pop(port_detail[\u0027port_id\u0027], None)"},{"line_number":144,"context_line":"        if not port:"},{"line_number":145,"context_line":"            port \u003d self.get_ofport(port_detail[\u0027port_id\u0027])"},{"line_number":146,"context_line":"        if not port:"}],"source_content_type":"text/x-python","patch_set":26,"id":"ffdd093b_25626e80","line":143,"range":{"start_line":143,"start_character":12,"end_line":143,"end_character":72},"in_reply_to":"e936938c_27c52f13","updated":"2021-06-10 08:03:27.000000000","message":"Done","commit_id":"d7b15a5eaee7403eabd6c3beb23c37899df8e03e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e4d0418b218a38babba06ad259c9685ad561ff65","unresolved":true,"context_lines":[{"line_number":40,"context_line":"                constants.DEVICE_OWNER_COMPUTE_PREFIX):"},{"line_number":41,"context_line":"            return"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        mac_addr \u003d str(netaddr.EUI(str(port_obj.mac_address),"},{"line_number":44,"context_line":"                                   dialect\u003dnetaddr.mac_unix_expanded))"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        entry \u003d {"}],"source_content_type":"text/x-python","patch_set":27,"id":"4ea120d0_7a8c41ef","line":43,"updated":"2021-06-18 12:02:09.000000000","message":"note: with [1] that won\u0027t be necessary \n\n[1]https://review.opendev.org/c/openstack/neutron/+/789831","commit_id":"3a0185a4a8bb13a086f4cc9003de2577024494cc"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"7980871d17c6cbba777fe3c80d78575ac68d579c","unresolved":true,"context_lines":[{"line_number":40,"context_line":"                constants.DEVICE_OWNER_COMPUTE_PREFIX):"},{"line_number":41,"context_line":"            return"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        mac_addr \u003d str(netaddr.EUI(str(port_obj.mac_address),"},{"line_number":44,"context_line":"                                   dialect\u003dnetaddr.mac_unix_expanded))"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        entry \u003d {"}],"source_content_type":"text/x-python","patch_set":27,"id":"c03a9807_be45f7c0","line":43,"in_reply_to":"4ea120d0_7a8c41ef","updated":"2021-06-18 14:41:22.000000000","message":"Got it, will refactor if once it get merged.","commit_id":"3a0185a4a8bb13a086f4cc9003de2577024494cc"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"e7bf8a47307fd18760b2f7494c3e9930ff9150a8","unresolved":true,"context_lines":[{"line_number":63,"context_line":"                    \u0027host_routes\u0027: subnet.host_routes,"},{"line_number":64,"context_line":"                    \u0027dns_nameservers\u0027: subnet.dns_nameservers,"},{"line_number":65,"context_line":"                    \u0027gateway_ip\u0027: subnet.gateway_ip}"},{"line_number":66,"context_line":"            fixed_ips.append(info)"},{"line_number":67,"context_line":"        net \u003d self.cache_api.get_resource_by_id("},{"line_number":68,"context_line":"            resources.NETWORK, port_obj.network_id)"},{"line_number":69,"context_line":"        extra_info \u003d {\u0027fixed_ips\u0027: fixed_ips,"}],"source_content_type":"text/x-python","patch_set":27,"id":"c0275f07_475e967e","line":66,"updated":"2021-06-17 07:20:22.000000000","message":"shouldn\u0027t You append here only things related to subnet which has enabled dhcp?","commit_id":"3a0185a4a8bb13a086f4cc9003de2577024494cc"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"b5c33e741edb3e82bcd9da0fc25cfddce961ff22","unresolved":true,"context_lines":[{"line_number":63,"context_line":"                    \u0027host_routes\u0027: subnet.host_routes,"},{"line_number":64,"context_line":"                    \u0027dns_nameservers\u0027: subnet.dns_nameservers,"},{"line_number":65,"context_line":"                    \u0027gateway_ip\u0027: subnet.gateway_ip}"},{"line_number":66,"context_line":"            fixed_ips.append(info)"},{"line_number":67,"context_line":"        net \u003d self.cache_api.get_resource_by_id("},{"line_number":68,"context_line":"            resources.NETWORK, port_obj.network_id)"},{"line_number":69,"context_line":"        extra_info \u003d {\u0027fixed_ips\u0027: fixed_ips,"}],"source_content_type":"text/x-python","patch_set":27,"id":"e2203f62_97a6eac4","line":66,"in_reply_to":"a8465c5c_a881f28b","updated":"2021-06-23 09:46:53.000000000","message":"+1\nKeep the way API works, it is expensive to change heat templates or other tools that depend on things that depend on API","commit_id":"3a0185a4a8bb13a086f4cc9003de2577024494cc"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"7980871d17c6cbba777fe3c80d78575ac68d579c","unresolved":true,"context_lines":[{"line_number":63,"context_line":"                    \u0027host_routes\u0027: subnet.host_routes,"},{"line_number":64,"context_line":"                    \u0027dns_nameservers\u0027: subnet.dns_nameservers,"},{"line_number":65,"context_line":"                    \u0027gateway_ip\u0027: subnet.gateway_ip}"},{"line_number":66,"context_line":"            fixed_ips.append(info)"},{"line_number":67,"context_line":"        net \u003d self.cache_api.get_resource_by_id("},{"line_number":68,"context_line":"            resources.NETWORK, port_obj.network_id)"},{"line_number":69,"context_line":"        extra_info \u003d {\u0027fixed_ips\u0027: fixed_ips,"}],"source_content_type":"text/x-python","patch_set":27,"id":"d09221c3_6b523605","line":66,"in_reply_to":"c0275f07_475e967e","updated":"2021-06-18 14:41:22.000000000","message":"I\u0027m not sure if enable_dhcp still useful for this extension. For traditional DHCP agent, the DHCP instance will consume the host resource because there are namespaces and dnsmasq processes. So, someone may want to disable it to save some host resources. But, there is a main point because neutron port has the IP+mac pair, enable it or not will have no influence for the DHCP request. If port\u0027s IP does not change, enable_dhcp from False to True and from True to False, it will has no data changes for response response.\nSo here, to make things simple, we just enable the flow forever. Othewise, we need to handle the subnet update event, make a cache to store the processing state, take care about the race conditon between port delete/updating/creating and subnet update. Personally, we only have 2 flows (v4\u0026v6) or a port. It should be lightweight.\nFrom the users\u0027 view，if they enable this DHCP extension, I guess they may not want to disable a subnet\u0027s DHCP.\nFrom the point of the real running cloud, I have not seen users try to diable the enable_dhcp.\n\nSo, my thought is to leave it as it is for now. What do you think?","commit_id":"3a0185a4a8bb13a086f4cc9003de2577024494cc"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"b42cafc76fe3f3cb7a0ed4f0e76eca2362b3f5fe","unresolved":true,"context_lines":[{"line_number":63,"context_line":"                    \u0027host_routes\u0027: subnet.host_routes,"},{"line_number":64,"context_line":"                    \u0027dns_nameservers\u0027: subnet.dns_nameservers,"},{"line_number":65,"context_line":"                    \u0027gateway_ip\u0027: subnet.gateway_ip}"},{"line_number":66,"context_line":"            fixed_ips.append(info)"},{"line_number":67,"context_line":"        net \u003d self.cache_api.get_resource_by_id("},{"line_number":68,"context_line":"            resources.NETWORK, port_obj.network_id)"},{"line_number":69,"context_line":"        extra_info \u003d {\u0027fixed_ips\u0027: fixed_ips,"}],"source_content_type":"text/x-python","patch_set":27,"id":"a8465c5c_a881f28b","line":66,"in_reply_to":"d09221c3_6b523605","updated":"2021-06-23 08:44:31.000000000","message":"Extension can be enabled/disabled by cloud admin and such admin can\u0027t be sure that some user will not want to use subnets with disabled dhcp - because maybe they have external dhcp server for example.\nI think that we should respect API behaviour which we have using current implementation and we shouldn\u0027t skip checking of the attributes which may be configured by users. We can\u0027t be sure how all of users will use Neutron and parameters which we provides so we can\u0027t assume that nobody will want to do that.","commit_id":"3a0185a4a8bb13a086f4cc9003de2577024494cc"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"74cf647f09185d4cc68cafb2485c2f1289cd44eb","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                    \u0027host_routes\u0027: subnet.host_routes,"},{"line_number":64,"context_line":"                    \u0027dns_nameservers\u0027: subnet.dns_nameservers,"},{"line_number":65,"context_line":"                    \u0027gateway_ip\u0027: subnet.gateway_ip}"},{"line_number":66,"context_line":"            fixed_ips.append(info)"},{"line_number":67,"context_line":"        net \u003d self.cache_api.get_resource_by_id("},{"line_number":68,"context_line":"            resources.NETWORK, port_obj.network_id)"},{"line_number":69,"context_line":"        extra_info \u003d {\u0027fixed_ips\u0027: fixed_ips,"}],"source_content_type":"text/x-python","patch_set":27,"id":"e9e10160_9055b00f","line":66,"in_reply_to":"e2203f62_97a6eac4","updated":"2021-06-24 00:43:01.000000000","message":"Done","commit_id":"3a0185a4a8bb13a086f4cc9003de2577024494cc"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e4d0418b218a38babba06ad259c9685ad561ff65","unresolved":true,"context_lines":[{"line_number":105,"context_line":"            self.agent_api,"},{"line_number":106,"context_line":"            self.ext_api)"},{"line_number":107,"context_line":"        app.start()"},{"line_number":108,"context_line":"        app.register_packet_in_handler("},{"line_number":109,"context_line":"            app._packet_in_handler)"},{"line_number":110,"context_line":"        if version \u003d\u003d constants.IP_VERSION_4:"},{"line_number":111,"context_line":"            self.dhcp4_app \u003d app"},{"line_number":112,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":27,"id":"93d664dc_fdfa61a4","line":109,"range":{"start_line":108,"start_character":8,"end_line":109,"end_character":35},"updated":"2021-06-18 12:02:09.000000000","message":"That is already registered in DHCPResponderBase.__init__","commit_id":"3a0185a4a8bb13a086f4cc9003de2577024494cc"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"7980871d17c6cbba777fe3c80d78575ac68d579c","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            self.agent_api,"},{"line_number":106,"context_line":"            self.ext_api)"},{"line_number":107,"context_line":"        app.start()"},{"line_number":108,"context_line":"        app.register_packet_in_handler("},{"line_number":109,"context_line":"            app._packet_in_handler)"},{"line_number":110,"context_line":"        if version \u003d\u003d constants.IP_VERSION_4:"},{"line_number":111,"context_line":"            self.dhcp4_app \u003d app"},{"line_number":112,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":27,"id":"81725b10_1d30929f","line":109,"range":{"start_line":108,"start_character":8,"end_line":109,"end_character":35},"in_reply_to":"93d664dc_fdfa61a4","updated":"2021-06-18 14:41:22.000000000","message":"Done","commit_id":"3a0185a4a8bb13a086f4cc9003de2577024494cc"}],"neutron/conf/plugins/ml2/drivers/ovs_conf.py":[{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"d9f953bab2b2beda28f27311605bfcfc062ac277","unresolved":true,"context_lines":[{"line_number":175,"context_line":"]"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"dhcp_opts \u003d ["},{"line_number":178,"context_line":"    cfg.BoolOpt(\u0027enable_ipv6\u0027, default\u003dFalse,"},{"line_number":179,"context_line":"                help\u003d_(\"This is for the DHCPv6, if True, the ovs agent DHCP \""},{"line_number":180,"context_line":"                       \"extension will add related flows for \""},{"line_number":181,"context_line":"                       \"DHCPv6 packets.\")),"},{"line_number":182,"context_line":"    cfg.IntOpt(\u0027renewal_time\u0027, default\u003d0,"},{"line_number":183,"context_line":"               help\u003d_(\"DHCP renewal time T1 (in seconds). If set to 0, it \""},{"line_number":184,"context_line":"                      \"will default to half of the lease time.\")),"}],"source_content_type":"text/x-python","patch_set":22,"id":"0a27cfcb_1d2be9cf","line":181,"range":{"start_line":178,"start_character":4,"end_line":181,"end_character":43},"updated":"2021-05-25 08:12:32.000000000","message":"I still keep my opinion that with this the API will behave differently in case of dnsmasq based and ovs based DHCP: the admin/deployer must set this cfg option to \"True\" to enable.\nSo if you insist to have it, please highlight it in the relevant documentation (I check it as well where shouldit be best)","commit_id":"b1e59a58667892011cb06c2790f4b8bfa662e329"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"a47f88229f4ec98b1770e7ca359330071dd0baf4","unresolved":true,"context_lines":[{"line_number":175,"context_line":"]"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"dhcp_opts \u003d ["},{"line_number":178,"context_line":"    cfg.BoolOpt(\u0027enable_ipv6\u0027, default\u003dFalse,"},{"line_number":179,"context_line":"                help\u003d_(\"This is for the DHCPv6, if True, the ovs agent DHCP \""},{"line_number":180,"context_line":"                       \"extension will add related flows for \""},{"line_number":181,"context_line":"                       \"DHCPv6 packets.\")),"},{"line_number":182,"context_line":"    cfg.IntOpt(\u0027renewal_time\u0027, default\u003d0,"},{"line_number":183,"context_line":"               help\u003d_(\"DHCP renewal time T1 (in seconds). If set to 0, it \""},{"line_number":184,"context_line":"                      \"will default to half of the lease time.\")),"}],"source_content_type":"text/x-python","patch_set":22,"id":"c91f5baf_a0358922","line":181,"range":{"start_line":178,"start_character":4,"end_line":181,"end_character":43},"in_reply_to":"0a27cfcb_1d2be9cf","updated":"2021-05-26 01:04:17.000000000","message":"Done, will add a release note for this option.","commit_id":"b1e59a58667892011cb06c2790f4b8bfa662e329"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"079be9670f6917fcc5ae3ece71c37679503a299f","unresolved":true,"context_lines":[{"line_number":175,"context_line":"]"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"dhcp_opts \u003d ["},{"line_number":178,"context_line":"    cfg.BoolOpt(\u0027enable_ipv6\u0027, default\u003dFalse,"},{"line_number":179,"context_line":"                help\u003d_(\"This is for the DHCPv6, if True, the ovs agent DHCP \""},{"line_number":180,"context_line":"                       \"extension will add related flows for \""},{"line_number":181,"context_line":"                       \"DHCPv6 packets.\")),"},{"line_number":182,"context_line":"    cfg.IntOpt(\u0027renewal_time\u0027, default\u003d0,"},{"line_number":183,"context_line":"               help\u003d_(\"DHCP renewal time T1 (in seconds). If set to 0, it \""},{"line_number":184,"context_line":"                      \"will default to half of the lease time.\")),"}],"source_content_type":"text/x-python","patch_set":22,"id":"5bd8ea2c_ce7dd31a","line":181,"range":{"start_line":178,"start_character":4,"end_line":181,"end_character":43},"in_reply_to":"0a27cfcb_1d2be9cf","updated":"2021-05-25 14:35:45.000000000","message":"I would agree that we need to document this well or admins could get confused.  And there is discussion right now in the upstream meeting talking about the need for this option, so there might be further comments here.\n\nIf we decide to keep it, I think the help message should change to be like the others above:\n\n\"When set to True, the OVS agent DHCP \"\n\"extension will add related flows for \"\n\"DHCPv6 packets.\"","commit_id":"b1e59a58667892011cb06c2790f4b8bfa662e329"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"83caa08fd3d9bff8b08faf96fb42f00471d0d9e9","unresolved":false,"context_lines":[{"line_number":175,"context_line":"]"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"dhcp_opts \u003d ["},{"line_number":178,"context_line":"    cfg.BoolOpt(\u0027enable_ipv6\u0027, default\u003dFalse,"},{"line_number":179,"context_line":"                help\u003d_(\"This is for the DHCPv6, if True, the ovs agent DHCP \""},{"line_number":180,"context_line":"                       \"extension will add related flows for \""},{"line_number":181,"context_line":"                       \"DHCPv6 packets.\")),"},{"line_number":182,"context_line":"    cfg.IntOpt(\u0027renewal_time\u0027, default\u003d0,"},{"line_number":183,"context_line":"               help\u003d_(\"DHCP renewal time T1 (in seconds). If set to 0, it \""},{"line_number":184,"context_line":"                      \"will default to half of the lease time.\")),"}],"source_content_type":"text/x-python","patch_set":22,"id":"706ad9a1_3fb78361","line":181,"range":{"start_line":178,"start_character":4,"end_line":181,"end_character":43},"in_reply_to":"735d9b66_da7c2720","updated":"2021-05-26 11:15:58.000000000","message":"Done","commit_id":"b1e59a58667892011cb06c2790f4b8bfa662e329"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"4dce861aff5adf82a39994d440b40a09907fbff5","unresolved":true,"context_lines":[{"line_number":175,"context_line":"]"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"dhcp_opts \u003d ["},{"line_number":178,"context_line":"    cfg.BoolOpt(\u0027enable_ipv6\u0027, default\u003dFalse,"},{"line_number":179,"context_line":"                help\u003d_(\"This is for the DHCPv6, if True, the ovs agent DHCP \""},{"line_number":180,"context_line":"                       \"extension will add related flows for \""},{"line_number":181,"context_line":"                       \"DHCPv6 packets.\")),"},{"line_number":182,"context_line":"    cfg.IntOpt(\u0027renewal_time\u0027, default\u003d0,"},{"line_number":183,"context_line":"               help\u003d_(\"DHCP renewal time T1 (in seconds). If set to 0, it \""},{"line_number":184,"context_line":"                      \"will default to half of the lease time.\")),"}],"source_content_type":"text/x-python","patch_set":22,"id":"ddd750c2_e479164e","line":181,"range":{"start_line":178,"start_character":4,"end_line":181,"end_character":43},"in_reply_to":"c91f5baf_a0358922","updated":"2021-05-26 08:10:21.000000000","message":"Also consider making it True by default, to be consistent with current dhcp agent solution","commit_id":"b1e59a58667892011cb06c2790f4b8bfa662e329"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"fd0c32195f106e08d7de492688c12b911e5ec44d","unresolved":true,"context_lines":[{"line_number":175,"context_line":"]"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"dhcp_opts \u003d ["},{"line_number":178,"context_line":"    cfg.BoolOpt(\u0027enable_ipv6\u0027, default\u003dFalse,"},{"line_number":179,"context_line":"                help\u003d_(\"This is for the DHCPv6, if True, the ovs agent DHCP \""},{"line_number":180,"context_line":"                       \"extension will add related flows for \""},{"line_number":181,"context_line":"                       \"DHCPv6 packets.\")),"},{"line_number":182,"context_line":"    cfg.IntOpt(\u0027renewal_time\u0027, default\u003d0,"},{"line_number":183,"context_line":"               help\u003d_(\"DHCP renewal time T1 (in seconds). If set to 0, it \""},{"line_number":184,"context_line":"                      \"will default to half of the lease time.\")),"}],"source_content_type":"text/x-python","patch_set":22,"id":"735d9b66_da7c2720","line":181,"range":{"start_line":178,"start_character":4,"end_line":181,"end_character":43},"in_reply_to":"ddd750c2_e479164e","updated":"2021-05-26 08:19:32.000000000","message":"Please see the discussion on Tuesday\u0027s team meeting: http://eavesdrop.openstack.org/irclogs/%23openstack-meeting-3/%23openstack-meeting-3.2021-05-25.log.html#t2021-05-25T14:27:34","commit_id":"b1e59a58667892011cb06c2790f4b8bfa662e329"}],"neutron/plugins/ml2/drivers/openvswitch/agent/openflow/native/br_int.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"a87e841abc553d2363d4cd1b048eaaecaec501fe","unresolved":true,"context_lines":[{"line_number":79,"context_line":"                          ipv6_dst\u003d\"ff02::1:2\","},{"line_number":80,"context_line":"                          udp_src\u003d546,"},{"line_number":81,"context_line":"                          udp_dst\u003d547)"},{"line_number":82,"context_line":"        self.install_drop(table_id\u003dconstants.DHCP_IPV6_TABLE)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def add_dhcp_ipv4_flow(self, port_id, ofport, port_mac):"},{"line_number":85,"context_line":"        (_dp, ofp, ofpp) \u003d self._get_dp()"}],"source_content_type":"text/x-python","patch_set":6,"id":"575bae3f_b2490837","line":82,"updated":"2021-03-05 09:07:57.000000000","message":"there is config option to enable/disable dhcpv6, shouldn\u0027t it be used here?","commit_id":"e097303a8babb766ef3d3382e58a1357815ad1e0"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"821e41cf8f472261c053886c75f45c706c5c7676","unresolved":true,"context_lines":[{"line_number":56,"context_line":"        self.install_normal(table_id\u003dconstants.TRANSIENT_EGRESS_TABLE,"},{"line_number":57,"context_line":"                            priority\u003d3)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def init_dhcp(self, enable_openflow_dhcp\u003dFalse):"},{"line_number":60,"context_line":"        if not enable_openflow_dhcp:"},{"line_number":61,"context_line":"            return"},{"line_number":62,"context_line":"        # DHCP IPv4"}],"source_content_type":"text/x-python","patch_set":21,"id":"bb64e727_acdb4188","line":59,"range":{"start_line":59,"start_character":24,"end_line":59,"end_character":50},"updated":"2021-05-24 09:14:39.000000000","message":"no need for parameter here, why not just check before calling init_dhcp()?","commit_id":"4c5ebe7ad8d3749c154c79577d87c050c4cc25b7"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"59300cbed303e43a663c4142df9b10174b2c0451","unresolved":true,"context_lines":[{"line_number":56,"context_line":"        self.install_normal(table_id\u003dconstants.TRANSIENT_EGRESS_TABLE,"},{"line_number":57,"context_line":"                            priority\u003d3)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def init_dhcp(self, enable_openflow_dhcp\u003dFalse):"},{"line_number":60,"context_line":"        if not enable_openflow_dhcp:"},{"line_number":61,"context_line":"            return"},{"line_number":62,"context_line":"        # DHCP IPv4"}],"source_content_type":"text/x-python","patch_set":21,"id":"3008435c_9d3b016f","line":59,"range":{"start_line":59,"start_character":24,"end_line":59,"end_character":50},"in_reply_to":"8eb30405_fb7e6ee5","updated":"2021-05-24 12:00:23.000000000","message":"Well, not sure it\u0027s a good reason for useless parameters","commit_id":"4c5ebe7ad8d3749c154c79577d87c050c4cc25b7"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"599f438e6f277979d730bd78b4a09a12c3a1877c","unresolved":true,"context_lines":[{"line_number":56,"context_line":"        self.install_normal(table_id\u003dconstants.TRANSIENT_EGRESS_TABLE,"},{"line_number":57,"context_line":"                            priority\u003d3)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def init_dhcp(self, enable_openflow_dhcp\u003dFalse):"},{"line_number":60,"context_line":"        if not enable_openflow_dhcp:"},{"line_number":61,"context_line":"            return"},{"line_number":62,"context_line":"        # DHCP IPv4"}],"source_content_type":"text/x-python","patch_set":21,"id":"8eb30405_fb7e6ee5","line":59,"range":{"start_line":59,"start_character":24,"end_line":59,"end_character":50},"in_reply_to":"bb64e727_acdb4188","updated":"2021-05-24 11:34:11.000000000","message":"Functions in \u0027setup_default_table\u0027 are all in oneline style.","commit_id":"4c5ebe7ad8d3749c154c79577d87c050c4cc25b7"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"821e41cf8f472261c053886c75f45c706c5c7676","unresolved":true,"context_lines":[{"line_number":70,"context_line":"                          udp_dst\u003d67)"},{"line_number":71,"context_line":"        self.install_drop(table_id\u003dconstants.DHCP_IPV4_TABLE)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        # DHCP IPv6"},{"line_number":74,"context_line":"        self.install_goto(dest_table_id\u003dconstants.DHCP_IPV6_TABLE,"},{"line_number":75,"context_line":"                          table_id\u003dconstants.TRANSIENT_TABLE,"},{"line_number":76,"context_line":"                          priority\u003d101,"}],"source_content_type":"text/x-python","patch_set":21,"id":"ea6b3fee_5b1a2664","line":73,"range":{"start_line":73,"start_character":8,"end_line":73,"end_character":19},"updated":"2021-05-24 09:14:39.000000000","message":"seems need to check enable_ipv6 config here first","commit_id":"4c5ebe7ad8d3749c154c79577d87c050c4cc25b7"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"729c2e983392c5bb9fcbf6fef6e8ae5aec734d16","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                          udp_dst\u003d67)"},{"line_number":71,"context_line":"        self.install_drop(table_id\u003dconstants.DHCP_IPV4_TABLE)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        # DHCP IPv6"},{"line_number":74,"context_line":"        self.install_goto(dest_table_id\u003dconstants.DHCP_IPV6_TABLE,"},{"line_number":75,"context_line":"                          table_id\u003dconstants.TRANSIENT_TABLE,"},{"line_number":76,"context_line":"                          priority\u003d101,"}],"source_content_type":"text/x-python","patch_set":21,"id":"38e01140_2c372291","line":73,"range":{"start_line":73,"start_character":8,"end_line":73,"end_character":19},"in_reply_to":"ea6b3fee_5b1a2664","updated":"2021-05-25 03:28:11.000000000","message":"Done","commit_id":"4c5ebe7ad8d3749c154c79577d87c050c4cc25b7"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e4d0418b218a38babba06ad259c9685ad561ff65","unresolved":true,"context_lines":[{"line_number":67,"context_line":"                          priority\u003d101,"},{"line_number":68,"context_line":"                          eth_type\u003dether_types.ETH_TYPE_IP,"},{"line_number":69,"context_line":"                          ip_proto\u003din_proto.IPPROTO_UDP,"},{"line_number":70,"context_line":"                          ipv4_dst\u003d\"255.255.255.255\","},{"line_number":71,"context_line":"                          udp_src\u003d68,"},{"line_number":72,"context_line":"                          udp_dst\u003d67)"},{"line_number":73,"context_line":"        self.install_drop(table_id\u003dconstants.DHCP_IPV4_TABLE)"}],"source_content_type":"text/x-python","patch_set":27,"id":"79d43fb2_9dd87d4f","line":70,"range":{"start_line":70,"start_character":36,"end_line":70,"end_character":52},"updated":"2021-06-18 12:02:09.000000000","message":"\"255.255.255.255\" and \"ff02::1:2\" should be defined constants (with a TODO to move them to n-lib).","commit_id":"3a0185a4a8bb13a086f4cc9003de2577024494cc"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"7980871d17c6cbba777fe3c80d78575ac68d579c","unresolved":true,"context_lines":[{"line_number":67,"context_line":"                          priority\u003d101,"},{"line_number":68,"context_line":"                          eth_type\u003dether_types.ETH_TYPE_IP,"},{"line_number":69,"context_line":"                          ip_proto\u003din_proto.IPPROTO_UDP,"},{"line_number":70,"context_line":"                          ipv4_dst\u003d\"255.255.255.255\","},{"line_number":71,"context_line":"                          udp_src\u003d68,"},{"line_number":72,"context_line":"                          udp_dst\u003d67)"},{"line_number":73,"context_line":"        self.install_drop(table_id\u003dconstants.DHCP_IPV4_TABLE)"}],"source_content_type":"text/x-python","patch_set":27,"id":"3c8353f3_45d3988a","line":70,"range":{"start_line":70,"start_character":36,"end_line":70,"end_character":52},"in_reply_to":"79d43fb2_9dd87d4f","updated":"2021-06-18 14:41:22.000000000","message":"Sure, will refactor this line.","commit_id":"3a0185a4a8bb13a086f4cc9003de2577024494cc"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e4d0418b218a38babba06ad259c9685ad561ff65","unresolved":true,"context_lines":[{"line_number":68,"context_line":"                          eth_type\u003dether_types.ETH_TYPE_IP,"},{"line_number":69,"context_line":"                          ip_proto\u003din_proto.IPPROTO_UDP,"},{"line_number":70,"context_line":"                          ipv4_dst\u003d\"255.255.255.255\","},{"line_number":71,"context_line":"                          udp_src\u003d68,"},{"line_number":72,"context_line":"                          udp_dst\u003d67)"},{"line_number":73,"context_line":"        self.install_drop(table_id\u003dconstants.DHCP_IPV4_TABLE)"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"1bd25d12_997682a4","line":71,"range":{"start_line":71,"start_character":34,"end_line":71,"end_character":36},"updated":"2021-06-18 12:02:09.000000000","message":"neutron_lib.constants.DHCP_CLIENT_PORT","commit_id":"3a0185a4a8bb13a086f4cc9003de2577024494cc"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"7980871d17c6cbba777fe3c80d78575ac68d579c","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                          eth_type\u003dether_types.ETH_TYPE_IP,"},{"line_number":69,"context_line":"                          ip_proto\u003din_proto.IPPROTO_UDP,"},{"line_number":70,"context_line":"                          ipv4_dst\u003d\"255.255.255.255\","},{"line_number":71,"context_line":"                          udp_src\u003d68,"},{"line_number":72,"context_line":"                          udp_dst\u003d67)"},{"line_number":73,"context_line":"        self.install_drop(table_id\u003dconstants.DHCP_IPV4_TABLE)"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"761bf290_4a1c2247","line":71,"range":{"start_line":71,"start_character":34,"end_line":71,"end_character":36},"in_reply_to":"1bd25d12_997682a4","updated":"2021-06-18 14:41:22.000000000","message":"Done","commit_id":"3a0185a4a8bb13a086f4cc9003de2577024494cc"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e4d0418b218a38babba06ad259c9685ad561ff65","unresolved":true,"context_lines":[{"line_number":69,"context_line":"                          ip_proto\u003din_proto.IPPROTO_UDP,"},{"line_number":70,"context_line":"                          ipv4_dst\u003d\"255.255.255.255\","},{"line_number":71,"context_line":"                          udp_src\u003d68,"},{"line_number":72,"context_line":"                          udp_dst\u003d67)"},{"line_number":73,"context_line":"        self.install_drop(table_id\u003dconstants.DHCP_IPV4_TABLE)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        if not enable_dhcpv6:"}],"source_content_type":"text/x-python","patch_set":27,"id":"6ee96d84_44e0b353","line":72,"range":{"start_line":72,"start_character":34,"end_line":72,"end_character":36},"updated":"2021-06-18 12:02:09.000000000","message":"DHCP_RESPONSE_PORT","commit_id":"3a0185a4a8bb13a086f4cc9003de2577024494cc"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"7980871d17c6cbba777fe3c80d78575ac68d579c","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                          ip_proto\u003din_proto.IPPROTO_UDP,"},{"line_number":70,"context_line":"                          ipv4_dst\u003d\"255.255.255.255\","},{"line_number":71,"context_line":"                          udp_src\u003d68,"},{"line_number":72,"context_line":"                          udp_dst\u003d67)"},{"line_number":73,"context_line":"        self.install_drop(table_id\u003dconstants.DHCP_IPV4_TABLE)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        if not enable_dhcpv6:"}],"source_content_type":"text/x-python","patch_set":27,"id":"6778ddf0_0b1d4949","line":72,"range":{"start_line":72,"start_character":34,"end_line":72,"end_character":36},"in_reply_to":"6ee96d84_44e0b353","updated":"2021-06-18 14:41:22.000000000","message":"Done","commit_id":"3a0185a4a8bb13a086f4cc9003de2577024494cc"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e4d0418b218a38babba06ad259c9685ad561ff65","unresolved":true,"context_lines":[{"line_number":81,"context_line":"                          eth_type\u003dether_types.ETH_TYPE_IPV6,"},{"line_number":82,"context_line":"                          ip_proto\u003din_proto.IPPROTO_UDP,"},{"line_number":83,"context_line":"                          ipv6_dst\u003d\"ff02::1:2\","},{"line_number":84,"context_line":"                          udp_src\u003d546,"},{"line_number":85,"context_line":"                          udp_dst\u003d547)"},{"line_number":86,"context_line":"        self.install_drop(table_id\u003dconstants.DHCP_IPV6_TABLE)"},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"66adb084_c2b2389d","line":84,"range":{"start_line":84,"start_character":34,"end_line":84,"end_character":37},"updated":"2021-06-18 12:02:09.000000000","message":"DHCPV6_CLIENT_PORT \u003d 546\nDHCPV6_RESPONSE_PORT \u003d 547","commit_id":"3a0185a4a8bb13a086f4cc9003de2577024494cc"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"7980871d17c6cbba777fe3c80d78575ac68d579c","unresolved":false,"context_lines":[{"line_number":81,"context_line":"                          eth_type\u003dether_types.ETH_TYPE_IPV6,"},{"line_number":82,"context_line":"                          ip_proto\u003din_proto.IPPROTO_UDP,"},{"line_number":83,"context_line":"                          ipv6_dst\u003d\"ff02::1:2\","},{"line_number":84,"context_line":"                          udp_src\u003d546,"},{"line_number":85,"context_line":"                          udp_dst\u003d547)"},{"line_number":86,"context_line":"        self.install_drop(table_id\u003dconstants.DHCP_IPV6_TABLE)"},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"155c7d64_52ee71b5","line":84,"range":{"start_line":84,"start_character":34,"end_line":84,"end_character":37},"in_reply_to":"66adb084_c2b2389d","updated":"2021-06-18 14:41:22.000000000","message":"Done","commit_id":"3a0185a4a8bb13a086f4cc9003de2577024494cc"}],"neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e4d0418b218a38babba06ad259c9685ad561ff65","unresolved":true,"context_lines":[{"line_number":278,"context_line":"        self.ancillary_brs \u003d self.setup_ancillary_bridges("},{"line_number":279,"context_line":"            ovs_conf.integration_bridge, ovs_conf.tunnel_bridge)"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"        agent_api \u003d ovs_ext_api.OVSAgentExtensionAPI(self.int_br,"},{"line_number":282,"context_line":"                                                     self.tun_br,"},{"line_number":283,"context_line":"                                                     self.phys_brs)"},{"line_number":284,"context_line":"        self.ext_manager.initialize("},{"line_number":285,"context_line":"            self.connection, constants.EXTENSION_DRIVER_TYPE, agent_api)"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"        # In order to keep existed device\u0027s local vlan unchanged,"},{"line_number":288,"context_line":"        # restore local vlan mapping at start"}],"source_content_type":"text/x-python","patch_set":27,"id":"eb1dbd61_5be61e90","side":"PARENT","line":285,"range":{"start_line":281,"start_character":1,"end_line":285,"end_character":72},"updated":"2021-06-18 12:02:09.000000000","message":"That was explicitly moved there [1] with the following reason [2].\n\n[1]https://review.opendev.org/c/openstack/neutron/+/406841\n[2]https://review.opendev.org/c/openstack/neutron/+/406841/22/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py","commit_id":"a292bea168941acfce5c2b058c2f178e8ff5c1ae"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"7980871d17c6cbba777fe3c80d78575ac68d579c","unresolved":true,"context_lines":[{"line_number":278,"context_line":"        self.ancillary_brs \u003d self.setup_ancillary_bridges("},{"line_number":279,"context_line":"            ovs_conf.integration_bridge, ovs_conf.tunnel_bridge)"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"        agent_api \u003d ovs_ext_api.OVSAgentExtensionAPI(self.int_br,"},{"line_number":282,"context_line":"                                                     self.tun_br,"},{"line_number":283,"context_line":"                                                     self.phys_brs)"},{"line_number":284,"context_line":"        self.ext_manager.initialize("},{"line_number":285,"context_line":"            self.connection, constants.EXTENSION_DRIVER_TYPE, agent_api)"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"        # In order to keep existed device\u0027s local vlan unchanged,"},{"line_number":288,"context_line":"        # restore local vlan mapping at start"}],"source_content_type":"text/x-python","patch_set":27,"id":"3e962874_e90934f6","side":"PARENT","line":285,"range":{"start_line":281,"start_character":1,"end_line":285,"end_character":72},"in_reply_to":"eb1dbd61_5be61e90","updated":"2021-06-18 14:41:22.000000000","message":"Sure, this extension was first implement in our local cloud. This move was mostly because some params of OVSAgentExtensionAPI constructor method are not initialized. But for now, it should be fine to initialize the ext_manager here. Thank you for pointing this.","commit_id":"a292bea168941acfce5c2b058c2f178e8ff5c1ae"}]}
