attrs = port[attributes.PORT]
need_port_update_notify = False
session = context.session
+ bound_mech_contexts = []
- # REVISIT: Serialize this operation with a semaphore to
- # prevent deadlock waiting to acquire a DB lock held by
- # another thread in the same process, leading to 'lock wait
- # timeout' errors.
- with lockutils.lock('db-access'),\
- session.begin(subtransactions=True):
+ with session.begin(subtransactions=True):
port_db, binding = db.get_locked_port_and_binding(session, id)
if not port_db:
raise exc.PortNotFound(port_id=id)