yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #04626
[Bug 1209151] Re: db migration (lbaas_pool_scheduler) failed
** Changed in: neutron
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1209151
Title:
db migration (lbaas_pool_scheduler) failed
Status in OpenStack Neutron (virtual network service):
Fix Released
Bug description:
The following error occurred when I run devstack with ryu plugin.
2013-08-07 08:47:16 INFO [alembic.migration] Running upgrade 2032abe8edac -> 52c5e4a18807, LBaaS Pool scheduler
2013-08-07 08:47:16 Traceback (most recent call last):
2013-08-07 08:47:16 File "/usr/local/bin/neutron-db-manage", line 10, in <module>
2013-08-07 08:47:16 sys.exit(main())
2013-08-07 08:47:16 File "/opt/stack/neutron/neutron/db/migration/cli.py", line 140, in main
2013-08-07 08:47:16 CONF.command.func(config, CONF.command.name)
2013-08-07 08:47:16 File "/opt/stack/neutron/neutron/db/migration/cli.py", line 77, in do_upgrade_downgrade
2013-08-07 08:47:16 do_alembic_command(config, cmd, revision, sql=CONF.command.sql)
2013-08-07 08:47:16 File "/opt/stack/neutron/neutron/db/migration/cli.py", line 56, in do_alembic_command
2013-08-07 08:47:16 getattr(alembic_command, cmd)(config, *args, **kwargs)
2013-08-07 08:47:16 File "/usr/local/lib/python2.7/dist-packages/alembic/command.py", line 123, in upgrade
2013-08-07 08:47:16 script.run_env()
2013-08-07 08:47:16 File "/usr/local/lib/python2.7/dist-packages/alembic/script.py", line 193, in run_env
2013-08-07 08:47:16 util.load_python_file(self.dir, 'env.py')
2013-08-07 08:47:16 File "/usr/local/lib/python2.7/dist-packages/alembic/util.py", line 177, in load_python_file
2013-08-07 08:47:16 module = imp.load_source(module_id, path, open(path, 'rb'))
2013-08-07 08:47:16 File "/opt/stack/neutron/neutron/db/migration/alembic_migrations/env.py", line 102, in <module>
2013-08-07 08:47:16 run_migrations_online()
2013-08-07 08:47:16 File "/opt/stack/neutron/neutron/db/migration/alembic_migrations/env.py", line 86, in run_migrations_online
2013-08-07 08:47:16 options=build_options())
2013-08-07 08:47:16 File "<string>", line 7, in run_migrations
2013-08-07 08:47:16 File "/usr/local/lib/python2.7/dist-packages/alembic/environment.py", line 536, in run_migrations
2013-08-07 08:47:16 self.get_context().run_migrations(**kw)
2013-08-07 08:47:16 File "/usr/local/lib/python2.7/dist-packages/alembic/migration.py", line 220, in run_migrations
2013-08-07 08:47:16 change(**kw)
2013-08-07 08:47:16 File "/opt/stack/neutron/neutron/db/migration/alembic_migrations/versions/52c5e4a18807_lbaas_pool_scheduler.py", line 45, in upgrade
2013-08-07 08:47:16 sa.PrimaryKeyConstraint('pool_id')
2013-08-07 08:47:16 File "<string>", line 7, in create_table
2013-08-07 08:47:16 File "/usr/local/lib/python2.7/dist-packages/alembic/operations.py", line 628, in create_table
2013-08-07 08:47:16 self._table(name, *columns, **kw)
2013-08-07 08:47:16 File "/usr/local/lib/python2.7/dist-packages/alembic/ddl/impl.py", line 148, in create_table
2013-08-07 08:47:16 self._exec(schema.CreateTable(table))
2013-08-07 08:47:16 File "/usr/local/lib/python2.7/dist-packages/alembic/ddl/impl.py", line 75, in _exec
2013-08-07 08:47:16 conn.execute(construct, *multiparams, **params)
2013-08-07 08:47:16 File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1449, in execute
2013-08-07 08:47:16 params)
2013-08-07 08:47:16 File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1542, in _execute_ddl
2013-08-07 08:47:16 compiled
2013-08-07 08:47:16 File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1698, in _execute_context
2013-08-07 08:47:16 context)
2013-08-07 08:47:16 File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1691, in _execute_context
2013-08-07 08:47:16 context)
2013-08-07 08:47:16 File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 331, in do_execute
2013-08-07 08:47:16 cursor.execute(statement, parameters)
2013-08-07 08:47:16 File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute
2013-08-07 08:47:16 self.errorhandler(self, exc, value)
2013-08-07 08:47:16 File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
2013-08-07 08:47:16 raise errorclass, errorvalue
2013-08-07 08:47:16 sqlalchemy.exc.OperationalError: (OperationalError) (1005, "Can't create table 'ovs_neutron.poolloadbalanceragentbindings' (errno: 150)") '\nCREATE TABLE poolloadbalanceragentbindings (\n\tpool_id VARCHAR(36) NOT NULL, \n\tloadbalancer_agent_id VARCHAR(36) NOT NULL, \n\tPRIMARY KEY (pool_id), \n\tFOREIGN KEY(loadbalancer_agent_id) REFERENCES agents (id) ON DELETE CASCADE, \n\tFOREIGN KEY(pool_id) REFERENCES pools (id) ON DELETE CASCADE\n)\n\n' ()
poolloadbalanceragentbindings table created by 52c5e4a18807_lbaas_pool_scheduler.py refer to agents table.
agents table is created by 511471cc46b_agent_ext_model_supp.py.
When uses ryu plugin, 511471cc46b_agent_ext_model_supp.py does not create tables.
Therefore, 52c5e4a18807_lbaas_pool_scheduler.py will fail.
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1209151/+subscriptions