vmware-nsx/neutron
Roman Podoliaka 88fe8afe50 Fix a race condition in agents status update code
Code handling agents status updates coming via RPC checks,
if a corresponding entry for the given (agent_type, host)
pair already exists in DB and updates it. And if it doesn't
exist, a new entry is created.

Without a unique constraint this can cause a race condition
resulting in adding of two agent entries having the same value
of (agent_type, host) pair.

Note, that it's already not allowed to have multiple agents of
the same type having the same host value, but currently it's
enforced only at code level, not at DB schema level, which
effectively makes race conditions possible.

Closes-Bug: #1254246

Change-Id: I1ebaa111154b3d6b34074705b579097ab730594c
2013-12-09 15:18:34 +02:00
..
agent Merge "Preserve floating ips when initializing l3 gateway interface" 2013-12-07 23:05:30 +00:00
api Fix misspells 2013-12-03 15:03:47 -08:00
cmd remove binaries under bin 2013-08-16 10:10:30 +08:00
common Fix misspells 2013-12-03 15:03:47 -08:00
db Fix a race condition in agents status update code 2013-12-09 15:18:34 +02:00
debug Fix incorrect indentations found by Pep 1.4.6+ 2013-10-19 10:50:16 +02:00
extensions update error msg for invalid state to update vpn resources 2013-12-03 06:06:02 +08:00
locale Imported Translations from Transifex 2013-12-07 06:33:24 +00:00
openstack Sync rpc fix from oslo-incubator 2013-12-06 15:35:51 +01:00
plugins Merge "Add request timeout handling for Mellanox Neutron Agent" 2013-12-07 10:05:57 +00:00
scheduler Ensure router exists when auto_schedule_routers 2013-09-26 22:48:46 +08:00
server Disable lazy translation 2013-10-01 23:16:23 +00:00
services Merge "Fix a typo in log exception in the metering agent" 2013-12-06 19:13:38 +00:00
tests Fix a race condition in agents status update code 2013-12-09 15:18:34 +02:00
__init__.py Rename Quantum to Neutron 2013-07-06 15:02:43 -04:00
auth.py Add request-id to log messages 2013-11-21 17:01:33 +09:00
context.py Stop logging unnecessary warning on context create 2013-11-28 09:17:18 +00:00
hooks.py Fixes Windows setup dependency bug 2013-08-15 22:58:14 +03:00
manager.py Add agent scheduling for LBaaS namespace agent 2013-07-19 13:25:04 +04:00
neutron_plugin_base_v2.py Apply six for metaclass 2013-11-18 17:58:58 +09:00
policy.py Add log statements for policy check failures 2013-11-14 19:21:15 -08:00
quota.py Fallback to Quota Conf Driver if Quotas table is not defined 2013-10-09 22:28:03 +09:00
service.py Merge "Creates multiple worker processes for API server" 2013-10-31 01:39:19 +00:00
version.py Rename Quantum to Neutron 2013-07-06 15:02:43 -04:00
wsgi.py Merge "Creates multiple worker processes for API server" 2013-10-31 01:39:19 +00:00