Ask Your Question
0

Couldn't start nova-compute service due to sql error

asked 2011-01-20 08:59:17 -0500

guanxiaohua2k6 gravatar image

I tried to install the newest version(2011.1~bzr592-0ubuntu0ppa1~maverick1) from ppa. But I couldn't start nova-compute service due to the following error.

Traceback (most recent call last): File "/usr/bin/nova-compute", line 44, in <module> service.serve() File "/usr/lib/pymodules/python2.6/nova/service.py", line 228, in serve x.start() File "/usr/lib/pymodules/python2.6/nova/service.py", line 86, in start self.binary) File "/usr/lib/pymodules/python2.6/nova/db/api.py", line 132, in service_get_by_args return IMPL.service_get_by_args(context, host, binary) File "/usr/lib/pymodules/python2.6/nova/db/sqlalchemy/api.py", line 96, in wrapper return f(args, *kwargs) File "/usr/lib/pymodules/python2.6/nova/db/sqlalchemy/api.py", line 247, in service_get_by_args filter_by(deleted=can_read_deleted(context)).\ File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/query.py", line 1496, in first ret = list(self[0:1]) File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/query.py", line 1405, in __getitem__ return list(res) File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/query.py", line 1565, in __iter__ return self._execute_and_instances(context) File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/query.py", line 1570, in _execute_and_instances mapper=self._mapper_zero_or_none()) File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/session.py", line 735, in execute clause, params or {}) File "/usr/lib/python2.6/dist-packages/sqlalchemy/engine/base.py", line 1157, in execute params) File "/usr/lib/python2.6/dist-packages/sqlalchemy/engine/base.py", line 1237, in _execute_clauseelement return self.__execute_context(context) File "/usr/lib/python2.6/dist-packages/sqlalchemy/engine/base.py", line 1268, in __execute_context context.parameters[0], context=context) File "/usr/lib/python2.6/dist-packages/sqlalchemy/engine/base.py", line 1367, in _cursor_execute context) File "/usr/lib/python2.6/dist-packages/sqlalchemy/engine/base.py", line 1360, in _cursor_execute context) File "/usr/lib/python2.6/dist-packages/sqlalchemy/engine/default.py", line 288, in do_execute cursor.execute(statement, parameters) File "/usr/lib/pymodules/python2.6/MySQLdb/cursors.py", line 166, in execute self.errorhandler(self, exc, value) File "/usr/lib/pymodules/python2.6/MySQLdb/connections.py", line 35, in defaulterrorhandler raise errorclass, errorvalue sqlalchemy.exc.ProgrammingError: (ProgrammingError) (1146, "Table 'nova.services' doesn't exist") 'SELECT services.created_at AS services_created_at, services.updated_at AS services_updated_at, services.deleted_at AS services_deleted_at, services.deleted AS services_deleted, services.id AS services_id, services.host AS services_host, services.binary AS services_binary, services.topic AS services_topic, services.report_count AS services_report_count, services.disabled AS services_disabled, services.availability_zone AS services_availability_zone \nFROM services \nWHERE services.host = %s AND services.binary = %s AND services.deleted = %s \n LIMIT 0, 1' ('ubuntu7', 'nova-compute', False)

BTW, I used mysql as db server. I logged into mysql server, find there is no tables in db nova. I guessed something wrong in the installation.

Please tell me why.

Thank you.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2011-01-21 03:52:46 -0500

guanxiaohua2k6 gravatar image

Thanks Hyunsun Moon, that solved my question.

edit flag offensive delete link more
0

answered 2011-01-21 03:29:20 -0500

hyunsun-moon gravatar image

You should create DB for nova first.

mysql -p$MYSQL_PASS -e 'CREATE DATABASE nova'

and then create tables for nova. I guess this might have been updated in rev.581.

nova-manage db sync

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2011-01-20 08:59:17 -0500

Seen: 65 times

Last updated: Jan 21 '11