diff --git a/neutron/plugins/ml2/drivers/type_vxlan.py b/neutron/plugins/ml2/drivers/type_vxlan.py index 959300d30c..0764be3107 100644 --- a/neutron/plugins/ml2/drivers/type_vxlan.py +++ b/neutron/plugins/ml2/drivers/type_vxlan.py @@ -153,7 +153,7 @@ class VxlanTypeDriver(type_tunnel.TunnelTypeDriver): session = db_api.get_session() with session.begin(subtransactions=True): # remove from table unallocated tunnels not currently allocatable - allocs = session.query(VxlanAllocation) + allocs = session.query(VxlanAllocation).with_lockmode("update") for alloc in allocs: try: # see if tunnel is allocatable