Comment 0 for bug 1262461

Revision history for this message
wangpan (hzwangpan) wrote :

this bug is similar to https://bugs.launchpad.net/nova/+bug/1158897
but this bug is cause by _reserve_quota_delta() method, which will need to access DB if quota delta is not empty,
the trace log is:
2013-12-19 01:39:40.879 ERROR nova.compute [-] No db access allowed in nova-compute:
File "/usr/local/lib/python2.7/dist-packages/eventlet/greenthread.py", line 194, in main
    result = function(*args, **kwargs)
  File "/opt/stack/nova/nova/openstack/common/loopingcall.py", line 125, in _inner
    idle = self.f(*self.args, **self.kw)
  File "/opt/stack/nova/nova/service.py", line 314, in periodic_tasks
    return self.manager.periodic_tasks(ctxt, raise_on_error=raise_on_error)
  File "/opt/stack/nova/nova/manager.py", line 101, in periodic_tasks
    return self.run_periodic_tasks(context, raise_on_error=raise_on_error)
  File "/opt/stack/nova/nova/openstack/common/periodic_task.py", line 180, in run_periodic_tasks
    task(self, context)
  File "/opt/stack/nova/nova/compute/manager.py", line 4535, in _poll_unconfirmed_resizes
    migration=migration)
  File "/opt/stack/nova/nova/compute/api.py", line 199, in wrapped
    return func(self, context, target, *args, **kwargs)
  File "/opt/stack/nova/nova/compute/api.py", line 189, in inner
    return function(self, context, instance, *args, **kwargs)
  File "/opt/stack/nova/nova/compute/api.py", line 216, in _wrapped
    return fn(self, context, instance, *args, **kwargs)
  File "/opt/stack/nova/nova/compute/api.py", line 170, in inner
    return f(self, context, instance, *args, **kw)
  File "/opt/stack/nova/nova/compute/api.py", line 2158, in confirm_resize
    reservations = self._reserve_quota_delta(context, deltas)
  File "/opt/stack/nova/nova/compute/api.py", line 2238, in _reserve_quota_delta
    return QUOTAS.reserve(context, project_id=project_id, **deltas)
  File "/opt/stack/nova/nova/quota.py", line 1272, in reserve
    user_id=user_id)
  File "/opt/stack/nova/nova/quota.py", line 487, in reserve
    has_sync=True, project_id=project_id)
  File "/opt/stack/nova/nova/quota.py", line 354, in _get_quotas
    usages=False)
  File "/opt/stack/nova/nova/quota.py", line 264, in get_project_quotas
    project_quotas = db.quota_get_all_by_project(context, project_id)
  File "/opt/stack/nova/nova/db/api.py", line 1023, in quota_get_all_by_project
    return IMPL.quota_get_all_by_project(context, project_id)
  File "/opt/stack/nova/nova/cmd/compute.py", line 48, in __call__
    stacktrace = "".join(traceback.format_stack())

2013-12-19 01:39:40.879 ERROR nova.compute.manager [-] [instance: 4ffaabaf-a480-421f-a7a7-efd148d7c956] Error auto-confirming resize: nova-compute. Will retry later.