This is not reproducible in stable juno.
cinder db access mechanism has changed since then.
Didnt have time to look how we got there, sorry
In openstack cinder 2013.2.1, we only had this.
@require_context
def quota_reserve(context, resources, quotas, deltas, expire, until_refresh, max_age, project_id=None):
In cinder stable/juno there is a retry mechanism
@require_context
@_retry_on_deadlock
def quota_reserve(context, resources, quotas, deltas, expire, until_refresh, max_age, project_id=None):
.
.
.
def _retry_on_deadlock(f):
"""Decorator to retry a DB API call if Deadlock was received."""
@functools.wraps(f)
def wrapped(*args, **kwargs):
while True:
try: return f(*args, **kwargs)
except db_exc.DBDeadlock: LOG.warn(_("Deadlock detected when running " "'%(func_name)s': Retrying..."), dict(func_name=f.__name__))
# Retry! time.sleep(0.5) continue
functools.update_wrapper(wrapped, f)
return wrapped
I did a simple test as it in reproduce script in top of the report.
create 200 NFS spared volumes without problem.
cinder logs are also attached.
This is not reproducible in stable juno.
cinder db access mechanism has changed since then.
Didnt have time to look how we got there, sorry
In openstack cinder 2013.2.1, we only had this. context, resources, quotas, deltas, expire,
until_ refresh, max_age, project_id=None):
@require_context
def quota_reserve(
In cinder stable/juno there is a retry mechanism context, resources, quotas, deltas, expire,
until_ refresh, max_age, project_id=None): on_deadlock( f): wraps(f)
return f(*args, **kwargs)
LOG.warn( _("Deadlock detected when running "
" '%(func_ name)s' : Retrying..."),
dict( func_name= f.__name_ _))
time. sleep(0. 5)
continue update_ wrapper( wrapped, f)
@require_context
@_retry_on_deadlock
def quota_reserve(
.
.
.
def _retry_
"""Decorator to retry a DB API call if Deadlock was received."""
@functools.
def wrapped(*args, **kwargs):
while True:
try:
except db_exc.DBDeadlock:
# Retry!
functools.
return wrapped
I did a simple test as it in reproduce script in top of the report.
create 200 NFS spared volumes without problem.
cinder logs are also attached.