OperationalError 'no such table: quotas'

Asked by James Luhrsen

Hi,

I'm frequently, yet unpredictably running in to an issue where I am unable to create a network. The error in
the neutron/server.log file complains about something to do with quotas, but I can't make too much sense of it:

2013-10-03 13:57:29.164 26713 TRACE neutron.api.v2.resource OperationalError: (OperationalError) no such table: quotas u'SELECT quotas.id AS quotas_id, quotas.tenant_id AS quotas_tenant_id, quotas.resource AS quotas_resource, quotas."limit" AS quotas_limit \nFROM quotas \nWHERE quotas.tenant_id = ?' (u'9eea460c02534e4894e9a981dcff1780',)

I am not running over my quota limits, and simply restarting nuetron-server is enough to get things working again.

I've seen this in the middle of a script I have that builds up iterations of a network, having 1 router connected with
2 subnets each having one VM attached. I've also seen this after cleaning up my setup with some shell commands (the
first net create fails).

I didn't find any open questions/bugs in my search. Has anyone else seen anything similar? Ideas on how to debug
when I hit it again?

Thanks,
JamO

Question information

Language:
English Edit question
Status:
Answered
For:
neutron Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
ZhiQiang Fan (aji-zqfan) said :
#1

can you provide a full stack trace of this error? thanks

Revision history for this message
James Luhrsen (jamo) said :
#2

Here's the full trace:

2013-10-03 12:17:22.150 22231 ERROR neutron.api.v2.resource [-] create failed
2013-10-03 12:17:22.150 22231 TRACE neutron.api.v2.resource Traceback (most recent call last):
2013-10-03 12:17:22.150 22231 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/api/v2/resource.py", line 82, in resource
2013-10-03 12:17:22.150 22231 TRACE neutron.api.v2.resource result = method(request=request, **args)
2013-10-03 12:17:22.150 22231 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/api/v2/base.py", line 373, in create
2013-10-03 12:17:22.150 22231 TRACE neutron.api.v2.resource **kwargs)
2013-10-03 12:17:22.150 22231 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/quota.py", line 283, in limit_check
2013-10-03 12:17:22.150 22231 TRACE neutron.api.v2.resource self._resources, values)
2013-10-03 12:17:22.150 22231 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/db/quota_db.py", line 174, in limit_check
2013-10-03 12:17:22.150 22231 TRACE neutron.api.v2.resource quotas = self._get_quotas(context, tenant_id, resources, values.keys())
2013-10-03 12:17:22.150 22231 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/db/quota_db.py", line 141, in _get_quotas
2013-10-03 12:17:22.150 22231 TRACE neutron.api.v2.resource context, sub_resources, tenant_id)
2013-10-03 12:17:22.150 22231 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/db/quota_db.py", line 60, in get_tenant_quotas
2013-10-03 12:17:22.150 22231 TRACE neutron.api.v2.resource tenant_quota.update((q['resource'], q['limit']) for q in q_qry)
2013-10-03 12:17:22.150 22231 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2349, in __iter__
2013-10-03 12:17:22.150 22231 TRACE neutron.api.v2.resource return self._execute_and_instances(context)
2013-10-03 12:17:22.150 22231 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2364, in _execute_and_instances
2013-10-03 12:17:22.150 22231 TRACE neutron.api.v2.resource result = conn.execute(querycontext.statement, self._params)
2013-10-03 12:17:22.150 22231 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 662, in execute
2013-10-03 12:17:22.150 22231 TRACE neutron.api.v2.resource params)
2013-10-03 12:17:22.150 22231 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 761, in _execute_clauseelement
2013-10-03 12:17:22.150 22231 TRACE neutron.api.v2.resource compiled_sql, distilled_params
2013-10-03 12:17:22.150 22231 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 874, in _execute_context
2013-10-03 12:17:22.150 22231 TRACE neutron.api.v2.resource context)
2013-10-03 12:17:22.150 22231 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1024, in _handle_dbapi_exception
2013-10-03 12:17:22.150 22231 TRACE neutron.api.v2.resource exc_info
2013-10-03 12:17:22.150 22231 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 195, in raise_from_cause
2013-10-03 12:17:22.150 22231 TRACE neutron.api.v2.resource reraise(type(exception), exception, tb=exc_tb)
2013-10-03 12:17:22.150 22231 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 867, in _execute_context
2013-10-03 12:17:22.150 22231 TRACE neutron.api.v2.resource context)
2013-10-03 12:17:22.150 22231 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 324, in do_execute
2013-10-03 12:17:22.150 22231 TRACE neutron.api.v2.resource cursor.execute(statement, parameters)
2013-10-03 12:17:22.150 22231 TRACE neutron.api.v2.resource OperationalError: (OperationalError) no such table: quotas u'SELECT quotas.id AS quotas_id, quotas.tenant_id AS quotas_tenant_id, quotas.resource AS quotas_resource, quotas."limit" AS quotas_limit \nFROM quotas \nWHERE quotas.tenant_id = ?' (u'8b313a5239594f40a7c597233b762982',)

Revision history for this message
ZhiQiang Fan (aji-zqfan) said :
#3

can you provider the sql_connection option in neutron.conf (please mask the real value of name and password)

Revision history for this message
lee jian (leejian0612) said :
#4

In devstack,I meet the same question.According to the log information,I look up the ovs_neutron db,and do not find a table named quotas,to solve this problem,you can try to created a quotas table in ovs_neutron with some entries liking id tenant_id and so on,or you can just change source code to jump quotas check as below:
/neutron/api/v2/base.py
                 def create():
                  ....
                        else:
 line 373 #quota.QUOTAS.limit_check(request.context,
 line 374 # item[self._resource]['tenant_id'],
 line 375 # **kwargs)
 line 376 pass
I really want to know what cause this qusestion,and hoping a better solution.

Revision history for this message
Santosh Parihar (santosh-parihar8) said :
#5

Hi Experts,

This issue comes only when some testing is going to be done through automated Script.
If you run manually , issue is not reproducible at all.

Any update of this .

Regards
Santosh Kumar

Can you help with this problem?

Provide an answer of your own, or ask James Luhrsen for more information if necessary.

To post a message you must log in.