neutron.db.migration.migrate_to_ml2 (Havana ovs->Icehouse ml2)
I'm upgrading Neutron to ML2 while checking the following document on CentOS6.5 / CentOS7.
http://docs.openstack.org/openstack-ops/content/upgrades_havana-icehouse-rhel.html#treeDiv (http://docs.openstack.org/openstack-o...)
Using neutron-db-manage, I updated database as follows:
Even though I got string error (sqlalchemy.exc.ArgumentError: Could not parse rfc1738 URL from string) when upgrading to icehouse, it's resolved by adding "connection = mysql://id:pw@x.x.x.x/ovs_quantum" into [database] section in /etc/neutron/neutron.conf file.
# neutron-db-manage --config-file /etc/neutron/neutron.conf \
> --config-file /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini stamp havana
No handlers could be found for logger "neutron.common.legacy"
INFO [alembic.migration] Context impl MySQLImpl.
INFO [alembic.migration] Will assume non-transactional DDL.
INFO [alembic.migration] Running stamp_revision -> havana
# neutron-db-manage --config-file /etc/neutron/neutron.conf \
> --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade icehouse
...
# neutron-db-manage --config-file /etc/neutron/neutron.conf \
> --config-file /etc/neutron/plugins/ml2/ml2_conf.ini current
No handlers could be found for logger "neutron.common.legacy"
INFO [alembic.migration] Context impl MySQLImpl.
INFO [alembic.migration] Will assume non-transactional DDL.
icehouse (head)
After that, I'm trying to perform the conversion from OVS to ML2, but it can't create ml2_network_segments table.
# python -m neutron.db.migration.migrate_to_ml2 openvswitch \
> mysql://id:pw@x.x.x.x/ovs_quantum
Traceback (most recent call last):
File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/lib/python2.7/site-packages/neutron/db/migration/migrate_to_ml2.py", line 462, in <module>
main()
File "/usr/lib/python2.7/site-packages/neutron/db/migration/migrate_to_ml2.py", line 458, in main
args.vxlan_udp_port)
File "/usr/lib/python2.7/site-packages/neutron/db/migration/migrate_to_ml2.py", line 138, in __call__
metadata.create_all(engine)
File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/schema.py", line 3352, in create_all
tables=tables)
File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1617, in _run_visitor
conn._run_visitor(visitorcallable, element, **kwargs)
File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1246, in _run_visitor
**kwargs).traverse_single(element)
File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/visitors.py", line 120, in traverse_single
return meth(obj, **kw)
File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/ddl.py", line 713, in visit_metadata
self.traverse_single(table, create_ok=True)
File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/visitors.py", line 120, in traverse_single
return meth(obj, **kw)
File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/ddl.py", line 732, in visit_table
self.connection.execute(CreateTable(table))
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 ...
I'm performing the same upgrade, I get the same error:
Can't create table 'ovs_neutron.ml2_network_segments' (errno: 150)
. Have you found any solution? Thanks in advance.