While attempting to install GBP on a fresh Ubuntu 14.04 install with Kilo and Neutron after following the install guide at https://wiki.openstack.org/wiki/GroupBasedPolicy/InstallUbuntu . I am presented with the following errors when running the below. Is this due to Juno vs. Kilo or something else? Obviously it is a python module that is causing this but what is the actual fix? If any?
gbp-db-manage --config-file /etc/neutron/neutron.conf upgrade head
Traceback (most recent call last):
File "/usr/bin/gbp-db-manage", line 10, in <module>
sys.exit(main())
File "/usr/lib/python2.7/dist-packages/gbpservice/neutron/db/migration/cli.py", line 24, in main
CONF.command.func(config, CONF.command.name)
File "/usr/lib/python2.7/dist-packages/neutron/db/migration/cli.py", line 105, in do_upgrade
run_sanity_checks(config, revision)
File "/usr/lib/python2.7/dist-packages/neutron/db/migration/cli.py", line 229, in run_sanity_checks
script_dir.run_env()
File "/usr/lib/python2.7/dist-packages/alembic/script.py", line 382, in run_env
util.load_python_file(self.dir, 'env.py')
File "/usr/lib/python2.7/dist-packages/alembic/util.py", line 241, in load_python_file
module = load_module_py(module_id, path)
File "/usr/lib/python2.7/dist-packages/alembic/compat.py", line 79, in load_module_py
mod = imp.load_source(module_id, path, fp)
File "/usr/lib/python2.7/dist-packages/gbpservice/neutron/db/migration/alembic_migrations/env.py", line 22, in <module>
from gbpservice.neutron.db.migration.models import head # noqa
File "/usr/lib/python2.7/dist-packages/gbpservice/neutron/db/migration/models/head.py", line 17, in <module>
from gbpservice.neutron.db.grouppolicy import group_policy_db # noqa
File "/usr/lib/python2.7/dist-packages/gbpservice/neutron/db/grouppolicy/group_policy_db.py", line 23, in <module>
from neutron.openstack.common import log as logging
ImportError: cannot import name log
Did you upgrade the GBP packages from Juno to Kilo? I ask because the Kilo code uses oslo libraries for logging [1] whereas this stack trace seems to suggest that you have Juno packages installed. The correct process would be to first upgrade the process and then try the DB migrate. Depending on which distro you are using, the package upgrade might also trigger a DB upgrade.
[1] https:/ /github. com/openstack/ group-based- policy/ blob/e9ae958a99 8c01d1eb2b698d1 6bffb1625ab7287 /gbpservice/ neutron/ db/grouppolicy/ group_policy_ db.py#L22