openvswitch plugin would fail with replicated quantum-server

Bug #1023167 reported by Robert Kukura
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Robert Kukura

Bug Description

OpenStack API services can generally be replicated behind a load balancer in order to scale horizontally, or an SSL terminator might dispatch requests to multiple server processes in parallel. In either case, multiple quantum-server processes might execute in parallel using the same DB. The openvswitch plugin currently maintains a VlanMap class in memory that is used to keep track of free VLAN tags and allocate them as networks are created. If multiple quantum-server instances run in parallel, its possible that the openvswitch plugin would allocate the same VLAN tag to multiple networks, breaking network isolation as well as database consistency. VLAN tags should instead be allocated via atomic DB transactions.

Robert Kukura (rkukura)
Changed in quantum:
assignee: nobody → Robert Kukura (rkukura)
dan wendlandt (danwent)
Changed in quantum:
importance: Undecided → High
milestone: none → folsom-3
dan wendlandt (danwent)
Changed in quantum:
status: New → Confirmed
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/10700

Changed in quantum:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to quantum (master)

Reviewed: https://review.openstack.org/10700
Committed: http://github.com/openstack/quantum/commit/88078250028d50b6d726a6bdf79874a2f4e9abce
Submitter: Jenkins
Branch: master

commit 88078250028d50b6d726a6bdf79874a2f4e9abce
Author: Bob Kukura <email address hidden>
Date: Mon Jul 30 14:52:06 2012 -0400

    Replace openvswitch plugin's VlanMap with vlan_ids DB table.

    Fixes bug 1023167.

    The openswitch plugin's in-memory VlanMap is replaced with a vlan_ids
    DB table similar to that used by the linuxbridge plugin. This will
    prevent conflicting VLAN assignments if multiple server replicas are
    run, and also sets the stage for phase 2 of the provider-networks BP
    implementation that will add support for multiple physical
    networks.

    Unlike with the current linuxbridge plugin, the contents of the
    openvswitch plugin's vlan_ids table are properly updated at startup in
    case the vlan_min or vlan_max configuration variables have changed.

    A new test_ovs_db test case has been added.

    The primary key of the vlan_bindings table is changed from the vlan_id
    to the network_id, which is now a foreign key, and network deletion is
    now properly handled.

    The net_id has been removed from the VlanIdInUse exception, requiring
    a minor update to the linuxbridge plugin. The new NoNetworksAvailable
    exception, with ResourceExhausted as its base class, is returned when
    no more VLANs are available.

    Change-Id: I65a2347dea5366cc0d15d98a88f40e42e1a45f4c

Changed in quantum:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in quantum:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in quantum:
milestone: folsom-3 → 2012.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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