python error during gbp-db-manage

Bug #1518022 reported by Larry Smith Jr.
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Group Based Policy
Incomplete
Undecided
Unassigned

Bug Description

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

Revision history for this message
Sumit Naiksatam (snaiksat) wrote :

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/e9ae958a998c01d1eb2b698d16bffb1625ab7287/gbpservice/neutron/db/grouppolicy/group_policy_db.py#L22

Changed in group-based-policy:
status: New → Incomplete
Revision history for this message
Larry Smith Jr. (mrlesmithjr) wrote : Re: [Bug 1518022] Re: python error during gbp-db-manage
Download full text (3.4 KiB)

I have never had GBP installed. I was purely following the instructions
from the GBP Ubuntu install notes. Which I noticed were referencing Juno.

On Thu, Nov 19, 2015 at 3:30 PM, Sumit Naiksatam <<email address hidden>
> wrote:

> 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/e9ae958a998c01d1eb2b698d16bffb1625ab7287/gbpservice/neutron/db/grouppolicy/group_policy_db.py#L22
>
> ** Changed in: group-based-policy
> Status: New => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1518022
>
> Title:
> python error during gbp-db-manage
>
> Status in Group Based Policy:
> Incomplete
>
> Bug description:
> 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: canno...

Read more...

Revision history for this message
Larry Smith Jr. (mrlesmithjr) wrote :
Download full text (5.3 KiB)

specifically the below method of installing... Nothing about Kilo
referenced.

0. Install Ubuntu 14.04 and OpenStack Juno
<http://docs.openstack.org/juno/install-guide/install/apt/content/>

1. Add the following line to /etc/apt/sources.list

 deb http://ppa.launchpad.net/group-based-policy-drivers/ppa/ubuntu utopic main

2. Install GBP packages

 sudo apt-get update
 sudo apt-get install group-based-policy group-based-policy-automation
group-based-policy-ui python-group-based-policy-client

3. To configure the GBP service plugin and drivers, edit
/etc/neutron/neutron.conf

3.1 Append "group_policy" and "servicechain" entry-point names to the
previously enabled service plugins:

  service_plugins = <already configured service plugins including l3,
lbaas, and fwaas>,group_policy,servicechain

3.2 Configure GBP policy and service-chain drivers

 [group_policy]
 policy_drivers = implicit_policy, resource_mapping

 [servicechain]
 servicechain_drivers = simplechain_driver

4. To configure GBP heat plugin, edit /etc/heat/heat.conf

  plugin_dirs=<existing heat
plugins>,/usr/lib/python2.7/dist-packages/gbpautomation/heat

5. Update GBP automation package name to work correctly with pbr

  sed -i 's/gbpautomation/group_based_policy_automation/g'
/usr/lib/python2.7/dist-packages/gbpautomation/__init__.py

6. Enable GBP UI on horizon dashboard

 ln -s /usr/lib/python2.7/dist-packages/gbpui/_*project*.py
/usr/share/openstack-dashboard/openstack_dashboard/enabled

7. Create GBP Database tables

 gbp-db-manage --config-file /etc/neutron/neutron.conf upgrade head

On Thu, Nov 19, 2015 at 3:45 PM, Larry Smith <email address hidden> wrote:

> I have never had GBP installed. I was purely following the instructions
> from the GBP Ubuntu install notes. Which I noticed were referencing Juno.
>
> On Thu, Nov 19, 2015 at 3:30 PM, Sumit Naiksatam <
> <email address hidden>> wrote:
>
>> 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/e9ae958a998c01d1eb2b698d16bffb1625ab7287/gbpservice/neutron/db/grouppolicy/group_policy_db.py#L22
>>
>> ** Changed in: group-based-policy
>> Status: New => Incomplete
>>
>> --
>> You received this bug notification because you are subscribed to the bug
>> report.
>> https://bugs.launchpad.net/bugs/1518022
>>
>> Title:
>> python error during gbp-db-manage
>>
>> Status in Group Based Policy:
>> Incomplete
>>
>> Bug description:
>> 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 i...

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.