Bug 2035663 - Salt Minion execution fails with Python error "AttributeError: module 'collections' has no attribute 'MutableMapping'"
Summary: Salt Minion execution fails with Python error "AttributeError: module 'collec...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: salt
Version: 35
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Kirill Ponomarev
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-12-26 16:16 UTC by Matthew Coleman
Modified: 2022-01-12 00:19 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2022-01-12 00:19:10 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Matthew Coleman 2021-12-26 16:16:30 UTC
Description of problem:

When executing subcommands with the Salt Minion, a Python stack trace is encountered which ends with "AttributeError: module 'collections' has no attribute 'MutableMapping'".

Version-Release number of selected component (if applicable):

3003.3

How reproducible:

Always.

Steps to Reproduce:

1. `sudo dnf install salt-minion`
2. Configure the Salt Minion to talk to some Salt Master (might not be required).
3. `sudo salt-call state.highstate`

Actual results:

```
Traceback (most recent call last):
  File "/usr/bin/salt-call", line 33, in <module>
    sys.exit(load_entry_point('salt==3003.3', 'console_scripts', 'salt-call')())
  File "/usr/lib/python3.10/site-packages/salt/scripts.py", line 437, in salt_call
    import salt.cli.call
  File "/usr/lib/python3.10/site-packages/salt/cli/call.py", line 6, in <module>
    import salt.cli.caller
  File "/usr/lib/python3.10/site-packages/salt/cli/caller.py", line 15, in <module>
    import salt.minion
  File "/usr/lib/python3.10/site-packages/salt/minion.py", line 36, in <module>
    import salt.pillar
  File "/usr/lib/python3.10/site-packages/salt/pillar/__init__.py", line 16, in <module>
    import salt.fileclient
  File "/usr/lib/python3.10/site-packages/salt/fileclient.py", line 26, in <module>
    import salt.utils.http
  File "/usr/lib/python3.10/site-packages/salt/utils/http.py", line 73, in <module>
    import requests
  File "/usr/local/lib/python3.10/site-packages/requests/__init__.py", line 60, in <module>
    from . import utils
  File "/usr/local/lib/python3.10/site-packages/requests/utils.py", line 32, in <module>
    from .cookies import cookiejar_from_dict
  File "/usr/local/lib/python3.10/site-packages/requests/cookies.py", line 172, in <module>
    class RequestsCookieJar(cookielib.CookieJar, collections.MutableMapping):
AttributeError: module 'collections' has no attribute 'MutableMapping'
```

Expected results:

Salt Minion works as expected and does not stack trace.

Additional info:

Seems to be related to using Python 3.10 according to other errors in other Python applications exhibiting similar symptoms. If so, [the official Salt documentation](https://docs.saltproject.io/en/latest/topics/installation/fedora.html) does not work under Fedora 35 and should be fixed upstream.

Comment 1 Matthew Coleman 2021-12-26 16:27:38 UTC
Upstream Salt issue filed here: https://github.com/saltstack/salt/issues/61401

Comment 2 Matthew Coleman 2022-01-12 00:19:10 UTC
This appears to have been user error on my part and I was somehow forcing the system into an older version of Requests. Closing this and the Salt issue.


Note You need to log in before you can comment on or make changes to this bug.