commit 6927dfbb3e52ba298928362da5cce32d49b1e1f8
Author: Fernando Royo <email address hidden>
Date: Thu Dec 1 11:47:58 2022 +0100
Dont raise RouterInterfaceNotFound on overlap check router ports
A corner case of the fix done in [1] could happend if, as a race
scenario, parallel requests evaluate other ports that could be deleted
during the process if they had already determined a overlapping, in that
case a RouterInterfaceNotFound exception was raised and the request
finished with that exception and a 404 status code.
This patch removes the exception due to a port not found, because if the
port is not found, the related subnet should not participate in the
overlap evaluation, so it makes no sense to break the process for a port
that no longer exists. It also improves the previous validation to
perform the overlapping check, being performed only when we have
at least more than one subnet, as the overlapping check with only one
subnet did not make sense.
Reviewed: https:/ /review. opendev. org/c/openstack /neutron/ +/866835 /opendev. org/openstack/ neutron/ commit/ 6927dfbb3e52ba2 98928362da5cce3 2d49b1e1f8
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/zed
commit 6927dfbb3e52ba2 98928362da5cce3 2d49b1e1f8
Author: Fernando Royo <email address hidden>
Date: Thu Dec 1 11:47:58 2022 +0100
Dont raise RouterInterface NotFound on overlap check router ports
A corner case of the fix done in [1] could happend if, as a race NotFound exception was raised and the request
scenario, parallel requests evaluate other ports that could be deleted
during the process if they had already determined a overlapping, in that
case a RouterInterface
finished with that exception and a 404 status code.
This patch removes the exception due to a port not found, because if the
port is not found, the related subnet should not participate in the
overlap evaluation, so it makes no sense to break the process for a port
that no longer exists. It also improves the previous validation to
perform the overlapping check, being performed only when we have
at least more than one subnet, as the overlapping check with only one
subnet did not make sense.
Closes-Bug: #1998226
[1] https:/ /review. opendev. org/c/openstack /neutron/ +/859143
Change-Id: If4afe6f525c46f 9cf7f02d8aae27d fc56144fd62 fc464c932f1fd60 d1c4d7e828)
(cherry picked from commit 92efd8e45bef761