← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1354195] Re: Migration fails on downgrade

 

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

Title:
  Migration fails on downgrade

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

Bug description:
  Happens if the healing step has been executed or load balancing is
  enabled and if the downgrade target revision is havana or earlier.

  Traceback (most recent call last):
    File "/usr/local/bin/neutron-db-manage", line 10, in <module>
      sys.exit(main())
    File "/opt/stack/neutron/neutron/db/migration/cli.py", line 175, in main
      CONF.command.func(config, CONF.command.name)
    File "/opt/stack/neutron/neutron/db/migration/cli.py", line 85, in do_upgrade_downgrade
      do_alembic_command(config, cmd, revision, sql=CONF.command.sql)
    File "/opt/stack/neutron/neutron/db/migration/cli.py", line 63, in do_alembic_command
      getattr(alembic_command, cmd)(config, *args, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/alembic/command.py", line 151, in downgrade
      script.run_env()
    File "/usr/local/lib/python2.7/dist-packages/alembic/script.py", line 203, in run_env
      util.load_python_file(self.dir, 'env.py')
    File "/usr/local/lib/python2.7/dist-packages/alembic/util.py", line 212, in load_python_file
      module = load_module_py(module_id, path)
    File "/usr/local/lib/python2.7/dist-packages/alembic/compat.py", line 58, in load_module_py
      mod = imp.load_source(module_id, path, fp)
    File "/opt/stack/neutron/neutron/db/migration/alembic_migrations/env.py", line 125, in <module>
      run_migrations_online()
    File "/opt/stack/neutron/neutron/db/migration/alembic_migrations/env.py", line 109, in run_migrations_online
      options=build_options())
    File "<string>", line 7, in run_migrations
    File "/usr/local/lib/python2.7/dist-packages/alembic/environment.py", line 688, in run_migrations
      self.get_context().run_migrations(**kw)
    File "/usr/local/lib/python2.7/dist-packages/alembic/migration.py", line 258, in run_migrations
      change(**kw)
    File "/opt/stack/neutron/neutron/db/migration/alembic_migrations/versions/e197124d4b9_add_unique_constrain.py", line 62, in downgrade
      type_='unique'
    File "<string>", line 7, in drop_constraint
    File "<string>", line 1, in <lambda>
    File "/usr/local/lib/python2.7/dist-packages/alembic/util.py", line 329, in go
      return fn(*arg, **kw)
    File "/usr/local/lib/python2.7/dist-packages/alembic/operations.py", line 841, in drop_constraint
      self.impl.drop_constraint(const)
    File "/usr/local/lib/python2.7/dist-packages/alembic/ddl/impl.py", line 138, in drop_constraint
      self._exec(schema.DropConstraint(const))
    File "/usr/local/lib/python2.7/dist-packages/alembic/ddl/impl.py", line 76, in _exec
      conn.execute(construct, *multiparams, **params)
    File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 727, in execute
      return meth(self, multiparams, params)
    File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/ddl.py", line 67, in _execute_on_connection
      return connection._execute_ddl(self, multiparams, params)
    File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 781, in _execute_ddl
      compiled
    File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 954, in _execute_context
      context)
    File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1116, in _handle_dbapi_exception
      exc_info
    File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 189, in raise_from_cause
      reraise(type(exception), exception, tb=exc_tb)
    File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 947, in _execute_context
      context)
    File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 435, in do_execute
      cursor.execute(statement, parameters)
    File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute
      self.errorhandler(self, exc, value)
    File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
      raise errorclass, errorvalue
  sqlalchemy.exc.OperationalError: (OperationalError) (1553, "Cannot drop index 'uniq_member0pool_id0address0port': needed in a foreign key constraint") 'ALTER TABLE members DROP INDEX uniq_member0pool_id0address0port' ()

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


References