neutron/neutron/tests/functional
ZhaoBo 4088461ed6 [server side] Fix race issue for port forwarding plugin
This patch fixes the race condition with update/delete neutron
serveral resources, such as port forwarding conflict with
floatingip and port forwarding conflict with port.

Also this approach need the revision function, so need to fix in port
forwarding model to aware relationship revision update.

As the port forwarding resource associated with 2 resources,
one is floatingip, the other is neutron internal port.
So floatingip update/delete maybe in a conflict situation with
port forwarding creation. But for port, we just lack the logic to
process port forwarding during update port's fixed_ip and delete
port.

So the approach here is adding logic to let l3 plugin and port
forwarding plugin know each other when both sides may process the same
floatingip resource. Based on the existing revision_number feature,
if one side fail as db staleError, the api layer will retry the whole
operation for this resource, so there must be a failure on one side in
this case. This patch just adds the association logic for l3 plugin and
port forwarding plugin, also adds a event receiver for port update/delete.

Then the behavior about the port forwarding associated resources would
be:
* For fip resource, I introduce one function in that patch.
  _check_floatingip_request
So during floatingip update/delete, the function will process
fip and check by rpc callback from l3_plugin, if port forwarding plugin
also creates a port forwarding with the same fip at this moment. The
success side would be the one who update the fip_db first, the other side
would be failure after db retry.

* For port resource, during update port fixed_ip or delete port, we will
delete the associated port forwarding resources for free the
fip:external_port socket.

Partially-Implements: blueprint port-forwarding
Change-Id: I637ebcb33b91d899a077bded5ca10097a830a847
Partial-Bug: #1491317
2018-08-01 02:45:14 +08:00
..
agent [agent side] L3 agent side Floating IP port forwarding 2018-07-27 18:25:47 +08:00
api consume neutron-lib resources attr map 2018-03-09 13:37:28 -07:00
cmd Removing deprecated function 'IPWrapper.get_namespaces()' 2018-04-03 19:52:52 +00:00
common Untangle WaitTimeout class from eventlet.TimeoutError 2017-03-15 04:27:00 +00:00
db Fix all pep8 E265 errors 2018-04-30 16:35:52 -04:00
pecan_wsgi fix a typo: s/paramater/parameter 2018-06-04 07:35:10 +00:00
plugins use neutron_lib's portbindings api-def 2017-03-31 09:16:22 -06:00
sanity sanity check: Check that ip_nonlocal_bind works with namespaces 2016-11-18 08:36:51 -05:00
scheduler Remove router_ids argument to auto_schedule_routers() 2017-12-04 15:07:29 -05:00
services [server side] Fix race issue for port forwarding plugin 2018-08-01 02:45:14 +08:00
tests make net_helpers functions work on OpenSUSE 2017-09-20 09:59:44 -07:00
__init__.py tests: removed 'retargetable' framework 2017-05-02 16:45:49 +00:00
base.py Use rootwrap for fullstack test runner 2017-06-08 18:42:47 +00:00
constants.py TrunkManager for the OVS agent 2016-08-24 02:52:17 -04:00
requirements.txt Don't return null-byte separated string from ExternalProcess.cmdline() 2017-03-08 07:50:51 +00:00
test_server.py Fix W503 pep8 warnings 2018-04-17 14:22:58 +00:00
test_service.py Use SIGUSR1 to notify l3 agent of changing prefix file 2015-11-13 17:53:47 +03:00