[Bug 1758882] Re: neutron-db-manage python-pecan failure

Corey Bryant corey.bryant at canonical.com
Mon Mar 26 12:12:01 UTC 2018


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?

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to neutron in Ubuntu.
https://bugs.launchpad.net/bugs/1758882

Title:
  neutron-db-manage python-pecan failure

Status in neutron package in Ubuntu:
  Triaged

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

  Ubuntu 16.04
  Queens UCA

  root at 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>
      sys.exit(main())
    File "/usr/lib/python2.7/dist-packages/neutron/db/migration/cli.py", line 652, in main
      return_val |= bool(CONF.command.func(config, CONF.command.name))
    File "/usr/lib/python2.7/dist-packages/neutron/db/migration/cli.py", line 171, in do_upgrade
      run_sanity_checks(config, revision)
    File "/usr/lib/python2.7/dist-packages/neutron/db/migration/cli.py", line 636, in run_sanity_checks
      script_dir.run_env()
    File "/usr/lib/python2.7/dist-packages/alembic/script/base.py", line 425, in run_env
      util.load_python_file(self.dir, 'env.py')
    File "/usr/lib/python2.7/dist-packages/alembic/util/pyfiles.py", line 93, in load_python_file
      module = load_module_py(module_id, path)
    File "/usr/lib/python2.7/dist-packages/alembic/util/compat.py", 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/env.py", line 24, in <module>
      from neutron.db.migration.models import head  # noqa
    File "/usr/lib/python2.7/dist-packages/neutron/db/migration/models/head.py", line 29, in <module>
      from neutron.db import agentschedulers_db  # noqa
    File "/usr/lib/python2.7/dist-packages/neutron/db/agentschedulers_db.py", line 32, in <module>
      from neutron.db import agents_db
    File "/usr/lib/python2.7/dist-packages/neutron/db/agents_db.py", line 45, in <module>
      from neutron.extensions import agent as ext_agent
    File "/usr/lib/python2.7/dist-packages/neutron/extensions/agent.py", line 25, in <module>
      from neutron.api.v2 import base
    File "/usr/lib/python2.7/dist-packages/neutron/api/v2/base.py", line 37, in <module>
      from neutron import quota
    File "/usr/lib/python2.7/dist-packages/neutron/quota/__init__.py", line 30, in <module>
      from neutron.db.quota import api as quota_api
    File "/usr/lib/python2.7/dist-packages/neutron/db/quota/api.py", line 110, in <module>
      def set_quota_usage_dirty(context, resource, tenant_id, dirty=True):
    File "/usr/lib/python2.7/dist-packages/neutron/db/api.py", line 146, in decorator
      ctx_arg_index = p_util.getargspec(f).args.index(context_var_name)
    File "/usr/lib/python2.7/dist-packages/pecan/util.py", line 44, in getargspec
      reverse=True
    File "/usr/lib/python2.7/dist-packages/pecan/util.py", line 43, in <lambda>
      key=lambda c: 'self' in c.cell_contents.__code__.co_varnames,
  AttributeError: '_TransactionContextManager' object has no attribute '__code__'

  root at 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 at 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 at unassigned:~# apt-cache policy python-pecan
  python-pecan:
    Installed: 1.0.2-2ubuntu1
    Candidate: 1.2.1-2~cloud0
    Version table:
       1.2.1-2~cloud0 500
          500 http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/queens/main amd64 Packages
          500 http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/queens/main i386 Packages
   *** 1.0.2-2ubuntu1 500
          500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
          500 http://archive.ubuntu.com/ubuntu xenial/main i386 Packages
          100 /var/lib/dpkg/status

  root at unassigned:~# apt-cache policy python3-pecan
  python3-pecan:
    Installed: 1.2.1-2~cloud0
    Candidate: 1.2.1-2~cloud0
    Version table:
   *** 1.2.1-2~cloud0 500
          500 http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/queens/main amd64 Packages
          500 http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/queens/main i386 Packages
          100 /var/lib/dpkg/status
       1.0.2-2ubuntu1 500
          500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
          500 http://archive.ubuntu.com/ubuntu 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

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/neutron/+bug/1758882/+subscriptions



More information about the Ubuntu-openstack-bugs mailing list