Running "gbp-db-manage --config-file /etc/neutron/neutron.conf upgrade head" on a system using postgresql for the database currently fails in "97ac978118c6_nsp_fix_constraints.py" with this error:
Traceback (most recent call last):
File "/usr/bin/gbp-db-manage", line 10, in <module>
sys.exit(main())
File "/usr/lib/python2.7/site-packages/gbpservice/neutron/db/migration/cli.py", line 24, in main
CONF.command.func(config, CONF.command.name)
File "/usr/lib/python2.7/site-packages/neutron/db/migration/cli.py", line 201, in do_upgrade
desc=branch, sql=CONF.command.sql)
File "/usr/lib/python2.7/site-packages/neutron/db/migration/cli.py", line 108, in do_alembic_command
getattr(alembic_command, cmd)(config, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/alembic/command.py", line 174, in upgrade
script.run_env()
File "/usr/lib/python2.7/site-packages/alembic/script/base.py", line 397, in run_env
util.load_python_file(self.dir, 'env.py')
File "/usr/lib/python2.7/site-packages/alembic/util/pyfiles.py", line 81, in load_python_file
module = load_module_py(module_id, path)
File "/usr/lib/python2.7/site-packages/alembic/util/compat.py", line 79, in load_module_py
mod = imp.load_source(module_id, path, fp)
File "/usr/lib/python2.7/site-packages/gbpservice/neutron/db/migration/alembic_migrations/env.py", line 89, in <module>
run_migrations_online()
File "/usr/lib/python2.7/site-packages/gbpservice/neutron/db/migration/alembic_migrations/env.py", line 80, in run_migrations_online
context.run_migrations()
File "<string>", line 8, in run_migrations
File "/usr/lib/python2.7/site-packages/alembic/runtime/environment.py", line 797, in run_migrations
self.get_context().run_migrations(**kw)
File "/usr/lib/python2.7/site-packages/alembic/runtime/migration.py", line 312, in run_migrations
step.migration_fn(**kw)
File "/usr/lib/python2.7/site-packages/gbpservice/neutron/db/migration/alembic_migrations/versions/97ac978118c6_nsp_fix_constraints.py", line 55, in upgrade
type_='primary')
File "<string>", line 8, in drop_constraint
File "<string>", line 3, in drop_constraint
File "/usr/lib/python2.7/site-packages/alembic/operations/ops.py", line 145, in drop_constraint
return operations.invoke(op)
File "/usr/lib/python2.7/site-packages/alembic/operations/base.py", line 318, in invoke
return fn(self, operation)
File "/usr/lib/python2.7/site-packages/alembic/operations/toimpl.py", line 146, in drop_constraint
schema=operation.schema,
File "/usr/lib/python2.7/site-packages/alembic/ddl/impl.py", line 183, in drop_constraint
self._exec(schema.DropConstraint(const))
File "/usr/lib/python2.7/site-packages/alembic/ddl/impl.py", line 118, in _exec
return conn.execute(construct, *multiparams, **params)
File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 914, in execute
return meth(self, multiparams, params)
File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/ddl.py", line 68, in _execute_on_connection
return connection._execute_ddl(self, multiparams, params)
File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 962, in _execute_ddl
compiled = ddl.compile(dialect=dialect)
File "<string>", line 1, in <lambda>
File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/elements.py", line 494, in compile
return self._compiler(dialect, bind=bind, **kw)
File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/ddl.py", line 26, in _compiler
return dialect.ddl_compiler(dialect, self, **kw)
File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/compiler.py", line 190, in __init__
self.string = self.process(self.statement, **compile_kwargs)
File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/compiler.py", line 213, in process
return obj._compiler_dispatch(self, **kwargs)
File "/usr/lib64/python2.7/site-packages/sqlalchemy/ext/compiler.py", line 413, in <lambda>
lambda *arg, **kw: existing(*arg, **kw))
File "/usr/lib64/python2.7/site-packages/sqlalchemy/ext/compiler.py", line 451, in __call__
return fn(element, compiler, **kw)
File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/visitors.py", line 81, in _compiler_dispatch
return meth(self, **kw)
File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/compiler.py", line 2325, in visit_drop_constraint
"it has no name" % drop.element)
sqlalchemy.exc.CompileError: Can't emit DROP CONSTRAINT for constraint PrimaryKeyConstraint(); it has no name
Could you indicate which release of GBP and version of PostgreSQL you are using?