Skip to content

[BUG] Salt master-initiated jobs no longer work after master upgraded to Fedora 39/Python 3.12 #65360

Closed

Description

@limburgher

Description
Running Fedora 38 master with a Fedora 39 minion and a Debian 11 minion. Everything worked perfectly until I upgraded the master to Fedora 39. No sls or config changes took place.

Setup
fails even for test.ping

Please be as specific as possible and give set-up details.

  • on-prem machine
  • VM (Virtualbox, KVM, etc. please specify)
  • VM running on a cloud service, please be explicit and add details
  • container (Kubernetes, Docker, containerd, etc. please specify)
  • or a combination, please be explicit
  • jails if it is FreeBSD
  • classic packaging
  • onedir packaging
  • used bootstrap to install

Steps to Reproduce the behavior
Run state.apply or test.ping from the master against any minion

Expected behavior
The action succeeds.

Screenshots
N/A

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
          Salt: 3006.3
 
Python Version:
        Python: 3.12.0 (main, Oct  2 2023, 00:00:00) [GCC 13.2.1 20230918 (Red Hat 13.2.1-3)]
 
Dependency Versions:
          cffi: 1.15.1
      cherrypy: 18.8.0
      dateutil: 2.8.2
     docker-py: Not Installed
         gitdb: 4.0.10
     gitpython: 3.1.32
        Jinja2: 3.1.2
       libgit2: 1.7.1
  looseversion: 1.3.0
      M2Crypto: Not Installed
          Mako: 1.2.3
       msgpack: 1.0.5
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     packaging: 23.1
     pycparser: 2.20
      pycrypto: 2.6.1
  pycryptodome: 3.19.0
        pygit2: 1.13.0
  python-gnupg: 0.5.0
        PyYAML: 6.0.1
         PyZMQ: 25.1.0
        relenv: Not Installed
         smmap: 5.0.0
       timelib: Not Installed
       Tornado: 6.3.3
           ZMQ: 4.3.4
 
System Versions:
          dist: fedora 39 
        locale: utf-8
       machine: x86_64
       release: 6.5.5-300.fc39.x86_64
        system: Linux
       version: Fedora Linux 39 

Additional context
I've checked firewall ports, tcp connectivity, DNS, and rekeyed the master and minions. Nothing helps.

