ovs plugin generating the same endpoint number

Bug #1167916 reported by Mathieu Rohon
42
This bug affects 9 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Roman Podoliaka

Bug Description

I'm using the OVS plugin with tunneling in a multi-agent environnement, with devstack.

Once, when I started several ovs agent at the time, the same endpoint number was provisionned for two different IP in the table ovs_tunnel_endpoint.

Tags: ovs
Revision history for this message
Mark McClain (markmcclain) wrote :

What release of OpenStack Network are you running?

tags: added: ovs
Changed in quantum:
status: New → Incomplete
Revision history for this message
Mathieu Rohon (mathieu-rohon) wrote :

I'm working with the master branch. This bug seems quite hard to duplicate!!

Changed in quantum:
status: Incomplete → New
Changed in quantum:
assignee: nobody → Roman Podolyaka (rpodolyaka)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to quantum (master)

Fix proposed to branch: master
Review: https://review.openstack.org/27818

Changed in quantum:
status: New → In Progress
tags: added: grizzly-backport-potential
Changed in neutron:
assignee: Roman Podolyaka (rpodolyaka) → Mark McClain (markmcclain)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/27818
Committed: http://github.com/openstack/neutron/commit/658452478fb35f3200e5d62b23d328be72d35039
Submitter: Jenkins
Branch: master

commit 658452478fb35f3200e5d62b23d328be72d35039
Author: Roman Podolyaka <email address hidden>
Date: Tue Apr 30 15:12:15 2013 +0300

    Fix a race condition in add_tunnel_endpoint()

    If there are multiple OVS agents concurrently executing
    'tunnel_sync' RPC call a race condition can occur
    leading to insertion of two different TunnelEndpoint
    entries having the same 'id' value.

    Unfortunately, we can not rely on:
      - @lockutils.synchronized(), because a Neutron installation can use
        more than one API node
      - with_lockmode('update'), because it works differently in PostgreSQL
        comparing to MySQL and doesn't guarantee that no new rows have been
        added to the table since the select query was issued. Please take a
        look at http://www.postgresql.org/files/developer/concurrency.pdf for
        more details.

    The proposed fix:
      - ensures there is a unique constraint set for 'id' column
      - wraps creation of a new TunnelEndpoint entry into a
        repeatedly executed transactional block (so even if a concurrent
        DB transaction has been flushed or commited earlier than this one
        we can handle an integrity error and try again, in spite of the
        specified transactions isolation level value)

    Fixes bug 1167916

    Change-Id: I62dc729d595f090436199d5e1b6b98a884ead7a5

Changed in neutron:
status: In Progress → Fix Committed
Changed in neutron:
assignee: Mark McClain (markmcclain) → Roman Podolyaka (rpodolyaka)
milestone: none → havana-3
importance: Undecided → High
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Revision history for this message
Byron McCollum (byron-mccollum) wrote :

Grizzly backport would be much appreciated!

Thierry Carrez (ttx)
Changed in neutron:
milestone: havana-3 → 2013.2
Alan Pevec (apevec)
tags: removed: grizzly-backport-potential
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.