Ask Your Question

neutron.db.migration.migrate_to_ml2 (Havana ovs->Icehouse ml2)

asked 2015-04-21 09:53:57 -0500

mkkang01 gravatar image

updated 2015-04-21 12:12:52 -0500

I'm upgrading Neutron to ML2 while checking the following document on CentOS6.5 / CentOS7. (

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/", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/", line 72, in _run_code
    exec code in run_globals
  File "/usr/lib/python2.7/site-packages/neutron/db/migration/", line 462, in <module>
  File "/usr/lib/python2.7/site-packages/neutron/db/migration/", line 458, in main
  File "/usr/lib/python2.7/site-packages/neutron/db/migration/", line 138, in __call__
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/", line 3352, in create_all
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/", line 1617, in _run_visitor
    conn._run_visitor(visitorcallable, element, **kwargs)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/", line 1246, in _run_visitor
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/", line 120, in traverse_single
    return meth(obj, **kw)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/", line 713, in visit_metadata
    self.traverse_single(table, create_ok=True)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/", line 120, in traverse_single
    return meth(obj, **kw)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/", line 732, in visit_table
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/", line 729, in execute
    return meth(self, multiparams, params)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/", line 69, in _execute_on_connection
    return connection._execute_ddl(self, multiparams, params)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/", line 783, in _execute_ddl
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/", line 958, in _execute_context
  File "/usr/lib64/python2.7/site-packages/sqlalchemy ...
edit retag flag offensive close merge delete


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.

agti gravatar imageagti ( 2015-05-27 02:10:20 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2015-05-27 08:25:51 -0500

mkkang01 gravatar image

By upgrading havana neutron packages to up-to-date RPMs, all migrate_to_ml2 problems are resolved.





yum -y install openstack-neutron-openvswitch-2013.2.4-7.el6.noarch.rpm openstack-neutron-2013.2.4-7.el6.noarch.rpm python-neutron-2013.2.4-7.el6.noarch.rpm python-neutronclient-2.3.4-1.el6.noarch.rpm

neutron-db-manage --config-file /etc/neutron/neutron.conf \
--config-file /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini stamp havana

service neutron-server restart
service neutron-openvswitch-agent restart

Then alembic_version table is created and then set as "havana" version. Now ready to proceed the next step.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2015-04-21 09:53:57 -0500

Seen: 484 times

Last updated: May 27 '15