neutron/neutron/tests/functional/db
Lujin Luo 6281fddbcb Add a unique key to port_id in routerports table
If multiple commands to add router interfaces to different routers
by the same port are executed concurrently, then all the commands
would show success.

However, there are three issues:
1. Only one router interface is actually added by the port
2. Multiple router ports records are stored in routerports table
3. The port table is updated multiple times and eventually the
last-arrived command would truly take effect

This patch adds a unique key to port_id in routerport table,
so that only the first-arrived command will insert router port
record and all later requests would raise exceptions.

Besides, port.device_id and port.device_owner in port table
needs to be updated again after routerport record is inserted.
Otherwise, in race condition the port table will store the router
information from last-arrived request. However, in routerport table,
only the first-arrived request's router information is inserted.

Change-Id: I15be35689ec59ac02ed34abe5862fa4580c8587c
Closes-Bug: #1535551
2016-08-03 08:52:53 +09:00
..
__init__.py Freeze models for healing migration 2014-07-14 18:36:05 +02:00
test_ipam.py Replace device owners hard coded strings to neutron_lib constants 2016-07-12 04:11:35 -04:00
test_migrations.py Add a unique key to port_id in routerports table 2016-08-03 08:52:53 +09:00
test_models.py Juno_initial migration 2015-06-16 15:03:14 +03:00