[Rdo-list] neutron database migration failed

Ihar Hrachyshka ihrachys at redhat.com
Wed Jan 13 13:07:18 UTC 2016


FYI was fixed by https://review.openstack.org/#/c/253150/

Hui Kang <hkang.sunysb at gmail.com> wrote:

> Hi, I installed openstack neutron package from rdo. My OS is centos
> 7.1. The neutron database migration fails these days. The error output
> is
>
> NFO  [alembic.runtime.migration] Running upgrade 5498d17be016 ->
> 2a16083502f3, Metaplugin removal
> INFO  [alembic.runtime.migration] Running upgrade 2a16083502f3 ->
> 2e5352a0ad4d, Add missing foreign keys
> INFO  [alembic.runtime.migration] Running upgrade 2e5352a0ad4d ->
> 11926bcfe72d, add geneve ml2 type driver
> INFO  [alembic.runtime.migration] Running upgrade 11926bcfe72d ->
> 4af11ca47297, Drop cisco monolithic tables
> INFO  [alembic.runtime.migration] Running upgrade 4af11ca47297 ->
> 1b294093239c, Drop embrane plugin table
> INFO  [alembic.runtime.migration] Running upgrade 1b294093239c,
> 32e5974ada25 -> 8a6d8bdae39, standardattributes migration
> Traceback (most recent call last):
>   File "/var/lib/kolla/venv/bin/neutron-db-manage", line 10, in <module>
>     sys.exit(main())
>   File "/var/lib/kolla/venv/lib/python2.7/site-packages/neutron/db/migration/cli.py",
> line 692, in main
>     CONF.command.func(config, CONF.command.name)
>   File "/var/lib/kolla/venv/lib/python2.7/site-packages/neutron/db/migration/cli.py",
> line 217, in do_upgrade
>     desc=branch, sql=CONF.command.sql)
>   File "/var/lib/kolla/venv/lib/python2.7/site-packages/neutron/db/migration/cli.py",
> line 124, in do_alembic_command
>     getattr(alembic_command, cmd)(config, *args, **kwargs)
>   File "/var/lib/kolla/venv/lib/python2.7/site-packages/alembic/command.py",
> line 174, in upgrade
>     script.run_env()
>   File "/var/lib/kolla/venv/lib/python2.7/site-packages/alembic/script/base.py",
> line 397, in run_env
>     util.load_python_file(self.dir, 'env.py')
>   File "/var/lib/kolla/venv/lib/python2.7/site-packages/alembic/util/pyfiles.py",
> line 81, in load_python_file
>     module = load_module_py(module_id, path)
>   File "/var/lib/kolla/venv/lib/python2.7/site-packages/alembic/util/compat.py",
> line 79, in load_module_py
>     mod = imp.load_source(module_id, path, fp)
>   File "/var/lib/kolla/venv/lib/python2.7/site-packages/neutron/db/migration/alembic_migrations/env.py",
> line 135, in <module>
>     run_migrations_online()
>   File "/var/lib/kolla/venv/lib/python2.7/site-packages/neutron/db/migration/alembic_migrations/env.py",
> line 125, in run_migrations_online
>     context.run_migrations()
>   File "<string>", line 8, in run_migrations
>   File "/var/lib/kolla/venv/lib/python2.7/site-packages/alembic/runtime/environment.py",
> line 797, in run_migrations
>     self.get_context().run_migrations(**kw)
>   File "/var/lib/kolla/venv/lib/python2.7/site-packages/alembic/runtime/migration.py",
> line 312, in run_migrations
>     step.migration_fn(**kw)
>   File "/var/lib/kolla/venv/lib/python2.7/site-packages/neutron/db/migration/alembic_migrations/versions/mitaka/contract/8a6d8bdae39_migrate_neutron_resources_table.py",
> line 60, in upgrade
>     existing_server_default=False)
>   File "<string>", line 8, in alter_column
>   File "<string>", line 3, in alter_column
>   File "/var/lib/kolla/venv/lib/python2.7/site-packages/alembic/operations/ops.py",
> line 1414, in alter_column
>     return operations.invoke(alt)
>   File "/var/lib/kolla/venv/lib/python2.7/site-packages/alembic/operations/base.py",
> line 318, in invoke
>     return fn(self, operation)
>   File "/var/lib/kolla/venv/lib/python2.7/site-packages/alembic/operations/toimpl.py",
> line 53, in alter_column
>     **operation.kw
>   File "/var/lib/kolla/venv/lib/python2.7/site-packages/alembic/ddl/mysql.py",
> line 66, in alter_column
>     else existing_autoincrement
>   File "/var/lib/kolla/venv/lib/python2.7/site-packages/alembic/ddl/impl.py",
> line 118, in _exec
>     return conn.execute(construct, *multiparams, **params)
>   File "/var/lib/kolla/venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py",
> line 914, in execute
>     return meth(self, multiparams, params)
>   File "/var/lib/kolla/venv/lib/python2.7/site-packages/sqlalchemy/sql/ddl.py",
> line 68, in _execute_on_connection
>     return connection._execute_ddl(self, multiparams, params)
>   File "/var/lib/kolla/venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py",
> line 968, in _execute_ddl
>     compiled
>   File "/var/lib/kolla/venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py",
> line 1146, in _execute_context
>     context)
>   File "/var/lib/kolla/venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py",
> line 1337, in _handle_dbapi_exception
>     util.raise_from_cause(newraise, exc_info)
>   File "/var/lib/kolla/venv/lib/python2.7/site-packages/sqlalchemy/util/compat.py",
> line 199, in raise_from_cause
>     reraise(type(exception), exception, tb=exc_tb)
>   File "/var/lib/kolla/venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py",
> line 1139, in _execute_context
>     context)
>   File "/var/lib/kolla/venv/lib/python2.7/site-packages/sqlalchemy/engine/default.py",
> line 450, in do_execute
>     cursor.execute(statement, parameters)
>   File "/var/lib/kolla/venv/lib/python2.7/site-packages/MySQLdb/cursors.py",
> line 205, in execute
>     self.errorhandler(self, exc, value)
>   File "/var/lib/kolla/venv/lib/python2.7/site-packages/MySQLdb/connections.py",
> line 36, in defaulterrorhandler
>     raise errorclass, errorvalue
> sqlalchemy.exc.OperationalError: (_mysql_exceptions.OperationalError)
> (1832, "Cannot change column 'standard_attr_id': used in a foreign key
> constraint 'ports_ibfk_2'") [SQL: u'ALTER TABLE ports MODIFY
> standard_attr_id BIGINT NOT NULL']
>
> Is there anything wrong with the neutron rpm in RDO? Thanks. - Hui
>
> _______________________________________________
> Rdo-list mailing list
> Rdo-list at redhat.com
> https://www.redhat.com/mailman/listinfo/rdo-list
>
> To unsubscribe: rdo-list-unsubscribe at redhat.com




More information about the dev mailing list