)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"460c02fb6c99822444f95c3a52d952c5456567fd","unresolved":true,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"_confirm_router_interface_not_in_use uses subnet cidr"},{"line_number":10,"context_line":"and does not account for other subnets with same cidr."},{"line_number":11,"context_line":"Need first check that router actually has interface from the this"},{"line_number":12,"context_line":"subnet."},{"line_number":13,"context_line":"Also _confirm_router_interface_not_in_use is more expensive"},{"line_number":14,"context_line":"than check for router ports, so its better to perform it after"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"13d160db_269c58ae","line":11,"range":{"start_line":11,"start_character":57,"end_line":11,"end_character":60},"updated":"2020-12-18 09:06:27.000000000","message":"nitty nit: not needed","commit_id":"6968831c739621d8963cd7d69ffcbe2e7c5a5031"},{"author":{"_account_id":32667,"name":"Mamatisa Nurmatov","email":"nurmatov.mamatisa@huawei.com","username":"isabek"},"change_message_id":"37a127687555e66b539cf35b60ad6714abc764b1","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"_confirm_router_interface_not_in_use uses subnet cidr"},{"line_number":10,"context_line":"and does not account for other subnets with same cidr."},{"line_number":11,"context_line":"Need first check that router actually has interface from the this"},{"line_number":12,"context_line":"subnet."},{"line_number":13,"context_line":"Also _confirm_router_interface_not_in_use is more expensive"},{"line_number":14,"context_line":"than check for router ports, so its better to perform it after"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"3757c3ab_6921359e","line":11,"range":{"start_line":11,"start_character":57,"end_line":11,"end_character":60},"in_reply_to":"13d160db_269c58ae","updated":"2020-12-18 12:55:13.000000000","message":"Done","commit_id":"6968831c739621d8963cd7d69ffcbe2e7c5a5031"}],"neutron/db/l3_db.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"e80ee5038cd2daf449d5f18d42d7be0feb22ca6b","unresolved":true,"context_lines":[{"line_number":964,"context_line":"            context, router_id, owner, subnet[\u0027network_id\u0027])"},{"line_number":965,"context_line":"        if ports:"},{"line_number":966,"context_line":"            self._confirm_router_interface_not_in_use("},{"line_number":967,"context_line":"            context, router_id, subnet_id)"},{"line_number":968,"context_line":""},{"line_number":969,"context_line":"        for p in ports:"},{"line_number":970,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"b3b3ea92_2d1bd485","line":967,"updated":"2020-12-02 16:51:44.000000000","message":"If we make this change, it might be useful to change _confirm_router_interface_not_in_use() to take \u0027subnet\u0027 instead of \u0027subnet_id\u0027 as the argument now, as it was also doing a get_subnet() call itself, which can now be avoided.  It could also then pass that subnet to _check_router_interface_not_in_use() as it also does a get_subnet() call.","commit_id":"5fba3322f1841ba3319c5bd3c30111d83a065b4f"},{"author":{"_account_id":32667,"name":"Mamatisa Nurmatov","email":"nurmatov.mamatisa@huawei.com","username":"isabek"},"change_message_id":"19a4bd1d17c32160ddbb8332f99998609cd389da","unresolved":true,"context_lines":[{"line_number":964,"context_line":"            context, router_id, owner, subnet[\u0027network_id\u0027])"},{"line_number":965,"context_line":"        if ports:"},{"line_number":966,"context_line":"            self._confirm_router_interface_not_in_use("},{"line_number":967,"context_line":"            context, router_id, subnet_id)"},{"line_number":968,"context_line":""},{"line_number":969,"context_line":"        for p in ports:"},{"line_number":970,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"97171c9a_e79e53d3","line":967,"in_reply_to":"3067a76d_38086e62","updated":"2020-12-03 08:23:49.000000000","message":"Brian please check: https://review.opendev.org/c/openstack/neutron/+/765253/1","commit_id":"5fba3322f1841ba3319c5bd3c30111d83a065b4f"},{"author":{"_account_id":32667,"name":"Mamatisa Nurmatov","email":"nurmatov.mamatisa@huawei.com","username":"isabek"},"change_message_id":"4d61ed612bbee5b1eda2f2ed315d6e77b14efc5d","unresolved":true,"context_lines":[{"line_number":964,"context_line":"            context, router_id, owner, subnet[\u0027network_id\u0027])"},{"line_number":965,"context_line":"        if ports:"},{"line_number":966,"context_line":"            self._confirm_router_interface_not_in_use("},{"line_number":967,"context_line":"            context, router_id, subnet_id)"},{"line_number":968,"context_line":""},{"line_number":969,"context_line":"        for p in ports:"},{"line_number":970,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3067a76d_38086e62","line":967,"in_reply_to":"b3b3ea92_2d1bd485","updated":"2020-12-03 07:22:00.000000000","message":"I planned to apply this optimization with next patch\nThanks!","commit_id":"5fba3322f1841ba3319c5bd3c30111d83a065b4f"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1b8233524ed3113d11faf4125ecbcc565472ef85","unresolved":true,"context_lines":[{"line_number":963,"context_line":"        ports \u003d port_obj.Port.get_ports_by_router_and_network("},{"line_number":964,"context_line":"            context, router_id, owner, subnet[\u0027network_id\u0027])"},{"line_number":965,"context_line":"        if ports:"},{"line_number":966,"context_line":"            self._confirm_router_interface_not_in_use("},{"line_number":967,"context_line":"                context, router_id, subnet_id)"},{"line_number":968,"context_line":""},{"line_number":969,"context_line":"        for p in ports:"}],"source_content_type":"text/x-python","patch_set":2,"id":"97e2849b_e7caeb68","line":966,"updated":"2020-12-03 15:31:00.000000000","message":"I think this works in the case the second subnet (following the description you made in the LP bug) does not have ports.\n\nIf this second subnet (in another network) has ports but not FIP, the error will be the same, won\u0027t it?","commit_id":"05f63458580103fa7d47e87e9f7c4c9a5c50a275"},{"author":{"_account_id":32667,"name":"Mamatisa Nurmatov","email":"nurmatov.mamatisa@huawei.com","username":"isabek"},"change_message_id":"7ca55517c5a1d736ba979e98dd1c3b55fcd410b7","unresolved":true,"context_lines":[{"line_number":963,"context_line":"        ports \u003d port_obj.Port.get_ports_by_router_and_network("},{"line_number":964,"context_line":"            context, router_id, owner, subnet[\u0027network_id\u0027])"},{"line_number":965,"context_line":"        if ports:"},{"line_number":966,"context_line":"            self._confirm_router_interface_not_in_use("},{"line_number":967,"context_line":"                context, router_id, subnet_id)"},{"line_number":968,"context_line":""},{"line_number":969,"context_line":"        for p in ports:"}],"source_content_type":"text/x-python","patch_set":2,"id":"cd964fe1_93f0c5ef","line":966,"in_reply_to":"1190e6dc_36837b47","updated":"2020-12-15 11:20:36.000000000","message":"Ok, I will add this check to \"_check_router_interface_not_in_use\".","commit_id":"05f63458580103fa7d47e87e9f7c4c9a5c50a275"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"7d3cd7af42109c51225f4437618315c8195eb076","unresolved":true,"context_lines":[{"line_number":963,"context_line":"        ports \u003d port_obj.Port.get_ports_by_router_and_network("},{"line_number":964,"context_line":"            context, router_id, owner, subnet[\u0027network_id\u0027])"},{"line_number":965,"context_line":"        if ports:"},{"line_number":966,"context_line":"            self._confirm_router_interface_not_in_use("},{"line_number":967,"context_line":"                context, router_id, subnet_id)"},{"line_number":968,"context_line":""},{"line_number":969,"context_line":"        for p in ports:"}],"source_content_type":"text/x-python","patch_set":2,"id":"1190e6dc_36837b47","line":966,"in_reply_to":"4f7e1936_8d563270","updated":"2020-12-11 09:15:36.000000000","message":"Yes, both changes should be done in this patch: this change and the refactor of \"_check_router_interface_not_in_use\".\n\nAlthough this change could work as is, IMO you should also modify the method that is actually not checking properly the FIPs associations.","commit_id":"05f63458580103fa7d47e87e9f7c4c9a5c50a275"},{"author":{"_account_id":32667,"name":"Mamatisa Nurmatov","email":"nurmatov.mamatisa@huawei.com","username":"isabek"},"change_message_id":"f2c9885b2f151fbe2eaad43e5b0dba92a0255b78","unresolved":true,"context_lines":[{"line_number":963,"context_line":"        ports \u003d port_obj.Port.get_ports_by_router_and_network("},{"line_number":964,"context_line":"            context, router_id, owner, subnet[\u0027network_id\u0027])"},{"line_number":965,"context_line":"        if ports:"},{"line_number":966,"context_line":"            self._confirm_router_interface_not_in_use("},{"line_number":967,"context_line":"                context, router_id, subnet_id)"},{"line_number":968,"context_line":""},{"line_number":969,"context_line":"        for p in ports:"}],"source_content_type":"text/x-python","patch_set":2,"id":"f53c854e_f82a949a","line":966,"in_reply_to":"97e2849b_e7caeb68","updated":"2020-12-03 15:45:53.000000000","message":"Second subnet won\u0027t have router ports of this router, because we cannot attach subnets with same cidr to one router","commit_id":"05f63458580103fa7d47e87e9f7c4c9a5c50a275"},{"author":{"_account_id":32667,"name":"Mamatisa Nurmatov","email":"nurmatov.mamatisa@huawei.com","username":"isabek"},"change_message_id":"3774b3fe738854d7df24a62b66665c332afd5383","unresolved":true,"context_lines":[{"line_number":963,"context_line":"        ports \u003d port_obj.Port.get_ports_by_router_and_network("},{"line_number":964,"context_line":"            context, router_id, owner, subnet[\u0027network_id\u0027])"},{"line_number":965,"context_line":"        if ports:"},{"line_number":966,"context_line":"            self._confirm_router_interface_not_in_use("},{"line_number":967,"context_line":"                context, router_id, subnet_id)"},{"line_number":968,"context_line":""},{"line_number":969,"context_line":"        for p in ports:"}],"source_content_type":"text/x-python","patch_set":2,"id":"4f7e1936_8d563270","line":966,"in_reply_to":"a3397915_a9ef59b7","updated":"2020-12-11 08:20:26.000000000","message":"Agree, but current change not only fixes the bug. It is also an optimization, because _confirm_router_interface_not_in_use is more expensive than getting router ports.","commit_id":"05f63458580103fa7d47e87e9f7c4c9a5c50a275"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"646e3bb268564666736b6202c36c35e9aee221bc","unresolved":true,"context_lines":[{"line_number":963,"context_line":"        ports \u003d port_obj.Port.get_ports_by_router_and_network("},{"line_number":964,"context_line":"            context, router_id, owner, subnet[\u0027network_id\u0027])"},{"line_number":965,"context_line":"        if ports:"},{"line_number":966,"context_line":"            self._confirm_router_interface_not_in_use("},{"line_number":967,"context_line":"                context, router_id, subnet_id)"},{"line_number":968,"context_line":""},{"line_number":969,"context_line":"        for p in ports:"}],"source_content_type":"text/x-python","patch_set":2,"id":"a3397915_a9ef59b7","line":966,"in_reply_to":"f53c854e_f82a949a","updated":"2020-12-10 14:37:43.000000000","message":"This code is correct: the subnet should not have router ports.\n\nHowever, \"_check_router_interface_not_in_use\" should be the method to be fixed, if possible; instead of checking just the PF internal address subnet, there should be another check. For example, PortForwarding stores the internal_port_id, that means you know if the port belongs or not this this subnet/net.","commit_id":"05f63458580103fa7d47e87e9f7c4c9a5c50a275"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"6bff5a492737e2225b0c1fb7b6ee537e1bf03c90","unresolved":true,"context_lines":[{"line_number":908,"context_line":"            for pf_obj in pf_objs:"},{"line_number":909,"context_line":"                if (pf_obj.internal_ip_address and"},{"line_number":910,"context_line":"                        pf_obj.internal_ip_address in subnet_cidr):"},{"line_number":911,"context_line":"                    internal_port \u003d port_obj.Port.get_object("},{"line_number":912,"context_line":"                        context, fields\u003d[\u0027network_id\u0027], id\u003dpf_obj.internal_port_id)"},{"line_number":913,"context_line":"                    if internal_port.network_id \u003d\u003d subnet[\u0027network_id\u0027]:"},{"line_number":914,"context_line":"                        raise l3_exc.RouterInterfaceInUseByFloatingIP("}],"source_content_type":"text/x-python","patch_set":3,"id":"7bee55c5_39dcfd5c","line":911,"updated":"2020-12-15 11:48:44.000000000","message":"+1 this is what I was talking about","commit_id":"04a4f4d9d536848d744513255b2a51c988aa184a"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"460c02fb6c99822444f95c3a52d952c5456567fd","unresolved":true,"context_lines":[{"line_number":908,"context_line":"            for pf_obj in pf_objs:"},{"line_number":909,"context_line":"                if (pf_obj.internal_ip_address and"},{"line_number":910,"context_line":"                        pf_obj.internal_ip_address in subnet_cidr):"},{"line_number":911,"context_line":"                    internal_port \u003d port_obj.Port.get_object("},{"line_number":912,"context_line":"                        context, fields\u003d[\u0027network_id\u0027],"},{"line_number":913,"context_line":"                        id\u003dpf_obj.internal_port_id)"},{"line_number":914,"context_line":"                    if internal_port.network_id \u003d\u003d subnet[\u0027network_id\u0027]:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5c78a390_e8894ed4","line":911,"updated":"2020-12-18 09:06:27.000000000","message":"port_forwarding object has got \"internal_port_id\" also. Maybe You could once get all ports which belongs to the subnet[\u0027network_id\u0027] and then just check here if pf_obj.internal_port_id in all_network_ports. Wouldn\u0027t that be more efficient than getting ports for each PF?","commit_id":"6968831c739621d8963cd7d69ffcbe2e7c5a5031"},{"author":{"_account_id":32667,"name":"Mamatisa Nurmatov","email":"nurmatov.mamatisa@huawei.com","username":"isabek"},"change_message_id":"37a127687555e66b539cf35b60ad6714abc764b1","unresolved":false,"context_lines":[{"line_number":908,"context_line":"            for pf_obj in pf_objs:"},{"line_number":909,"context_line":"                if (pf_obj.internal_ip_address and"},{"line_number":910,"context_line":"                        pf_obj.internal_ip_address in subnet_cidr):"},{"line_number":911,"context_line":"                    internal_port \u003d port_obj.Port.get_object("},{"line_number":912,"context_line":"                        context, fields\u003d[\u0027network_id\u0027],"},{"line_number":913,"context_line":"                        id\u003dpf_obj.internal_port_id)"},{"line_number":914,"context_line":"                    if internal_port.network_id \u003d\u003d subnet[\u0027network_id\u0027]:"}],"source_content_type":"text/x-python","patch_set":4,"id":"a399f874_3b995988","line":911,"in_reply_to":"5c78a390_e8894ed4","updated":"2020-12-18 12:55:13.000000000","message":"Done","commit_id":"6968831c739621d8963cd7d69ffcbe2e7c5a5031"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"460c02fb6c99822444f95c3a52d952c5456567fd","unresolved":true,"context_lines":[{"line_number":920,"context_line":"                    fip_obj.fixed_ip_address in subnet_cidr):"},{"line_number":921,"context_line":"                internal_port \u003d port_obj.Port.get_object("},{"line_number":922,"context_line":"                    context, fields\u003d[\u0027network_id\u0027], id\u003dfip_obj.fixed_port_id)"},{"line_number":923,"context_line":"                if internal_port.network_id \u003d\u003d subnet[\u0027network_id\u0027]:"},{"line_number":924,"context_line":"                    raise l3_exc.RouterInterfaceInUseByFloatingIP("},{"line_number":925,"context_line":"                        router_id\u003drouter_id, subnet_id\u003dsubnet_id)"},{"line_number":926,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5cce31fa_dba26a4e","line":923,"updated":"2020-12-18 09:06:27.000000000","message":"the same list of ports could be used also here","commit_id":"6968831c739621d8963cd7d69ffcbe2e7c5a5031"},{"author":{"_account_id":32667,"name":"Mamatisa Nurmatov","email":"nurmatov.mamatisa@huawei.com","username":"isabek"},"change_message_id":"37a127687555e66b539cf35b60ad6714abc764b1","unresolved":false,"context_lines":[{"line_number":920,"context_line":"                    fip_obj.fixed_ip_address in subnet_cidr):"},{"line_number":921,"context_line":"                internal_port \u003d port_obj.Port.get_object("},{"line_number":922,"context_line":"                    context, fields\u003d[\u0027network_id\u0027], id\u003dfip_obj.fixed_port_id)"},{"line_number":923,"context_line":"                if internal_port.network_id \u003d\u003d subnet[\u0027network_id\u0027]:"},{"line_number":924,"context_line":"                    raise l3_exc.RouterInterfaceInUseByFloatingIP("},{"line_number":925,"context_line":"                        router_id\u003drouter_id, subnet_id\u003dsubnet_id)"},{"line_number":926,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5fa6610b_ad840ad1","line":923,"in_reply_to":"5cce31fa_dba26a4e","updated":"2020-12-18 12:55:13.000000000","message":"Done","commit_id":"6968831c739621d8963cd7d69ffcbe2e7c5a5031"}]}
