Enums do not have names in some migration

Bug #1243652 reported by Ann Taraday
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Ann Taraday

Bug Description

Enums must contain name parameter for PostgreSQL

File "/opt/stack/neutron/neutron/db/migration/alembic_migrations/versions/c88b6b5fea3_cisco_n1kv_tables.py", line 90, in upgrade
    sa.PrimaryKeyConstraint('tenant_id', 'profile_id')
  File "<string>", line 7, in create_table
  File "/opt/stack/neutron/.tox/py27/local/lib/python2.7/site-packages/alembic/operations.py", line 631, in create_table
    self._table(name, *columns, **kw)
  File "/opt/stack/neutron/.tox/py27/local/lib/python2.7/site-packages/alembic/ddl/impl.py", line 148, in create_table
    _ddl_runner=self)
  File "/opt/stack/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/event.py", line 389, in __call__
    fn(*args, **kw)
  File "/opt/stack/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 293, in __call__
    return getattr(self.target, self.name)(*arg, **kw)
  File "/opt/stack/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/types.py", line 1835, in _on_table_create
    t._on_table_create(target, bind, **kw)
  File "/opt/stack/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/dialects/postgresql/base.py", line 576, in _on_table_create
    self.create(bind=bind, checkfirst=checkfirst)
  File "/opt/stack/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/dialects/postgresql/base.py", line 527, in create
    bind.execute(CreateEnumType(self))
  File "/opt/stack/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1449, in execute
    params)
  File "/opt/stack/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1536, in _execute_ddl
    compiled = ddl.compile(dialect=dialect)
  File "/opt/stack/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/sql/expression.py", line 1778, in compile
    return self._compiler(dialect, bind=bind, **kw)
  File "/opt/stack/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/schema.py", line 2927, in _compiler
    return dialect.ddl_compiler(dialect, self, **kw)
  File "/opt/stack/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 705, in __init__
    self.string = self.process(self.statement)
  File "/opt/stack/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 724, in process
    return obj._compiler_dispatch(self, **kwargs)
  File "/opt/stack/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/sql/visitors.py", line 72, in _compiler_dispatch
    return getter(visitor)(self, **kw)
  File "/opt/stack/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/dialects/postgresql/base.py", line 757, in visit_create_enum_type
    self.preparer.format_type(type_),
  File "/opt/stack/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/dialects/postgresql/base.py", line 898, in format_type
    raise exc.CompileError("Postgresql ENUM type requires a name.")
CompileError: Postgresql ENUM type requires a name.

Tags: db
Changed in neutron:
assignee: nobody → Ann Kamyshnikova (akamyshnikova)
tags: added: db
Changed in neutron:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/53332

Changed in neutron:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/53332
Committed: http://github.com/openstack/neutron/commit/b9ddfa566c6caad2384c791d1ae1873ce70c261e
Submitter: Jenkins
Branch: master

commit b9ddfa566c6caad2384c791d1ae1873ce70c261e
Author: Ann Kamyshnikova <email address hidden>
Date: Wed Oct 23 15:58:35 2013 +0400

    Fix required enum's name in migration

    Enums must contain name parameter for PostgreSQL and need to be
    deleted after dropping table.

    Closes-Bug: #1243652
    Closes-Bug: #1243213

    Change-Id: I01d18ff25572bbe9e6a8b8c6ae27f250ab154734

Changed in neutron:
status: In Progress → Fix Committed
Changed in neutron:
milestone: none → icehouse-1
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: icehouse-1 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.