← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1610815] [NEW] fwaas db migration failure

 

Public bug reported:

INFO  [alembic.runtime.migration] Running upgrade 4202e3047e47 -> 540142f314f4, 
FWaaS router insertionTraceback (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 686, in main
    return_val |= bool(CONF.command.func(config, CONF.command.name))
  File "/opt/stack/neutron/neutron/db/migration/cli.py", line 207, in do_upgrade    desc=branch, sql=CONF.command.sql)
  File "/opt/stack/neutron/neutron/db/migration/cli.py", line 108, in do_alembic
_command    getattr(alembic_command, cmd)(config, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/alembic/command.py", line 174, in
 upgrade    script.run_env()
  File "/usr/local/lib/python2.7/dist-packages/alembic/script/base.py", line 397
, in run_env    util.load_python_file(self.dir, 'env.py')
  File "/usr/local/lib/python2.7/dist-packages/alembic/util/pyfiles.py", line 93
, in load_python_file    module = load_module_py(module_id, path)
  File "/usr/local/lib/python2.7/dist-packages/alembic/util/compat.py", line 79, in load_module_py
    mod = imp.load_source(module_id, path, fp)
  File "/opt/stack/neutron-fwaas/neutron_fwaas/db/migration/alembic_migrations/env.py", line 86, in <module>
    run_migrations_online()
  File "/opt/stack/neutron-fwaas/neutron_fwaas/db/migration/alembic_migrations/env.py", line 77, in run_migrations_online
    context.run_migrations()
  File "<string>", line 8, in run_migrations
  File "/usr/local/lib/python2.7/dist-packages/alembic/runtime/environment.py", line 797, in run_migrations
    self.get_context().run_migrations(**kw)
  File "/usr/local/lib/python2.7/dist-packages/alembic/runtime/migration.py", line 312, in run_migrations
    step.migration_fn(**kw)
  File "/opt/stack/neutron-fwaas/neutron_fwaas/db/migration/alembic_migrations/versions/540142f314f4_fwaas_router_insertion.py", line 59, in upgrade
    op.execute(SQL_STATEMENT % 'project_id')
  File "<string>", line 8, in execute
  File "<string>", line 3, in execute
  File "/usr/local/lib/python2.7/dist-packages/alembic/operations/ops.py", line 1826, in execute
    return operations.invoke(op)
  File "/usr/local/lib/python2.7/dist-packages/alembic/operations/base.py", line 318, in invoke
    return fn(self, operation)
  File "/usr/local/lib/python2.7/dist-packages/alembic/operations/toimpl.py", line 161, in execute_sql
    execution_options=operation.execution_options
  File "/usr/local/lib/python2.7/dist-packages/alembic/ddl/impl.py", line 121, in execute
    self._exec(sql, execution_options)
  File "/usr/local/lib/python2.7/dist-packages/alembic/ddl/impl.py", line 118, in _exec
    return conn.execute(construct, *multiparams, **params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1337, in _handle_dbapi_exception
    util.raise_from_cause(newraise, exc_info)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 202, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
oslo_db.exception.DBError: (psycopg2.InternalError) current transaction is aborted, commands ignored until end of transaction block
 [SQL: 'insert into firewall_router_associations select f.id as fw_id, r.id as router_id from firewalls f, routers r where f.tenant_id=r.project_id']

** Affects: neutron
     Importance: Undecided
         Status: New


** Tags: db fwaas

** Tags added: db fwaas

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1610815

Title:
  fwaas db migration failure

Status in neutron:
  New

Bug description:
  INFO  [alembic.runtime.migration] Running upgrade 4202e3047e47 -> 540142f314f4, 
  FWaaS router insertionTraceback (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 686, in main
      return_val |= bool(CONF.command.func(config, CONF.command.name))
    File "/opt/stack/neutron/neutron/db/migration/cli.py", line 207, in do_upgrade    desc=branch, sql=CONF.command.sql)
    File "/opt/stack/neutron/neutron/db/migration/cli.py", line 108, in do_alembic
  _command    getattr(alembic_command, cmd)(config, *args, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/alembic/command.py", line 174, in
   upgrade    script.run_env()
    File "/usr/local/lib/python2.7/dist-packages/alembic/script/base.py", line 397
  , in run_env    util.load_python_file(self.dir, 'env.py')
    File "/usr/local/lib/python2.7/dist-packages/alembic/util/pyfiles.py", line 93
  , in load_python_file    module = load_module_py(module_id, path)
    File "/usr/local/lib/python2.7/dist-packages/alembic/util/compat.py", line 79, in load_module_py
      mod = imp.load_source(module_id, path, fp)
    File "/opt/stack/neutron-fwaas/neutron_fwaas/db/migration/alembic_migrations/env.py", line 86, in <module>
      run_migrations_online()
    File "/opt/stack/neutron-fwaas/neutron_fwaas/db/migration/alembic_migrations/env.py", line 77, in run_migrations_online
      context.run_migrations()
    File "<string>", line 8, in run_migrations
    File "/usr/local/lib/python2.7/dist-packages/alembic/runtime/environment.py", line 797, in run_migrations
      self.get_context().run_migrations(**kw)
    File "/usr/local/lib/python2.7/dist-packages/alembic/runtime/migration.py", line 312, in run_migrations
      step.migration_fn(**kw)
    File "/opt/stack/neutron-fwaas/neutron_fwaas/db/migration/alembic_migrations/versions/540142f314f4_fwaas_router_insertion.py", line 59, in upgrade
      op.execute(SQL_STATEMENT % 'project_id')
    File "<string>", line 8, in execute
    File "<string>", line 3, in execute
    File "/usr/local/lib/python2.7/dist-packages/alembic/operations/ops.py", line 1826, in execute
      return operations.invoke(op)
    File "/usr/local/lib/python2.7/dist-packages/alembic/operations/base.py", line 318, in invoke
      return fn(self, operation)
    File "/usr/local/lib/python2.7/dist-packages/alembic/operations/toimpl.py", line 161, in execute_sql
      execution_options=operation.execution_options
    File "/usr/local/lib/python2.7/dist-packages/alembic/ddl/impl.py", line 121, in execute
      self._exec(sql, execution_options)
    File "/usr/local/lib/python2.7/dist-packages/alembic/ddl/impl.py", line 118, in _exec
      return conn.execute(construct, *multiparams, **params)
    File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
      return meth(self, multiparams, params)
    File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
      return connection._execute_clauseelement(self, multiparams, params)
    File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
      compiled_sql, distilled_params
    File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
      context)
    File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1337, in _handle_dbapi_exception
      util.raise_from_cause(newraise, exc_info)
    File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 202, in raise_from_cause
      reraise(type(exception), exception, tb=exc_tb, cause=cause)
    File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
      context)
    File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
      cursor.execute(statement, parameters)
  oslo_db.exception.DBError: (psycopg2.InternalError) current transaction is aborted, commands ignored until end of transaction block
   [SQL: 'insert into firewall_router_associations select f.id as fw_id, r.id as router_id from firewalls f, routers r where f.tenant_id=r.project_id']

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


Follow ups