Got ERROR log when "nova-manage db sync"

Asked by yashiang

Dear all,
I used devstack to deploy an all-in-one openstack.
But i got the following error during installation:

+ mysql -uroot -ppassword -e 'DROP DATABASE IF EXISTS nova;'
+ mysql -uroot -ppassword -e 'CREATE DATABASE nova;'
+ /opt/stack/nova/bin/nova-manage db sync

2012-04-30 16:24:21 WARNING nova.utils [-] /usr/lib/python2.7/dist-packages/sqlalchemy/pool.py:639: SADeprecationWarning: The 'listeners' argument to Pool (and create_engine()) is deprecated. Use event.listen().
  Pool.__init__(self, creator, **kw)

2012-04-30 16:24:21 WARNING nova.utils [-] /usr/lib/python2.7/dist-packages/sqlalchemy/pool.py:145: SADeprecationWarning: Pool.add_listener is deprecated. Use event.listen()
  self.add_listener(l)

2012-04-30 16:24:48 WARNING nova.utils [-] /opt/stack/nova/nova/db/sqlalchemy/migrate_repo/versions/075_convert_bw_usage_to_store_network_id.py:49: SADeprecationWarning: useexisting is deprecated. Use extend_existing.
  useexisting=True)

2012-04-30 16:24:55 WARNING nova.utils [-] /opt/stack/nova/nova/db/sqlalchemy/migrate_repo/versions/081_drop_instance_id_bw_cache.py:40: SADeprecationWarning: useexisting is deprecated. Use extend_existing.
  useexisting=True)

Command failed, please check log for more info
2012-04-30 16:24:57 CRITICAL nova [-] (OperationalError) (1025, "Error on rename of './nova/#sql-137d_29' to './nova/dns_domains' (errno: 150)") 'ALTER TABLE dns_domains Engine=InnoDB' ()
2012-04-30 16:24:57 TRACE nova Traceback (most recent call last):
2012-04-30 16:24:57 TRACE nova File "/opt/stack/nova/bin/nova-manage", line 1753, in <module>
2012-04-30 16:24:57 TRACE nova main()
2012-04-30 16:24:57 TRACE nova File "/opt/stack/nova/bin/nova-manage", line 1740, in main
2012-04-30 16:24:57 TRACE nova fn(*fn_args, **fn_kwargs)
2012-04-30 16:24:57 TRACE nova File "/opt/stack/nova/bin/nova-manage", line 1106, in sync
2012-04-30 16:24:57 TRACE nova return migration.db_sync(version)
2012-04-30 16:24:57 TRACE nova File "/opt/stack/nova/nova/db/migration.py", line 30, in db_sync
2012-04-30 16:24:57 TRACE nova return IMPL.db_sync(version=version)
2012-04-30 16:24:57 TRACE nova File "/opt/stack/nova/nova/db/sqlalchemy/migration.py", line 83, in db_sync
2012-04-30 16:24:57 TRACE nova return versioning_api.upgrade(get_engine(), repository, version)
2012-04-30 16:24:57 TRACE nova File "/usr/lib/python2.7/dist-packages/migrate/versioning/api.py", line 186, in upgrade
2012-04-30 16:24:57 TRACE nova return _migrate(url, repository, version, upgrade=True, err=err, **opts)
2012-04-30 16:24:57 TRACE nova File "<string>", line 2, in _migrate
2012-04-30 16:24:57 TRACE nova File "/opt/stack/nova/nova/db/sqlalchemy/migration.py", line 39, in patched_with_engine
2012-04-30 16:24:57 TRACE nova return f(*a, **kw)
2012-04-30 16:24:57 TRACE nova File "/usr/lib/python2.7/dist-packages/migrate/versioning/api.py", line 366, in _migrate
2012-04-30 16:24:57 TRACE nova schema.runchange(ver, change, changeset.step)
2012-04-30 16:24:57 TRACE nova File "/usr/lib/python2.7/dist-packages/migrate/versioning/schema.py", line 91, in runchange
2012-04-30 16:24:57 TRACE nova change.run(self.engine, step)
2012-04-30 16:24:57 TRACE nova File "/usr/lib/python2.7/dist-packages/migrate/versioning/script/py.py", line 145, in run
2012-04-30 16:24:57 TRACE nova script_func(engine)
2012-04-30 16:24:57 TRACE nova File "/opt/stack/nova/nova/db/sqlalchemy/migrate_repo/versions/086_set_engine_mysql_innodb.py", line 33, in upgrade

2012-04-30 16:24:57 TRACE nova migrate_engine.execute("ALTER TABLE dns_domains Engine=InnoDB")
2012-04-30 16:24:57 TRACE nova File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 2297, in execute
2012-04-30 16:24:57 TRACE nova return connection.execute(statement, *multiparams, **params)
2012-04-30 16:24:57 TRACE nova File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1405, in execute
2012-04-30 16:24:57 TRACE nova params)
2012-04-30 16:24:57 TRACE nova File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1582, in _execute_text
2012-04-30 16:24:57 TRACE nova statement, parameters
2012-04-30 16:24:57 TRACE nova File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1646, in _execute_context
2012-04-30 16:24:57 TRACE nova context)
2012-04-30 16:24:57 TRACE nova File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1639, in _execute_context
2012-04-30 16:24:57 TRACE nova context)
2012-04-30 16:24:57 TRACE nova File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 330, in do_execute
2012-04-30 16:24:57 TRACE nova cursor.execute(statement, parameters)
2012-04-30 16:24:57 TRACE nova File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute
2012-04-30 16:24:57 TRACE nova self.errorhandler(self, exc, value)
2012-04-30 16:24:57 TRACE nova File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
2012-04-30 16:24:57 TRACE nova raise errorclass, errorvalue
2012-04-30 16:24:57 TRACE nova OperationalError: (OperationalError) (1025, "Error on rename of './nova/#sql-137d_29' to './nova/dns_domains' (errno: 150)") 'ALTER TABLE dns_domains Engine=InnoDB' ()
2012-04-30 16:24:57 TRACE nova
++ failed
++ local r=1
++ set +o xtrace

Can anyone help me to solve this problem?

Thanks!!

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
yong sheng gong
Solved:
Last query:
Last reply:
Revision history for this message
Best yong sheng gong (gongysh) said :
#1

maybe this bug is related to your question.
https://bugs.launchpad.net/nova/+bug/991672

So seems best way is to drop previous nova database first.

Revision history for this message
yashiang (yashiang1986) said :
#2

Thanks yong sheng gong, that solved my question.

Revision history for this message
Mohsen Ibrahim (mohsen47) said :
#3

That didn't solve the problem for me please advice.