[Bug 1988081] Re: jammy-yoga neutron-db-manage results in AttributeError: module 'collections' has no attribute 'MutableMapping'
Corey Bryant
1988081 at bugs.launchpad.net
Mon Aug 29 18:41:44 UTC 2022
I don't think this is a package issue as the code in the jammy+
dnspython packages includes the collections.abc fix. Also note the
subtle difference in the traceback:
usr/local/lib/python3.10/dist-packages/dns/namedict.py
There is a pip installed package on the unit as well as an apt installed
package and the pip-installed version is getting picked up which causes
the issue:
ubuntu at juju-c42f04-zaza-e3abc6e946c3-6:/var/lib/juju/agents/unit-neutron-api-0/charm$ pip freeze|grep -i dns
dnspython==1.16.0
ubuntu at juju-c42f04-zaza-e3abc6e946c3-6:/var/lib/juju/agents/unit-neutron-api-0/charm$ apt policy python3-dnspython
python3-dnspython:
Installed: 2.1.0-1ubuntu1
Candidate: 2.1.0-1ubuntu1
Version table:
*** 2.1.0-1ubuntu1 500
500 http://nova.clouds.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
Running the neutron-db-manage command is successful after 'pip uninstall dnspython'.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to dnspython in Ubuntu.
https://bugs.launchpad.net/bugs/1988081
Title:
jammy-yoga neutron-db-manage results in AttributeError: module
'collections' has no attribute 'MutableMapping'
Status in dnspython package in Ubuntu:
New
Status in neutron package in Ubuntu:
New
Bug description:
neutron-db-manage --config-file /etc/neutron/neutron.conf --config-
file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head
results in traceback: https://paste.ubuntu.com/p/SZgSHmmnym/plain/
Pasting traceback here too:
Traceback (most recent call last):
File "/usr/bin/neutron-db-manage", line 10, in <module>
sys.exit(main())
File "/usr/lib/python3/dist-packages/neutron/db/migration/cli.py", line 661, in main
return_val |= bool(CONF.command.func(config, CONF.command.name))
File "/usr/lib/python3/dist-packages/neutron/db/migration/cli.py", line 183, in do_upgrade
run_sanity_checks(config, revision)
File "/usr/lib/python3/dist-packages/neutron/db/migration/cli.py", line 645, in run_sanity_checks
script_dir.run_env()
File "/usr/lib/python3/dist-packages/alembic/script/base.py", line 563, in run_env
util.load_python_file(self.dir, "env.py")
File "/usr/lib/python3/dist-packages/alembic/util/pyfiles.py", line 92, in load_python_file
module = load_module_py(module_id, path)
File "/usr/lib/python3/dist-packages/alembic/util/pyfiles.py", line 108, in load_module_py
spec.loader.exec_module(module) # type: ignore
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/usr/lib/python3/dist-packages/neutron/db/migration/alembic_migrations/env.py", line 16, in <module>
from neutron_lib.db import model_base
File "/usr/lib/python3/dist-packages/neutron_lib/__init__.py", line 17, in <module>
from neutron_lib.db import api # noqa
File "/usr/lib/python3/dist-packages/neutron_lib/db/api.py", line 18, in <module>
from oslo_concurrency import lockutils
File "/usr/lib/python3/dist-packages/oslo_concurrency/lockutils.py", line 28, in <module>
import fasteners
File "/usr/lib/python3/dist-packages/fasteners/__init__.py", line 23, in <module>
from fasteners.lock import locked # noqa
File "/usr/lib/python3/dist-packages/fasteners/lock.py", line 31, in <module>
import eventlet
File "/usr/lib/python3/dist-packages/eventlet/__init__.py", line 17, in <module>
from eventlet import convenience
File "/usr/lib/python3/dist-packages/eventlet/convenience.py", line 7, in <module>
from eventlet.green import socket
File "/usr/lib/python3/dist-packages/eventlet/green/socket.py", line 21, in <module>
from eventlet.support import greendns
File "/usr/lib/python3/dist-packages/eventlet/support/greendns.py", line 66, in <module>
setattr(dns, pkg, import_patched('dns.' + pkg))
File "/usr/lib/python3/dist-packages/eventlet/support/greendns.py", line 61, in import_patched
return patcher.import_patched(module_name, **modules)
File "/usr/lib/python3/dist-packages/eventlet/patcher.py", line 132, in import_patched
return inject(
File "/usr/lib/python3/dist-packages/eventlet/patcher.py", line 109, in inject
module = __import__(module_name, {}, {}, module_name.split('.')[:-1])
File "/usr/local/lib/python3.10/dist-packages/dns/namedict.py", line 35, in <module>
class NameDict(collections.MutableMapping):
AttributeError: module 'collections' has no attribute 'MutableMapping'
The issue looks to be in the dnspython package. It needs to be using collections.abc.MutableMapping
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dnspython/+bug/1988081/+subscriptions
More information about the foundations-bugs
mailing list