← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1238921] Re: DB migration upgrade/downgrade not employed for brocade-plugin

 

Reviewed:  https://review.openstack.org/51332
Committed: http://github.com/openstack/neutron/commit/9ba5b551ebfd5511f524397d5efbac0a2b07488f
Submitter: Jenkins
Branch:    milestone-proposed

commit 9ba5b551ebfd5511f524397d5efbac0a2b07488f
Author: Shiv Haris <sharis@xxxxxxxxxxx>
Date:   Fri Oct 11 16:27:53 2013 -0700

    DB migration upgrade/downgrade not employed for brocade-plugin
    
    Fixes bug: 1238921
    
    Change-Id: I441d82a92588d7318a2f3b725643bc1b050a2c9c
    (cherry picked from commit 9d01010e8826eafc48044fc4018944a34bc96ba4)


** 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/1238921

Title:
  DB migration upgrade/downgrade not employed for brocade-plugin

Status in OpenStack Neutron (virtual network service):
  Fix Released

Bug description:
  Foreign keys are being referenced by routerl3agentbinding, while the
  routers table has not been created yet:


  2013-10-11 11:40:36 INFO  [alembic.migration] Running upgrade 511471cc46b -> 3b54bf9e29f7, NEC plugin sharednet
  2013-10-11 11:40:36 INFO  [alembic.migration] Running upgrade 3b54bf9e29f7 -> 4692d074d587, agent scheduler
  2013-10-11 11:40:36 Traceback (most recent call last):
  2013-10-11 11:40:36   File "/usr/local/bin/neutron-db-manage", line 10, in <module>
  2013-10-11 11:40:36     sys.exit(main())
  2013-10-11 11:40:36   File "/opt/stack/neutron/neutron/db/migration/cli.py", line 143, in main
  2013-10-11 11:40:36     CONF.command.func(config, CONF.command.name)
  2013-10-11 11:40:36   File "/opt/stack/neutron/neutron/db/migration/cli.py", line 80, in do_upgrade_downgrade
  2013-10-11 11:40:36     do_alembic_command(config, cmd, revision, sql=CONF.command.sql)
  2013-10-11 11:40:36   File "/opt/stack/neutron/neutron/db/migration/cli.py", line 59, in do_alembic_command
  2013-10-11 11:40:36     getattr(alembic_command, cmd)(config, *args, **kwargs)
  2013-10-11 11:40:36   File "/usr/local/lib/python2.7/dist-packages/alembic/command.py", line 124, in upgrade
  2013-10-11 11:40:36     script.run_env()
  2013-10-11 11:40:36   File "/usr/local/lib/python2.7/dist-packages/alembic/script.py", line 193, in run_env
  2013-10-11 11:40:36     util.load_python_file(self.dir, 'env.py')
  2013-10-11 11:40:36   File "/usr/local/lib/python2.7/dist-packages/alembic/util.py", line 177, in load_python_file
  2013-10-11 11:40:36     module = load_module(module_id, path)
  2013-10-11 11:40:36   File "/usr/local/lib/python2.7/dist-packages/alembic/compat.py", line 39, in load_module
  2013-10-11 11:40:36     return imp.load_source(module_id, path, fp)
  2013-10-11 11:40:36   File "/opt/stack/neutron/neutron/db/migration/alembic_migrations/env.py", line 105, in <module>
  2013-10-11 11:40:36     run_migrations_online()
  2013-10-11 11:40:36   File "/opt/stack/neutron/neutron/db/migration/alembic_migrations/env.py", line 89, in run_migrations_online
  2013-10-11 11:40:36     options=build_options())
  2013-10-11 11:40:36   File "<string>", line 7, in run_migrations
  2013-10-11 11:40:36   File "/usr/local/lib/python2.7/dist-packages/alembic/environment.py", line 652, in run_migrations
  2013-10-11 11:40:36     self.get_context().run_migrations(**kw)
  2013-10-11 11:40:36   File "/usr/local/lib/python2.7/dist-packages/alembic/migration.py", line 224, in run_migrations
  2013-10-11 11:40:36     change(**kw)
  2013-10-11 11:40:36   File "/opt/stack/neutron/neutron/db/migration/alembic_migrations/versions/4692d074d587_agent_scheduler.py", line 71, in upgrade
  2013-10-11 11:40:36     sa.PrimaryKeyConstraint('id')
  2013-10-11 11:40:36   File "<string>", line 7, in create_table
  2013-10-11 11:40:36   File "/usr/local/lib/python2.7/dist-packages/alembic/operations.py", line 631, in create_table
  2013-10-11 11:40:36     self._table(name, *columns, **kw)
  2013-10-11 11:40:36   File "/usr/local/lib/python2.7/dist-packages/alembic/ddl/impl.py", line 149, in create_table
  2013-10-11 11:40:36     self._exec(schema.CreateTable(table))
  2013-10-11 11:40:36   File "/usr/local/lib/python2.7/dist-packages/alembic/ddl/impl.py", line 76, in _exec
  2013-10-11 11:40:36     conn.execute(construct, *multiparams, **params)
  2013-10-11 11:40:36   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1449, in execute
  2013-10-11 11:40:36     params)
  2013-10-11 11:40:36   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1542, in _execute_ddl
  2013-10-11 11:40:36     compiled
  2013-10-11 11:40:36   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1698, in _execute_context
  2013-10-11 11:40:36     context)
  2013-10-11 11:40:36   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1691, in _execute_context
  2013-10-11 11:40:36     context)
  2013-10-11 11:40:36   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 331, in do_execute
  2013-10-11 11:40:36     cursor.execute(statement, parameters)
  2013-10-11 11:40:36   File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute
  2013-10-11 11:40:36     self.errorhandler(self, exc, value)
  2013-10-11 11:40:36   File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
  2013-10-11 11:40:36     raise errorclass, errorvalue
  2013-10-11 11:40:36 sqlalchemy.exc.OperationalError: (OperationalError) (1005, "Can't create table 'brcd_neutron.routerl3agentbindings' (errno: 150)") '\nCREATE TABLE routerl3agentbindings (\n\tid VARCHAR(36) NOT NULL, \n\trouter_id VARCHAR(36), \n\tl3_agent_id VARCHAR(36), \n\tPRIMARY KEY (id), \n\tFOREIGN KEY(l3_agent_id) REFERENCES agents (id) ON DELETE CASCADE, \n\tFOREIGN KEY(router_id) REFERENCES routers (id) ON DELETE CASCADE\n)\n\n' ()
  2013-10-11 11:40:36 ++ failed

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1238921/+subscriptions