saltstack / saltstack/salt

salt-ssh not working on remote hosts with python versions >3.8

Open
#61,276 16 comments 0 reactions 1 assignee View on GitHub

@frogunder is already working on this.

Since Nov 21, 2021.

Salt-SSH severity-medium
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description of Issue

When trying to highstate a new Fedora 25 machine with Python 3.11 (currently latest in repo), I get the following error:
"ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib64/python3.10/collections/init.py)"

Setup

N/A - Errors with salt using Python module. I have no custom python scripts

Steps to Reproduce Issue
[root@morton ~]
# salt-ssh -i comms state.highstate
comms:
    ----------
    _error:
        Failed to return clean data
    retcode:
        1
    stderr:
        Traceback (most recent call last):
          File "/var/tmp/.root_5a678c_salt/salt-call", line 27, in <module>
            salt_call()
          File "/var/tmp/.root_5a678c_salt/pyall/salt/scripts.py", line 426, in salt_call
            import salt.cli.call
          File "/var/tmp/.root_5a678c_salt/pyall/salt/cli/call.py", line 3, in <module>
            import salt.cli.caller
          File "/var/tmp/.root_5a678c_salt/pyall/salt/cli/caller.py", line 15, in <module>
            import salt.minion
          File "/var/tmp/.root_5a678c_salt/pyall/salt/minion.py", line 23, in <module>
            import salt.client
          File "/var/tmp/.root_5a678c_salt/pyall/salt/client/__init__.py", line 40, in <module>
            import salt.utils.minions
          File "/var/tmp/.root_5a678c_salt/pyall/salt/utils/minions.py", line 12, in <module>
            import salt.auth.ldap
          File "/var/tmp/.root_5a678c_salt/pyall/salt/auth/ldap.py", line 11, in <module>
            from jinja2 import Environment
          File "/var/tmp/.root_5a678c_salt/pyall/jinja2/__init__.py", line 6, in <module>
            from markupsafe import escape
          File "/var/tmp/.root_5a678c_salt/py3/markupsafe/__init__.py", line 13, in <module>
            from collections import Mapping
        ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)
    stdout:
Versions Report

minion:
None - Using salt-ssh to highstate a host over ssh. Remote host running fedora 35

master:

Salt Version:
          Salt: 3004

Dependency Versions:
          cffi: Not Installed
      cherrypy: Not Installed
      dateutil: Not Installed
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 2.11.1
       libgit2: Not Installed
      M2Crypto: 0.35.2
          Mako: Not Installed
       msgpack: 0.6.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: Not Installed
      pycrypto: Not Installed
  pycryptodome: Not Installed
        pygit2: Not Installed
        Python: 3.6.8 (default, Nov 18 2021, 10:07:16)
  python-gnupg: Not Installed
        PyYAML: 3.13
         PyZMQ: 17.0.0
         smmap: Not Installed
       timelib: Not Installed
       Tornado: 4.5.3
           ZMQ: 4.1.4

System Versions:
          dist: oracle 7.9
        locale: UTF-8
       machine: x86_64
       release: 5.4.17-2136.300.7.el7uek.x86_64
        system: Linux
       version: Oracle Linux Server 7.9

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.