config global.yml to install lbaas plugin into neutron server,and it crash on bootstrap(upgrading neutron database)

Bug #1642940 reported by Chao Guo on 2016-11-18
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

I'm using ubuntu-source and the stable/newton branch of kolla (version 3.0.1).
Wanna use lbaas, following the guide doc in the source, I edit kolla-build.yml like this:

type = url
location =

this should be the correct package that I gonna use,and all images built successfully.

everything works, except the neutron_server container. It crashed on bootstrap(upgrading neutron database) and yielded the error log as follows:(it cause by the bootstrap command 'neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head')

Traceback (most recent call last):
  File "/var/lib/kolla/venv/bin/neutron-db-manage", line 10, in <module>
  File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/neutron/db/migration/", line 686, in main
    return_val |= bool(CONF.command.func(config,
  File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/neutron/db/migration/", line 205, in do_upgrade
    run_sanity_checks(config, revision)
  File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/neutron/db/migration/", line 670, in run_sanity_checks
  File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/alembic/script/", line 407, in run_env
    util.load_python_file(self.dir, '')
  File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/alembic/util/", line 93, in load_python_file
    module = load_module_py(module_id, path)
  File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/alembic/util/", line 79, in load_module_py
    mod = imp.load_source(module_id, path, fp)
  File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/neutron/db/migration/alembic_migrations/", line 24, in <module>
    from neutron.db.migration.models import head # noqa
  File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/neutron/db/migration/models/", line 65, in <module>
  File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/neutron/common/", line 865, in import_modules_recursively
  File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/neutron/common/", line 861, in import_modules_recursively
  File "/usr/lib/python2.7/importlib/", line 37, in import_module
ImportError: No module named setup

without the lbaas plugin, the neutron-db-manage command works fine,but crash after install lbaas plugin.
If there is any workaround, please let me know.

Chao Guo (jimmygc) wrote :

I'm sorry that i made a mistake on the title.
It must be "config kolla-build.yml to install lbaas plugin into neutron server,and it crash on bootstrap(upgrading neutron database) "

Chao Guo (jimmygc) wrote :

There is a review that fixes the installation of lbaas plugin when building from source,I applied this fix,but the result is the same.

It seems like that there is a missing module,but I looked into the kolla source code and learned that it's installed by pip,so it shouldn't have any missing module.

Chao Guo (jimmygc) wrote :

I find out the cause! It's sort of a python cache problem.

Figure out a workaround:
add this lines between before neutron-db-manage command in /usr/local/bin/kolla_neutron_extend_start script in the neutron_server image:
cd /home/neutron/; \
touch /home/neutron/; \
rm -f /home/neutron/; \

It works like a black magic.
Any one knows how to clean up this kind of cache, please let me know,thank you!

Jeffrey Zhang (jeffrey4l) wrote :

does the patch work?

and i do not your black magic works. ;(

Changed in kolla:
milestone: none → ocata-3
milestone: ocata-3 → ocata-2
Chao Guo (jimmygc) wrote :

I'm sorry,i didn't say it clearly.

the neutron-db-manage command is between touch and rm command。

It works for me on ububtu source image version 3.0.1,with both vpnaas and lbaas plugins installed on neutron-server image.
I tested both vpnaas and lbaas,and they both works.

Paul Bourke (pauldbourke) wrote :

I can't reproduce this.

Changed in kolla:
status: New → Triaged
importance: Undecided → Medium
Chao Guo (jimmygc) wrote :

Maybe it's due to difference of environment,My openstack nodes are ubuntu 16.04.

Changed in kolla:
milestone: ocata-2 → ocata-3
Jeffrey Zhang (jeffrey4l) wrote :

I saw this issue when backport neutron vpnaas patch into newton branch.

Changed in kolla:
milestone: ocata-3 → ocata-rc1
Jeffrey Zhang (jeffrey4l) wrote :

This is a know issue. bump to neutron 9.2 will fix this issue.

newton master has been fixed and it will be released soon.

Changed in kolla:
milestone: ocata-rc1 → 3.0.3
status: Triaged → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers