neutron/neutron/tests
Fernando Royo 789a46df61 Check subnet overlapping after add router interface
When simultaneous attempts are made to add an interface
to the same router including overlapping networks in cidrs,
both attempts are successful. There is a check to avoid this
overlap but is performed when creating the network interface
and it is done over the ports already attached to the router,
so at this moment the check is not able to detect the
overlapping. Furthermore, the create_port operation over the
ML2 plugin  must be executed in isolated transactions, so
trying to control the execution context or adding additional
steps to the transaction is not feasible.

This patch checks once the RouterPort is created on the
neutron database if there is more than one overlapping port,
triggering in that case the exception that will remove the
the culprit of overlapping.

Note: Added clean of l3_obj.RouterPort to avoid errors on
setUp of test class L3TestCase, pick from [1]. Also added
cfg allow_overlapping_ips to True for fullstack job, this one
had been deprecated and enabled by default in newer releases
but added in order to run the backported tests over this
stable branch.

Conflicts:
       neutron/db/l3_db.py
(manually cherry picked from commit 1abb77d7a6)

[1] https://review.opendev.org/c/openstack/neutron/+/804846/18/neutron/tests/unit/db/test_l3_db.py#612

Closes-Bug: #1987666
Change-Id: I7cec8b53e72e7abf34012906e6adfecf079525af
(cherry picked from commit 1abb77d7a6)
2022-11-11 17:30:59 +01:00
..
common Make sure "dead vlan" ports cannot transmit packets 2022-02-08 07:22:56 +00:00
contrib Allow sharing of address groups via RBAC mechanism 2021-03-01 18:28:31 -06:00
etc Convert policy.json into policy-in-code 2018-12-13 20:37:53 +00:00
fullstack Check subnet overlapping after add router interface 2022-11-11 17:30:59 +01:00
functional Merge "[OVN] Allow to execute ``MetadataProxyHandler`` in a local thread" into stable/xena 2022-10-21 12:34:32 +00:00
unit Check subnet overlapping after add router interface 2022-11-11 17:30:59 +01:00
var
__init__.py
base.py Revert "Cache default security group IDs in memory" 2021-04-12 15:24:42 +00:00
post_mortem_debug.py
tools.py Add port NUMA affinity policy 2020-11-13 15:49:34 +00:00