yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #33720
[Bug 1464825] [NEW] alembic migration sciprt for vpnaas error
Public bug reported:
56893333aa52_fix_identifier_map_fk.py alembic migration script error 'Cannot change column 'ipsec_site_conn_id': used in a foreign key constraint 'cisco_csr_identifier_map_ibfk_1'
+ /usr/bin/neutron-db-manage --service vpnaas --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head
INFO [alembic.migration] Context impl MySQLImpl.
INFO [alembic.migration] Will assume non-transactional DDL.
INFO [alembic.migration] Context impl MySQLImpl.
INFO [alembic.migration] Will assume non-transactional DDL.
INFO [alembic.migration] Running upgrade -> start_neutron_vpnaas, start neutron-vpnaas chain
INFO [alembic.migration] Running upgrade start_neutron_vpnaas -> 3ea02b2a773e, add_index_tenant_id
INFO [alembic.migration] Running upgrade 3ea02b2a773e -> kilo, kilo
INFO [alembic.migration] Running upgrade kilo -> 56893333aa52, fix identifier map fk
Traceback (most recent call last):
File "/usr/bin/neutron-db-manage", line 10, in <module>
sys.exit(main())
File "/opt/stack/neutron/neutron/db/migration/cli.py", line 238, in main
CONF.command.func(config, CONF.command.name)
File "/opt/stack/neutron/neutron/db/migration/cli.py", line 106, in do_upgrade
do_alembic_command(config, cmd, revision, sql=CONF.command.sql)
File "/opt/stack/neutron/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 390, in run_env
util.load_python_file(self.dir, 'env.py')
File "/usr/lib/python2.7/site-packages/alembic/util.py", line 243, 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 "/opt/stack/neutron-vpnaas/neutron_vpnaas/db/migration/alembic_migrations/env.py", line 86, in <module>
run_migrations_online()
File "/opt/stack/neutron-vpnaas/neutron_vpnaas/db/migration/alembic_migrations/env.py", line 77, 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 738, in run_migrations
self.get_context().run_migrations(**kw)
File "/usr/lib/python2.7/site-packages/alembic/migration.py", line 309, in run_migrations
step.migration_fn(**kw)
File "/opt/stack/neutron-vpnaas/neutron_vpnaas/db/migration/alembic_migrations/versions/56893333aa52_fix_identifier_map_fk.py", line 48, in upgrade
existing_nullable=True)
File "<string>", line 7, in alter_column
File "<string>", line 1, in <lambda>
File "/usr/lib/python2.7/site-packages/alembic/util.py", line 388, in go
return fn(*arg, **kw)
File "/usr/lib/python2.7/site-packages/alembic/operations.py", line 478, in alter_column
existing_autoincrement=existing_autoincrement
File "/usr/lib/python2.7/site-packages/alembic/ddl/mysql.py", line 65, in alter_column
else existing_autoincrement
File "/usr/lib/python2.7/site-packages/alembic/ddl/impl.py", line 122, in _exec
return conn.execute(construct, *multiparams, **params)
File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 841, 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 895, in _execute_ddl
compiled
File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1070, in _execute_context
context)
File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/compat/handle_error.py", line 155, in _handle_dbapi_exception
e, statement, parameters, cursor, context)
File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1267, 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 1063, in _execute_context
context)
File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/default.py", line 442, in do_execute
cursor.execute(statement, parameters)
File "/usr/lib64/python2.7/site-packages/MySQLdb/cursors.py", line 174, in execute
self.errorhandler(self, exc, value)
File "/usr/lib64/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
sqlalchemy.exc.OperationalError: (OperationalError) (1832, "Cannot change column 'ipsec_site_conn_id': used in a foreign key constraint 'cisco_csr_identifier_map_ibfk_1'") 'ALTER TABLE cisco_csr_identifier_map MODIFY ipsec_site_conn_id VARCHAR(36) NULL' ()
** Affects: neutron
Importance: Undecided
Assignee: Rabi Mishra (rabi)
Status: New
** Changed in: neutron
Assignee: (unassigned) => Rabi Mishra (rabi)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1464825
Title:
alembic migration sciprt for vpnaas error
Status in OpenStack Neutron (virtual network service):
New
Bug description:
56893333aa52_fix_identifier_map_fk.py alembic migration script error 'Cannot change column 'ipsec_site_conn_id': used in a foreign key constraint 'cisco_csr_identifier_map_ibfk_1'
+ /usr/bin/neutron-db-manage --service vpnaas --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head
INFO [alembic.migration] Context impl MySQLImpl.
INFO [alembic.migration] Will assume non-transactional DDL.
INFO [alembic.migration] Context impl MySQLImpl.
INFO [alembic.migration] Will assume non-transactional DDL.
INFO [alembic.migration] Running upgrade -> start_neutron_vpnaas, start neutron-vpnaas chain
INFO [alembic.migration] Running upgrade start_neutron_vpnaas -> 3ea02b2a773e, add_index_tenant_id
INFO [alembic.migration] Running upgrade 3ea02b2a773e -> kilo, kilo
INFO [alembic.migration] Running upgrade kilo -> 56893333aa52, fix identifier map fk
Traceback (most recent call last):
File "/usr/bin/neutron-db-manage", line 10, in <module>
sys.exit(main())
File "/opt/stack/neutron/neutron/db/migration/cli.py", line 238, in main
CONF.command.func(config, CONF.command.name)
File "/opt/stack/neutron/neutron/db/migration/cli.py", line 106, in do_upgrade
do_alembic_command(config, cmd, revision, sql=CONF.command.sql)
File "/opt/stack/neutron/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 390, in run_env
util.load_python_file(self.dir, 'env.py')
File "/usr/lib/python2.7/site-packages/alembic/util.py", line 243, 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 "/opt/stack/neutron-vpnaas/neutron_vpnaas/db/migration/alembic_migrations/env.py", line 86, in <module>
run_migrations_online()
File "/opt/stack/neutron-vpnaas/neutron_vpnaas/db/migration/alembic_migrations/env.py", line 77, 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 738, in run_migrations
self.get_context().run_migrations(**kw)
File "/usr/lib/python2.7/site-packages/alembic/migration.py", line 309, in run_migrations
step.migration_fn(**kw)
File "/opt/stack/neutron-vpnaas/neutron_vpnaas/db/migration/alembic_migrations/versions/56893333aa52_fix_identifier_map_fk.py", line 48, in upgrade
existing_nullable=True)
File "<string>", line 7, in alter_column
File "<string>", line 1, in <lambda>
File "/usr/lib/python2.7/site-packages/alembic/util.py", line 388, in go
return fn(*arg, **kw)
File "/usr/lib/python2.7/site-packages/alembic/operations.py", line 478, in alter_column
existing_autoincrement=existing_autoincrement
File "/usr/lib/python2.7/site-packages/alembic/ddl/mysql.py", line 65, in alter_column
else existing_autoincrement
File "/usr/lib/python2.7/site-packages/alembic/ddl/impl.py", line 122, in _exec
return conn.execute(construct, *multiparams, **params)
File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 841, 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 895, in _execute_ddl
compiled
File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1070, in _execute_context
context)
File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/compat/handle_error.py", line 155, in _handle_dbapi_exception
e, statement, parameters, cursor, context)
File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1267, 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 1063, in _execute_context
context)
File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/default.py", line 442, in do_execute
cursor.execute(statement, parameters)
File "/usr/lib64/python2.7/site-packages/MySQLdb/cursors.py", line 174, in execute
self.errorhandler(self, exc, value)
File "/usr/lib64/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
sqlalchemy.exc.OperationalError: (OperationalError) (1832, "Cannot change column 'ipsec_site_conn_id': used in a foreign key constraint 'cisco_csr_identifier_map_ibfk_1'") 'ALTER TABLE cisco_csr_identifier_map MODIFY ipsec_site_conn_id VARCHAR(36) NULL' ()
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1464825/+subscriptions
Follow ups
References