neutron/neutron/tests
Sebastian Lohff b993ebb407 Fix dynamic segment allocation race condition
When two segments are concurrently created this could have resulted in
both threads creating a segment, thus resulting in two segments with
different segmentation ids. To prevent this we now introduce a new
unique constraint onto the networksegments table, which requires
(network_id, network_type, physical_network) to be unique, which allows
only a single segment with a single segmentation id to exist per
combination of these three values.

With the constraint in place a DB error will be thrown, which will cause
allocate_dynamic_segment() to be executed again and this time it will
find the already existing segment. To make sure that no additional DB
objects are created when segment creation failed we need to put all of
the allocation code into a DB transaction.

Change-Id: I407ae88d69ed971bf8d9a9b79120366f33bb56fd
Closes-Bug: #1791233
2021-10-07 13:20:04 +02:00
..
common Merge "[Fullstack] Add segmentation_id update test" 2021-06-05 09:28:15 +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 Change fullstack dhclient lease file to tmp folder 2021-07-05 19:05:12 +08:00
functional Merge "Execute the quota reservation removal in an isolated DB txn" 2021-10-02 03:05:26 +00:00
unit Fix dynamic segment allocation race condition 2021-10-07 13:20:04 +02: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 API extension for QoS minimum pps rule 2021-09-29 12:27:30 +02:00