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

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

mkkang01 gravatar image

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

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 ...
(more)
edit retag flag offensive close merge delete

Comments

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 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

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

mkkang01 gravatar image

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

wget 
https://repos.fedorapeople.org/repos/openstack/EOL/openstack-havana/epel-6/openstack-neutron-openvswitch-2013.2.4-7.el6.noarch.rpm

wget https://repos.fedorapeople.org/repos/openstack/EOL/openstack-havana/epel-6/openstack-neutron-2013.2.4-7.el6.noarch.rpm

wget https://repos.fedorapeople.org/repos/openstack/EOL/openstack-havana/epel-6/python-neutron-2013.2.4-7.el6.noarch.rpm

wget https://repos.fedorapeople.org/repos/openstack/EOL/openstack-havana/epel-6/python-neutronclient-2.3.4-1.el6.noarch.rpm

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

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

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

Seen: 514 times

Last updated: May 27 '15