[openstack-dev] Devstack + ML2 setup issue

Eugene Nikanorov enikanorov at mirantis.com
Wed Aug 7 16:09:46 UTC 2013


Hi Dmitry,

This is known problem. It is being addressed by
https://bugs.launchpad.net/neutron/+bug/1209151
https://review.openstack.org/#/c/40636/1

Thanks,
Eugene.


On Wed, Aug 7, 2013 at 7:59 PM, Dmitriy Andrushko
<dandrushko at mirantis.com>wrote:

> Hi, all!
> Following request from ML2 team discussed during weekly IRC meeting,
> i'm writing about issue with devstack and ML2 setup.
> I have clear Ubuntu 12.04 installation and devstack just cloned from
> repository. In devstack folder there is localrc file with basic
> options to enable ML2. According to Wiki page just  two options
> required to enable ML2, particularly my config include:
>
> disable_service n-net
> enable_service n-sch
> enable_service q-svc
> enable_service q-agt
> enable_service q-dhcp
> enable_service q-l3
> enable_service q-meta
> enable_service quantum
> Q_PLUGIN=ml2
> ENABLE_TENANT_VLANS=True
>
> During stack setup i meet error, below is the partial trace:
> <--cut, not valuable-->
> 2013-08-07 16:45:23 INFO  [alembic.migration] Running upgrade 2032abe8edac
> -> 52
> c5e4a18807, LBaaS Pool scheduler
> 2013-08-07 16:45:23 Traceback (most recent call last):
> 2013-08-07 16:45:23   File "/usr/local/bin/neutron-db-manage", line 10, in
> <modu
> le>
> 2013-08-07 16:45:23     sys.exit(main())
> 2013-08-07 16:45:23   File
> "/opt/stack/neutron/neutron/db/migration/cli.py", lin
> e 140, in main
> 2013-08-07 16:45:23     CONF.command.func(config, CONF.command.name)
> 2013-08-07 16:45:23   File
> "/opt/stack/neutron/neutron/db/migration/cli.py", line 77, in
> do_upgrade_downgrade
> 2013-08-07 16:45:23     do_alembic_command(config, cmd, revision,
> sql=CONF.command.sql)
> 2013-08-07 16:45:23   File
> "/opt/stack/neutron/neutron/db/migration/cli.py", line 56, in
> do_alembic_command
> 2013-08-07 16:45:23     getattr(alembic_command, cmd)(config, *args,
> **kwargs)
> 2013-08-07 16:45:23   File
> "/usr/local/lib/python2.7/dist-packages/alembic/command.py", line 124,
> in upgrade
> 2013-08-07 16:45:23     script.run_env()
> 2013-08-07 16:45:23   File
> "/usr/local/lib/python2.7/dist-packages/alembic/script.py", line 193,
> in run_env
> 2013-08-07 16:45:23     util.load_python_file(self.dir, 'env.py')
> 2013-08-07 16:45:23   File
> "/usr/local/lib/python2.7/dist-packages/alembic/util.py", line 177, in
> load_python_file
> 2013-08-07 16:45:23     module = load_module(module_id, path)
> 2013-08-07 16:45:23   File
> "/usr/local/lib/python2.7/dist-packages/alembic/compat.py", line 39,
> in load_module
> 2013-08-07 16:45:23     return imp.load_source(module_id, path, fp)
> 2013-08-07 16:45:23   File
> "/opt/stack/neutron/neutron/db/migration/alembic_migrations/env.py",
> line 102, in <module>
> 2013-08-07 16:45:23     run_migrations_online()
> 2013-08-07 16:45:23   File
> "/opt/stack/neutron/neutron/db/migration/alembic_migrations/env.py",
> line 86, in run_migrations_online
> 2013-08-07 16:45:23     options=build_options())
> 2013-08-07 16:45:23   File "<string>", line 7, in run_migrations
> 2013-08-07 16:45:23   File
> "/usr/local/lib/python2.7/dist-packages/alembic/environment.py", line
> 652, in run_migrations
> 2013-08-07 16:45:23     self.get_context().run_migrations(**kw)
> 2013-08-07 16:45:23   File
> "/usr/local/lib/python2.7/dist-packages/alembic/migration.py", line
> 224, in run_migrations
> 2013-08-07 16:45:23     change(**kw)
> 2013-08-07 16:45:23   File
>
> "/opt/stack/neutron/neutron/db/migration/alembic_migrations/versions/52c5e4a18807_lbaas_pool_scheduler.py",
> line 45, in upgrade
> 2013-08-07 16:45:23     sa.PrimaryKeyConstraint('pool_id')
> 2013-08-07 16:45:23   File "<string>", line 7, in create_table
> 2013-08-07 16:45:23   File
> "/usr/local/lib/python2.7/dist-packages/alembic/operations.py", line
> 631, in create_table
> 2013-08-07 16:45:23     self._table(name, *columns, **kw)
> 2013-08-07 16:45:23   File
> "/usr/local/lib/python2.7/dist-packages/alembic/ddl/impl.py", line
> 149, in create_table
> 2013-08-07 16:45:23     self._exec(schema.CreateTable(table))
> 2013-08-07 16:45:23   File
> "/usr/local/lib/python2.7/dist-packages/alembic/ddl/impl.py", line 76,
> in _exec
> 2013-08-07 16:45:23     conn.execute(construct, *multiparams, **params)
> 2013-08-07 16:45:23   File
> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py",
> line 1449, in execute
> 2013-08-07 16:45:23     params)
> 2013-08-07 16:45:23   File
> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py",
> line 1542, in _execute_ddl
> 2013-08-07 16:45:23     compiled
> 2013-08-07 16:45:23   File
> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py",
> line 1698, in _execute_context
> 2013-08-07 16:45:23     context)
> 2013-08-07 16:45:23   File
> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py",
> line 1691, in _execute_context
> 2013-08-07 16:45:23     context)
> 2013-08-07 16:45:23   File
> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py",
> line 331, in do_execute
> 2013-08-07 16:45:23     cursor.execute(statement, parameters)
> 2013-08-07 16:45:23   File
> "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in
> execute
> 2013-08-07 16:45:23     self.errorhandler(self, exc, value)
> 2013-08-07 16:45:23   File
> "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in
> defaulterrorhandler
> 2013-08-07 16:45:23     raise errorclass, errorvalue
> 2013-08-07 16:45:23 sqlalchemy.exc.OperationalError:
> (OperationalError) (1005, "Can't create table
> 'neutron_ml2.poolloadbalanceragentbindings' (errno: 150)") '\nCREATE
> TABLE poolloadbalanceragentbindings (\n\tpool_id VARCHAR(36) NOT NULL,
> \n\tloadbalancer_agent_id VARCHAR(36) NOT NULL, \n\tPRIMARY KEY
> (pool_id), \n\tFOREIGN KEY(loadbalancer_agent_id) REFERENCES agents
> (id) ON DELETE CASCADE, \n\tFOREIGN KEY(pool_id) REFERENCES pools (id)
> ON DELETE CASCADE\n)\n\n' ()
> 2013-08-07 16:45:23 ++ failed
> 2013-08-07 16:45:23 ++ local r=1
> 2013-08-07 16:45:23 +++ jobs -p
> 2013-08-07 16:45:23 ++ kill
> <--cut, not valuable-->
>
>
> After some research i've found that problem in this SQL relates to
> this part of the statement "FOREIGN KEY(loadbalancer_agent_id)
> REFERENCES agents (id)", i.e. it refers to foreign key in table
> "agents", which should be in neutron_ml2 database. It looks like this
> table should be created during execution of
>
> /opt/stack/neutron/neutron/db/migration/alembic_migrations/versions/511471cc46b_agent_ext_model_supp.py
> migration script, which executed before this one, but in some reason
> table wasn't created.
>
> I'm still working on this issue, but probably there is already some
> solution. In this case please provide me any information on such
> solution or workaround.
>
>
> Thank you in advance!
>
> Kind regards, Dmitriy
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130807/8a360f58/attachment.html>


More information about the OpenStack-dev mailing list