Activity

  1. added
    bug
    on Oct 6, 2023
  2. limburgher commented on Oct 6, 2023

    @limburgher
    Author

    Additionally, salt-call works from minions on all sls I've tested.

  3. limburgher commented on Oct 6, 2023

    @limburgher
    Author

    One exception: salt-call failed to add an apply job to the scheduler from an sls.

  4. added
    fedora
    on Oct 7, 2023
  5. Vaelatern commented on Oct 18, 2023

    @Vaelatern
    Contributor

    This is because, I bet:

    4baea1a

    this didn't make it in to 3006.3. As per my comment on the commit (I've duplicated this on Void Linux), vendored tornado used an obsolete check for python version. Upstream tornado no longer does.

    This first if condition below is the root of the problem. The match_hostname function was deprecated in 3.7, and removed in 3.12.

    if hasattr(ssl, 'match_hostname') and hasattr(ssl, 'CertificateError'):  # python 3.2+
        ssl_match_hostname = ssl.match_hostname
        SSLCertificateError = ssl.CertificateError
    elif ssl is None:
        ssl_match_hostname = SSLCertificateError = None  # type: ignore
    else:
        import backports.ssl_match_hostname
        ssl_match_hostname = backports.ssl_match_hostname.match_hostname
        SSLCertificateError = backports.ssl_match_hostname.CertificateError  # type: ignore
    
  6. Vaelatern commented on Oct 18, 2023

    @Vaelatern
    Contributor

    An error stacktrace for the curious

    Traceback (most recent call last):
      File "/usr/bin/salt-call", line 33, in <module>
        sys.exit(load_entry_point('salt==3006.3', 'console_scripts', 'salt-call')())
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.12/site-packages/salt/scripts.py", line 437, in salt_call
        import salt.cli.call
      File "/usr/lib/python3.12/site-packages/salt/cli/call.py", line 3, in <module>
        import salt.cli.caller
      File "/usr/lib/python3.12/site-packages/salt/cli/caller.py", line 12, in <module>
        import salt.channel.client
      File "/usr/lib/python3.12/site-packages/salt/channel/client.py", line 13, in <module>
        import salt.crypt
      File "/usr/lib/python3.12/site-packages/salt/crypt.py", line 26, in <module>
        import salt.payload
      File "/usr/lib/python3.12/site-packages/salt/payload.py", line 12, in <module>
        import salt.loader.context
      File "/usr/lib/python3.12/site-packages/salt/loader/__init__.py", line 23, in <module>
        import salt.utils.event
      File "/usr/lib/python3.12/site-packages/salt/utils/event.py", line 67, in <module>
        import salt.ext.tornado.iostream
      File "/usr/lib/python3.12/site-packages/salt/ext/tornado/iostream.py", line 41, in <module>
        from salt.ext.tornado.netutil import ssl_wrap_socket, ssl_match_hostname, SSLCertificateErr
    or, _client_ssl_defaults, _server_ssl_defaults
      File "/usr/lib/python3.12/site-packages/salt/ext/tornado/netutil.py", line 57, in <module>
        import backports.ssl_match_hostname
    

    Note well how using upstream tornado would fix this.

  7. limburgher commented on Oct 18, 2023

    @limburgher
    Author

    We currently carry a patch to help with that: https://src.fedoraproject.org/rpms/salt/blob/rawhide/f/match_hostname.patch

    The commit you referenced doesn't apply cleanly to 3006.3, which doesn't surprise me too much as it's rather major.

    Do you know when we might expect a release with vendored tornado removed?

  8. Vaelatern commented on Oct 18, 2023

    @Vaelatern
    Contributor

    I would expect upstream tornado to land in 3007. I would expect 3007 to land in the next 10 days or so.

  9. limburgher commented on Oct 18, 2023

    @limburgher
    Author

    Ok, good. I'd love a patch that fixed this for 3006.3, but given that timeline, if it is indeed in 3007, I won't lose too much sleep over it.

  10. Vaelatern commented on Oct 18, 2023

    @Vaelatern
    Contributor

    I am not affiliated with the salt project, I've only gotten minor patches in before.

  11. limburgher commented on Nov 14, 2023

    @limburgher
    Author

    Has anyone heard anything on the timeline for 3007?

  12. ndim commented on Nov 16, 2023

    @ndim

    Just in case someone stumbles upon this issue and thinks changing the Fedora 39 salt package's USE_VENDORED_TORNADO = True to USE_VENDORED_TORNADO = False is the obvious workaround: That did not work for me.

  13. limburgher commented on Nov 16, 2023

    @limburgher
    Author

    Just in case someone stumbles upon this issue and thinks changing the Fedora 39 salt package's USE_VENDORED_TORNADO = True to USE_VENDORED_TORNADO = False is the obvious workaround: That did not work for me.

    Indeed, the results of that are...bad(tm).

  14. 16 remaining items

  15. hartwork commented on Dec 14, 2023

    @hartwork

    @limburgher could you turn that into a new issue with a traceback?

  16. mepreston commented on Feb 18, 2024

    @mepreston

    Salt is not yet ported to support Python 3.12, nor even 3.11 (ran into it being slower than Py 3.10 and have yet to find out why). From the versions report and the classic packaging tickbox, presume you are using the version of Salt provided by Fedora, don't see a Python 3.10.13 in the output which would indicate the OneDir architecture with built-in Python 3.10.

    Getting Salt on Python 3.12 is on the list, but small team, and juggling too many balls. Recent unexpected CVEs for 3005 and 3006 being a bump in the road.

    I've been without Salt now since the upgrade to Fedora 39. I use fedora repositories and avoid outside packaging. if the salt team is so small that it can't keep up with typical updates to python then i think i need to look for a better supported replacement. it seems python deprecation warnings were ignored in older versions till the feature was fully depreciated in 3.12, i.e. #66042 . So unless this is addressed sooner than later i will be looking for a salt replacement with better support.

  17. dmurphy18 commented on Feb 21, 2024

    @dmurphy18
    Contributor

    @mepreston Salt team doesn't produce the Fedora packages anymore since the move to using the 'onedir' architecture. Given Salt is supposed to be community driven, it would be great to get a contribution with tests which solves the issue with Python 3.12 support for which you are experiencing.

  18. DemiMarie commented on May 5, 2024

    @DemiMarie

    It looks like the Salt master is going to be dropped from Fedora 39.

  19. mepreston commented on May 5, 2024

    @mepreston

    to be clear salt hasn't worked since the release of Fedora 38 because fedora has Python 3.12 or higher. So it isn't going to work in Fedora 39 either. It might help if Salt has a policy of supporting the newer version of the products it depends on instead of picking and choosing which versions it will support.

  20. DemiMarie commented on May 5, 2024

    @DemiMarie

    @mepreston Upstream only supports onedir packaging, which avoids these problems because it just bundles all dependencies. Easy to maintain and test, terrible for distributions.

  21. dmurphy18 commented on May 6, 2024

    @dmurphy18
    Contributor

    @mepreston Is correct, imagine having to support RHEL 7 or 8 with the OS provided python 3.6.8, long EOL, it got to be such a PITA, including ancient versions of dependencies for example CherryPy , hence onedir where all dependencies are self-contained including the version of Python 3.10 (currently).

    Good news is that Python 3.12 will be supported soon, have it internally but still working on testing etc., and when it is ready, will move from Python 3.10 to 3.12 for the onedir architecture.

  22. bchill commented on Jul 2, 2024

    @bchill

    Installing the salt-minion rpm from the salt project repo for Fedora 40 on Fedora 41 works partially.

    The salt-minion can initiate contact with the master (e.g. initial key exchange, salt-call) as expected, but the master cannot see or initiate contact with the minion.

  23. DdangJin commented on Oct 20, 2025

    @DdangJin
    Contributor

    @dmurphy18
    Ubuntu 24.04 is also using python 3.12, and the same issue is happening when using salt-ssh.

    Will 3006.x resolve issues related to backports.ssl_match_hostname?
    releated patch

  24. added this to the Sulphur v3006.26 milestone on Jun 18, 2026
  25. added a commit that references this issue on Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugfedora

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions