commit 5529071bf1393d0d448bc495cc906a68bc30a820
Author: Roman Podoliaka <email address hidden>
Date: Wed Nov 27 18:57:56 2013 +0200
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.
Reviewed: https:/ /review. openstack. org/58814 github. com/openstack/ neutron/ commit/ 5529071bf1393d0 d448bc495cc906a 68bc30a820
Committed: http://
Submitter: Jenkins
Branch: master
commit 5529071bf1393d0 d448bc495cc906a 68bc30a820
Author: Roman Podoliaka <email address hidden>
Date: Wed Nov 27 18:57:56 2013 +0200
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: I1ebaa111154b3d 6b34074705b5790 97ab730594c