Comment 4 for bug 1254246

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/58814
Committed: http://github.com/openstack/neutron/commit/5529071bf1393d0d448bc495cc906a68bc30a820
Submitter: Jenkins
Branch: master

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.

    Closes-Bug: #1254246

    Change-Id: I1ebaa111154b3d6b34074705b579097ab730594c