neutron-db-manage python-pecan failure

Bug #1758882 reported by Tobias Urdin on 2018-03-26
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Cloud Archive
neutron (Ubuntu)

Bug Description

when installing gnocchi, ceilometer and neutron on the same node.

Ubuntu 16.04
Queens UCA

root@unassigned:~# neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade heads
Traceback (most recent call last):
  File "/usr/bin/neutron-db-manage", line 10, in <module>
  File "/usr/lib/python2.7/dist-packages/neutron/db/migration/", line 652, in main
    return_val |= bool(CONF.command.func(config,
  File "/usr/lib/python2.7/dist-packages/neutron/db/migration/", line 171, in do_upgrade
    run_sanity_checks(config, revision)
  File "/usr/lib/python2.7/dist-packages/neutron/db/migration/", line 636, in run_sanity_checks
  File "/usr/lib/python2.7/dist-packages/alembic/script/", line 425, in run_env
    util.load_python_file(self.dir, '')
  File "/usr/lib/python2.7/dist-packages/alembic/util/", line 93, in load_python_file
    module = load_module_py(module_id, path)
  File "/usr/lib/python2.7/dist-packages/alembic/util/", line 75, in load_module_py
    mod = imp.load_source(module_id, path, fp)
  File "/usr/lib/python2.7/dist-packages/neutron/db/migration/alembic_migrations/", line 24, in <module>
    from neutron.db.migration.models import head # noqa
  File "/usr/lib/python2.7/dist-packages/neutron/db/migration/models/", line 29, in <module>
    from neutron.db import agentschedulers_db # noqa
  File "/usr/lib/python2.7/dist-packages/neutron/db/", line 32, in <module>
    from neutron.db import agents_db
  File "/usr/lib/python2.7/dist-packages/neutron/db/", line 45, in <module>
    from neutron.extensions import agent as ext_agent
  File "/usr/lib/python2.7/dist-packages/neutron/extensions/", line 25, in <module>
    from neutron.api.v2 import base
  File "/usr/lib/python2.7/dist-packages/neutron/api/v2/", line 37, in <module>
    from neutron import quota
  File "/usr/lib/python2.7/dist-packages/neutron/quota/", line 30, in <module>
    from neutron.db.quota import api as quota_api
  File "/usr/lib/python2.7/dist-packages/neutron/db/quota/", line 110, in <module>
    def set_quota_usage_dirty(context, resource, tenant_id, dirty=True):
  File "/usr/lib/python2.7/dist-packages/neutron/db/", line 146, in decorator
    ctx_arg_index = p_util.getargspec(f).args.index(context_var_name)
  File "/usr/lib/python2.7/dist-packages/pecan/", line 44, in getargspec
  File "/usr/lib/python2.7/dist-packages/pecan/", line 43, in <lambda>
    key=lambda c: 'self' in c.cell_contents.__code__.co_varnames,
AttributeError: '_TransactionContextManager' object has no attribute '__code__'

root@unassigned:~# dpkg -l | grep -i neutron
ii neutron-common 2:12.0.0-0ubuntu1.3~cloud0 all Neutron is a virtual network service for Openstack - common
ii neutron-plugin-ml2 2:12.0.0-0ubuntu1.3~cloud0 all Neutron is a virtual network service for Openstack - ML2 plugin
ii neutron-server 2:12.0.0-0ubuntu1.3~cloud0 all Neutron is a virtual network service for Openstack - server
ii python-neutron 2:12.0.0-0ubuntu1.3~cloud0 all Neutron is a virtual network service for Openstack - Python library
ii python-neutron-fwaas 1:12.0.0-0ubuntu1~cloud0 all Firewall-as-a-Service driver for OpenStack Neutron
ii python-neutron-lib 1.13.0-0ubuntu1~cloud0 all Neutron shared routines and utilities - Python 2.7
ii python-neutronclient 1:6.7.0-0ubuntu1~cloud0 all client API library for Neutron - Python 2.7

root@unassigned:~# dpkg -l | grep -i pecan
ii python-pecan 1.0.2-2ubuntu1 all WSGI object-dispatching web framework - Python 2.x
ii python3-pecan 1.2.1-2~cloud0 all WSGI object-dispatching web framework - Python 3.x

gnocchi packages say python-pecan (>= 0.9) and neutron packages say python-pecan (>= 1.0.0)
these are available:

root@unassigned:~# apt-cache policy python-pecan
  Installed: 1.0.2-2ubuntu1
  Candidate: 1.2.1-2~cloud0
  Version table:
     1.2.1-2~cloud0 500
        500 xenial-updates/queens/main amd64 Packages
        500 xenial-updates/queens/main i386 Packages
 *** 1.0.2-2ubuntu1 500
        500 xenial/main amd64 Packages
        500 xenial/main i386 Packages
        100 /var/lib/dpkg/status

root@unassigned:~# apt-cache policy python3-pecan
  Installed: 1.2.1-2~cloud0
  Candidate: 1.2.1-2~cloud0
  Version table:
 *** 1.2.1-2~cloud0 500
        500 xenial-updates/queens/main amd64 Packages
        500 xenial-updates/queens/main i386 Packages
        100 /var/lib/dpkg/status
     1.0.2-2ubuntu1 500
        500 xenial/universe amd64 Packages
        500 xenial/universe i386 Packages

why would not the latest version of python-pecan get installed?
after upgrading to the proper version neutron-db-manage is working

description: updated
Tobias Urdin (tobias-urdin) wrote :

this might be caused because I installed gnocchi before installing neutron, and gnocchi depends on >= 0.9

perhaps we should update gnocchi dependencies to use newer version of pecan?

Corey Bryant (corey.bryant) wrote :

What might have happened is python-pecan was installed prior to the cloud archive being added, then gnocchi or neutron was installed and the min version specified by the package was already satisfied, so the latest version from the cloud archive didn't get installed. I'll check the package to see what the min version is.

Can you confirm that the error goes away if you have python-pecan 1.2.1-2~cloud0 installed?

Corey Bryant (corey.bryant) wrote :

I've confirmed this is a package bug. The Queens version of neutron is allowing python-pecan 1.0.2-2ubuntu1 to be installed.

requirements.txt for upstream neutron has:

pecan!=1.0.2,!=1.0.3,!=1.0.4,!=1.2,>=1.0.0 # BSD

while the Depends for the Ubuntu neutron package has:

python-pecan (>= 1.0.0)

Changed in neutron (Ubuntu):
status: New → Triaged
importance: Undecided → High
Tobias Urdin (tobias-urdin) wrote :

invalid, python-pecan 1.0.2-2ubuntu1 was installed by default in my template

Changed in neutron (Ubuntu):
status: Triaged → Invalid
Tobias Urdin (tobias-urdin) wrote :

Found it, ceph-mgr depends on python-pecan which is installed before UCA Queens repo is added

Changed in neutron (Ubuntu):
status: Invalid → Triaged
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package neutron - 2:12.0.0-0ubuntu1.4

neutron (2:12.0.0-0ubuntu1.4) bionic; urgency=medium

  * Ensure python-pecan is >= 1.2.1 (LP: #1758882).

 -- Corey Bryant <email address hidden> Mon, 26 Mar 2018 08:19:15 -0400

Changed in neutron (Ubuntu):
status: Triaged → Fix Released
Corey Bryant (corey.bryant) wrote :

Hello Tobias, or anyone else affected,

Accepted neutron into queens-proposed. The package will build now and be available in the Ubuntu Cloud Archive in a few hours, and then in the -proposed repository.

Please help us by testing this new package. To enable the -proposed repository:

  sudo add-apt-repository cloud-archive:queens-proposed
  sudo apt-get update

Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-queens-needed to verification-queens-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-queens-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at . Thank you in advance!

tags: added: verification-queens-needed
Tobias Urdin (tobias-urdin) wrote :

I have verified it solved my initial issue

tags: added: verification-queens-done
removed: verification-queens-needed

The verification of the Stable Release Update for neutron has completed successfully and the package has now been released to -updates. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Corey Bryant (corey.bryant) wrote :

This bug was fixed in the package neutron - 2:12.0.0-0ubuntu1.4~cloud0

 neutron (2:12.0.0-0ubuntu1.4~cloud0) xenial-queens; urgency=medium
   * New update for the Ubuntu Cloud Archive.
 neutron (2:12.0.0-0ubuntu1.4) bionic; urgency=medium
   * Ensure python-pecan is >= 1.2.1 (LP: #1758882).

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

Other bug subscribers