发起问题

Revision history [back]

tacker 安装问题

我按照官网提示手动安装mitaka版本的tacker,当同步数据库时候遇到如下问题:

INFO [alembic.runtime.migration] Context impl MySQLImpl. INFO [alembic.runtime.migration] Will assume non-transactional DDL. INFO [alembic.runtime.migration] Running upgrade 22f5385a3d4f -> 22f5385a3d50, rename device db tables Traceback (most recent call last):

File "/usr/local/bin/tacker-db-manage", line 10, in <module> sys.exit(main())

File "/usr/local/lib/python2.7/dist-packages/tacker/db/migration/cli.py", line 153, in main CONF.command.func(config, CONF.command.name)

File "/usr/local/lib/python2.7/dist-packages/tacker/db/migration/cli.py", line 67, in do_upgrade_downgrade do_alembic_command(config, cmd, revision, sql=CONF.command.sql)

File "/usr/local/lib/python2.7/dist-packages/tacker/db/migration/cli.py", line 45, in do_alembic_command getattr(alembic_command, cmd)(config, args, *kwargs)

File "/usr/local/lib/python2.7/dist-packages/alembic/command.py", line 174, in upgrade script.run_env()

File "/usr/local/lib/python2.7/dist-packages/alembic/script/base.py", line 416, in run_env util.load_python_file(self.dir, 'env.py')

File "/usr/local/lib/python2.7/dist-packages/alembic/util/pyfiles.py", line 93, in load_python_file module = load_module_py(module_id, path)

File "/usr/local/lib/python2.7/dist-packages/alembic/util/compat.py", line 79, in load_module_py mod = imp.load_source(module_id, path, fp)

File "/usr/local/lib/python2.7/dist-packages/tacker/db/migration/alembic_migrations/env.py", line 84, in <module> run_migrations_online()

File "/usr/local/lib/python2.7/dist-packages/tacker/db/migration/alembic_migrations/env.py", line 76, in run_migrations_online context.run_migrations()

File "<string>", line 8, in run_migrations

File "/usr/local/lib/python2.7/dist-packages/alembic/runtime/environment.py", line 797, in run_migrations self.get_context().run_migrations(**kw)

File "/usr/local/lib/python2.7/dist-packages/alembic/runtime/migration.py", line 314, in run_migrations step.migration_fn(**kw)

File"/usr/local/lib/python2.7/distpackages/tacker/db/migration/alembic_migrations/versions/22f5385a3d50_rename_devicedb.py", line 36, in upgrade op.rename_table('devicetemplates', 'vnfd')

File "<string>", line 8, in rename_table

File "<string>", line 3, in rename_table

File "/usr/local/lib/python2.7/dist-packages/alembic/operations/ops.py", line 1201, in rename_table return operations.invoke(op)

File "/usr/local/lib/python2.7/dist-packages/alembic/operations/base.py", line 318, in invoke return fn(self, operation)

File "/usr/local/lib/python2.7/dist-packages/alembic/operations/toimpl.py", line 110, in rename_table schema=operation.schema)

File "/usr/local/lib/python2.7/dist-packages/alembic/ddl/impl.py", line 187, in rename_table new_table_name, schema=schema))

File "/usr/local/lib/python2.7/dist-packages/alembic/ddl/impl.py", line 118, in _exec return conn.execute(construct, multiparams, *params)

File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute return meth(self, multiparams, params)

File "/usr/lib/python2.7/dist-packages/sqlalchemy/sql/ddl.py", line 68, in _execute_on_connection return connection._execute_ddl(self, multiparams, params)

File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 968, in _execute_ddl compiled

File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context context)

File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception exc_info

File "/usr/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause reraise(type(exception), exception, tb=exc_tb)

File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context context)

File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute cursor.execute(statement, parameters)

File "/usr/lib/python2.7/dist-packages/pymysql/cursors.py", line 158, in execute result = self._query(query)

File "/usr/lib/python2.7/dist-packages/pymysql/cursors.py", line 308, in _query conn.query(q)

File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 820, in query self._affected_rows = self._read_query_result(unbuffered=unbuffered)

File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 1002, in _read_query_result result.read()

File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 1285, in read first_packet = self.connection._read_packet()

File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 966, in _read_packet packet.check_error()

File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 394, in check_error err.raise_mysql_exception(self._data)

File "/usr/lib/python2.7/dist-packages/pymysql/err.py", line 120, in raise_mysql_exception _check_mysql_exception(errinfo)

File "/usr/lib/python2.7/dist-packages/pymysql/err.py", line 112, in _check_mysql_exception raise errorclass(errno, errorvalue) sqlalchemy.exc.ProgrammingError: (pymysql.err.ProgrammingError) (1146, u"Table 'tacker.devicetemplates' doesn't exist") [SQL: u'ALTER TABLE devicetemplates RENAME TO vnfd']

请问有朋友知道怎么解决么?谢谢!