No such table error in quantum server.log

Asked by Rashmi

Hi,
I am working on QUantum configuration on Folsom and I see the below error in /var/log/quantum/server.log
Has anyone run into the same issue. How may I fix this.
Also when i run-->

*************************************************************************************************************
# quantum net-list
Request Failed: internal server error while processing your request.
*************************************************************************************************************
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1698, in _execute_context
    context)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1691, in _execute_context
    context)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 331, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (OperationalError) no such table: networks u'SELECT networks.tenant_id AS networks_tenant_id, networks.id AS networks_id, networks.name AS networks_name, networks.status AS networks_status, networks.admin_state_up AS networks_admin_state_up, networks.shared AS networks_shared \nFROM networks LEFT OUTER JOIN externalnetworks ON networks.id = externalnetworks.network_id' ()
2012-12-05 17:26:51 DEBUG [eventlet.wsgi.server] 10.1.1.228 - - [05/Dec/2012 17:26:51] "GET //v2.0/networks.json?router%3Aexternal=True HTTP/1.1" 500 215 0.059018
2012-12-05 17:26:54 DEBUG [keystone.middleware.auth_token] Authenticating user token
2012-12-05 17:26:54 DEBUG [keystone.middleware.auth_token] Removing headers from request environment: X-Identity-Status,X-Tenant-Id,X-Tenant-Name,X-User-Id,X-User-Name,X-Roles,X-Service-Catalog,X-User,X-Tenant,X-Role
2012-12-05 17:26:54 DEBUG [routes.middleware] No route matched for GET /networks.json
2012-12-05 17:26:54 DEBUG [routes.middleware] Matched GET /networks.json
2012-12-05 17:26:54 DEBUG [routes.middleware] Route path: '/networks{.format}', defaults: {'action': u'index', 'controller': wsgify(quantum.api.v2.resource.resource, RequestClass=<class 'quantum.api.v2.resource.Request'>)}
2012-12-05 17:26:54 DEBUG [routes.middleware] Match dict: {'action': u'index', 'controller': wsgify(quantum.api.v2.resource.resource, RequestClass=<class 'quantum.api.v2.resource.Request'>), 'format': u'json'}
2012-12-05 17:26:54 ERROR [quantum.api.v2.resource] index failed
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/quantum/api/v2/resource.py", line 95, in resource
    result = method(request=request, **args)
  File "/usr/lib/python2.7/dist-packages/quantum/api/v2/base.py", line 198, in index
    return self._items(request, True)
  File "/usr/lib/python2.7/dist-packages/quantum/api/v2/base.py", line 168, in _items
    obj_list = obj_getter(request.context, **kwargs)
  File "/usr/lib/python2.7/dist-packages/quantum/plugins/openvswitch/ovs_quantum_plugin.py", line 471, in get_networks
    None)
  File "/usr/lib/python2.7/dist-packages/quantum/db/db_base_plugin_v2.py", line 930, in get_networks
    filters=filters, fields=fields)
  File "/usr/lib/python2.7/dist-packages/quantum/db/db_base_plugin_v2.py", line 214, in _get_collection
    return [dict_func(c, fields) for c in collection.all()]
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2115, in all
    return list(self)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2227, in __iter__
    return self._execute_and_instances(context)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2242, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1449, in execute
    params)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1584, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1698, in _execute_context
    context)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1691, in _execute_context
    context)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 331, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (OperationalError) no such table: networks u'SELECT networks.tenant_id AS networks_tenant_id, networks.id AS networks_id, networks.name AS networks_name, networks.status AS networks_status, networks.admin_state_up AS networks_admin_state_up, networks.shared AS networks_shared \nFROM networks LEFT OUTER JOIN externalnetworks ON networks.id = externalnetworks.network_id' ()
2012-12-05 17:26:54 DEBUG [eventlet.wsgi.server] 10.1.1.228 - - [05/Dec/2012 17:26:54] "GET //v2.0/networks.json?router%3Aexternal=True HTTP/1.1" 500 215 0.059234

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
yong sheng gong (gongysh) said :
#1

I run into this problem before. Does it happen frequently? or always on your env?

Revision history for this message
Rashmi (rushmep3) said :
#2

I have run into this problem before and it was fixed when I dropped the quantum database and recreate it and restart the services.
This is a new environment and I am facing the same issue even after trying to drop the database and recreate it. I want to understand why I run into this issue often.
It would be great to know how you got it fixed.

Revision history for this message
dan wendlandt (danwent) said :
#3

 I wonder if you first ran quantum with a plugin that did NOT support the quantum "router" extension, then restarted with a plugin that did support it. I'm guessing it is the externalnetworks table that is not found, and that is specific to a plugin that has the "router" extension. Did you switch the plugin you were using?

Revision history for this message
Rashmi (rushmep3) said :
#4

I have always run the OVS plugin for quantum. Would creating the table help in this case?
Just curious to know, what plugins do not support the router extension.

Revision history for this message
dan wendlandt (danwent) said :
#5

i would simply stop quantum-server, drop the ovs_quantum database from mysql, and the start quantum-server

obviously this will destroy all existing networks + ports, but i'm assuming you're in a test setup.

Can you help with this problem?

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

To post a message you must log in.