jammy-yoga neutron-db-manage results in AttributeError: module 'collections' has no attribute 'MutableMapping'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Base Layer |
Triaged
|
High
|
Unassigned | ||
neutron (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
neutron-db-manage --config-file /etc/neutron/
results in traceback: https:/
Pasting traceback here too:
Traceback (most recent call last):
File "/usr/bin/
sys.
File "/usr/lib/
return_val |= bool(CONF.
File "/usr/lib/
run_
File "/usr/lib/
script_
File "/usr/lib/
util.
File "/usr/lib/
module = load_module_
File "/usr/lib/
spec.
File "<frozen importlib.
File "<frozen importlib.
File "/usr/lib/
from neutron_lib.db import model_base
File "/usr/lib/
from neutron_lib.db import api # noqa
File "/usr/lib/
from oslo_concurrency import lockutils
File "/usr/lib/
import fasteners
File "/usr/lib/
from fasteners.lock import locked # noqa
File "/usr/lib/
import eventlet
File "/usr/lib/
from eventlet import convenience
File "/usr/lib/
from eventlet.green import socket
File "/usr/lib/
from eventlet.support import greendns
File "/usr/lib/
setattr(dns, pkg, import_
File "/usr/lib/
return patcher.
File "/usr/lib/
return inject(
File "/usr/lib/
module = __import_
File "/usr/local/
class NameDict(
AttributeError: module 'collections' has no attribute 'MutableMapping'
The issue looks to be in the dnspython package. It needs to be using collections.
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@ juju-c42f04- zaza-e3abc6e946 c3-6:/var/ lib/juju/ agents/ unit-neutron- api-0/charm$ pip freeze|grep -i dns
dnspython==1.16.0
ubuntu@ juju-c42f04- zaza-e3abc6e946 c3-6:/var/ lib/juju/ agents/ unit-neutron- api-0/charm$ apt policy python3-dnspython nova.clouds. archive. ubuntu. com/ubuntu jammy/main amd64 Packages
python3-dnspython:
Installed: 2.1.0-1ubuntu1
Candidate: 2.1.0-1ubuntu1
Version table:
*** 2.1.0-1ubuntu1 500
500 http://
Running the neutron-db-manage command is successful after 'pip uninstall dnspython'.