google-code-export / ibm-db

Automatically exported from code.google.com/p/ibm-db
1 stars 0 forks source link

OpenStack kilo: command neutron-db-manage failed on rhel7 #168

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.run command "/usr/bin/neutron-db-manage --config-file 
/etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini --config-file 
/etc/neutron/plugins/ml2/ml2_conf.ini upgrade head"
2.
3.

What is the expected output? What do you see instead?
return with no error

actual results:
.............................
INFO  [alembic.migration] Running upgrade 14be42f3d0a5 -> 16cdf118d31d, 
extra_dhcp_options IPv6 support
Traceback (most recent call last):
  File "/usr/bin/neutron-db-manage", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/site-packages/neutron/db/migration/cli.py", line 218, in main
    CONF.command.func(config, CONF.command.name)
  File "/usr/lib/python2.7/site-packages/neutron/db/migration/cli.py", line 95, in do_upgrade_downgrade
    do_alembic_command(config, cmd, revision, sql=CONF.command.sql)
  File "/usr/lib/python2.7/site-packages/neutron/db/migration/cli.py", line 72, in do_alembic_command
    getattr(alembic_command, cmd)(config, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/alembic/command.py", line 165, in upgrade
    script.run_env()
  File "/usr/lib/python2.7/site-packages/alembic/script.py", line 382, in run_env
    util.load_python_file(self.dir, 'env.py')
  File "/usr/lib/python2.7/site-packages/alembic/util.py", line 241, in load_python_file
    module = load_module_py(module_id, path)
  File "/usr/lib/python2.7/site-packages/alembic/compat.py", line 79, in load_module_py
    mod = imp.load_source(module_id, path, fp)
  File "/usr/lib/python2.7/site-packages/neutron/db/migration/alembic_migrations/env.py", line 116, in <module>
    run_migrations_online()
  File "/usr/lib/python2.7/site-packages/neutron/db/migration/alembic_migrations/env.py", line 107, in run_migrations_online
    context.run_migrations()
  File "<string>", line 7, in run_migrations
  File "/usr/lib/python2.7/site-packages/alembic/environment.py", line 742, in run_migrations
    self.get_context().run_migrations(**kw)
  File "/usr/lib/python2.7/site-packages/alembic/migration.py", line 305, in run_migrations
    step.migration_fn(**kw)
  File "/usr/lib/python2.7/site-packages/neutron/db/migration/alembic_migrations/versions/16cdf118d31d_extra_dhcp_options_ipv6_support.py", line 43, in upgrade
    type_='unique'
  File "<string>", line 7, in drop_constraint
  File "<string>", line 1, in <lambda>
  File "/usr/lib/python2.7/site-packages/alembic/util.py", line 386, in go
    return fn(*arg, **kw)
  File "/usr/lib/python2.7/site-packages/alembic/operations.py", line 1084, in drop_constraint
    self.impl.drop_constraint(const)
  File "/usr/lib/python2.7/site-packages/alembic/ddl/impl.py", line 171, in drop_constraint
    self._exec(schema.DropConstraint(const))
  File "/usr/lib/python2.7/site-packages/ibm_db_alembic/ibm_db.py", line 39, in _exec
    result = super(IbmDbImpl, self)._exec(construct, *args, **kw)
  File "/usr/lib/python2.7/site-packages/alembic/ddl/impl.py", line 106, in _exec
    return conn.execute(construct, *multiparams, **params)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 729, in execute
    return meth(self, multiparams, params)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/ddl.py", line 69, in _execute_on_connection
    return connection._execute_ddl(self, multiparams, params)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 783, in _execute_ddl
    compiled
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 958, in _execute_context
    context)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1155, in _handle_dbapi_exception
    util.raise_from_cause(newraise, exc_info)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 951, in _execute_context
    context)
  File "/usr/lib/python2.7/site-packages/ibm_db_sa/ibm_db.py", line 106, in do_execute
    cursor.execute(statement, parameters)
  File "/usr/lib64/python2.7/site-packages/ibm_db_dbi.py", line 1335, in execute
    self._execute_helper(parameters)
  File "/usr/lib64/python2.7/site-packages/ibm_db_dbi.py", line 1247, in _execute_helper
    raise self.messages[len(self.messages) - 1]
oslo_db.exception.DBError: (ProgrammingError) ibm_db_dbi::ProgrammingError: 
Statement Execute Failed: [IBM][CLI Driver][DB2/LINUXPPC64LE] SQL0104N  An 
unexpected token "uidx_portid_optname" was found following "adhcpopts DROP 
INDEX".  Expected tokens may include:  "END-OF-STATEMENT".  SQLSTATE=42601 
SQLCODE=-104 'ALTER TABLE extradhcpopts DROP INDEX uidx_portid_optname' ()

What version of the product are you using? On what operating system?
openstack kilo, with db2 V10.5 fp5, neutron install error.

Please provide any additional information below.

Original issue reported on code.google.com by Jianjiao...@gmail.com on 11 Feb 2015 at 6:48

GoogleCodeExporter commented 9 years ago

Original comment by rahul.pr...@in.ibm.com on 11 Feb 2015 at 8:07

GoogleCodeExporter commented 9 years ago
Thanks for reporting this issue, the is the issue with both ibm_db_sa and 
ibm_db_alembic with the functionality drop unique constraint.

I have committed the required changes with changeset 
https://code.google.com/p/ibm-db/source/detail?r=f560ba1e0d8210c1498c3db35489eb4
71001749a&repo=ibm-db-sa and 
https://code.google.com/p/ibm-db/source/detail?r=74221d0d47a9aad3b1a28c9a5a5de41
880136560&repo=ibm-db-alembic for ibm_db_sa and ibm_db_alembic respectively 

Original comment by rahul.pr...@in.ibm.com on 16 Feb 2015 at 8:59