Custom Search

Monday, December 2, 2013

Openstack (OperationalError) no such table: user u'SELECT user.id AS user_id, user.name AS user_name,

(root): 2013-12-02 15:25:21,590 ERROR wsgi __call__ (OperationalError) no such table: user u'SELECT user.id AS user_id, user.name AS user_name, user.extra AS user_extra \nFROM user \nWHERE user.name = ?\n LIMIT ? OFFSET ?' (u'admin', 1, 0)
Traceback (most recent call last):
  File "/opt/stack/keystone/keystone/common/wsgi.py", line 204, in __call__
    result = method(context, **params)
  File "/opt/stack/keystone/keystone/service.py", line 468, in authenticate
    context=context, user_name=username)
  File "/opt/stack/keystone/keystone/common/manager.py", line 47, in _wrapper
    return f(*args, **kw)
  File "/opt/stack/keystone/keystone/identity/backends/sql.py", line 229, in get_user_by_name
    return _filter_user(self._get_user_by_name(user_name))
  File "/opt/stack/keystone/keystone/identity/backends/sql.py", line 220, in _get_user_by_name
    user_ref = session.query(User).filter_by(name=user_name).first()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2156, in first
    ret = list(self[0:1])
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2023, in __getitem__
    return list(res)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2227, in __iter__
    return self._execute_and_instances(context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2242, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1449, in execute
    params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1584, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1698, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1691, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 331, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (OperationalError) no such table: user u'SELECT user.id AS user_id, user.name AS user_name, user.extra AS user_extra \nFROM user \nWHERE user.name = ?\n LIMIT ? OFFSET ?' (u'admin', 1, 0)
(eventlet.wsgi.server): 2013-12-02 15:25:21,610 DEBUG wsgi write 127.0.0.1 - - [02/Dec/2013 15:25:21] "POST /v2.0/tokens HTTP/1.1" 500 501 0.027258

Fix
===

1)
Following lines are missing in vim /etc/keystone/keystone.conf
[sql]
connection = mysql://root:password@127.0.0.1/keystone?charset=utf8

2)
#cd devstack_folder
#./unstack.sh
#./rejoin-stack.sh




No comments:

Post a Comment