← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1276391] [NEW] ML2 MechanismDriver.bind_port() called inside transaction

 

Public bug reported:

The ML2 plugin calls the bind_port() operation  on the registered
mechanism drivers in order to establish a binding for a neutron port
(i.e. determining the binding:vif_type and what network segment is being
used). It currently makes these calls from within a DB transaction. This
is fine for mechanism drivers such as those for the L2 agents that base
their binding decision solely on information from the neutron DB. But if
mechanism drivers for controllers or devices need to make remote calls
to determine if binding is possible, they should not do this from within
a DB transaction. Therefore, the bind_port() call must be made by the
plugin outside of any enclosing DB transaction, and the drivers should
manage any needed DB transactions themselves.

Once [re]binding is moved outside the DB transaction that triggers it,
the possibility that multiple threads or processes will concurrently try
to bind the same port must also be addressed.

** Affects: neutron
     Importance: High
     Assignee: Robert Kukura (rkukura)
         Status: New


** Tags: ml2

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1276391

Title:
  ML2 MechanismDriver.bind_port() called inside transaction

Status in OpenStack Neutron (virtual network service):
  New

Bug description:
  The ML2 plugin calls the bind_port() operation  on the registered
  mechanism drivers in order to establish a binding for a neutron port
  (i.e. determining the binding:vif_type and what network segment is
  being used). It currently makes these calls from within a DB
  transaction. This is fine for mechanism drivers such as those for the
  L2 agents that base their binding decision solely on information from
  the neutron DB. But if mechanism drivers for controllers or devices
  need to make remote calls to determine if binding is possible, they
  should not do this from within a DB transaction. Therefore, the
  bind_port() call must be made by the plugin outside of any enclosing
  DB transaction, and the drivers should manage any needed DB
  transactions themselves.

  Once [re]binding is moved outside the DB transaction that triggers it,
  the possibility that multiple threads or processes will concurrently
  try to bind the same port must also be addressed.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1276391/+subscriptions


Follow ups

References