← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1243652] Re: Enums do not have names in some migration

 

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

Title:
  Enums do not have names in some migration

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

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.

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