You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Salt master-initiated jobs no longer work after master upgraded to Fedora 39/Python 3.12 #65360
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.3Python 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.1cherrypy: 18.8.0dateutil: 2.8.2docker-py: Not Installedgitdb: 4.0.10gitpython: 3.1.32Jinja2: 3.1.2libgit2: 1.7.1looseversion: 1.3.0M2Crypto: Not InstalledMako: 1.2.3msgpack: 1.0.5msgpack-pure: Not Installedmysql-python: Not Installedpackaging: 23.1pycparser: 2.20pycrypto: 2.6.1pycryptodome: 3.19.0pygit2: 1.13.0python-gnupg: 0.5.0PyYAML: 6.0.1PyZMQ: 25.1.0relenv: Not Installedsmmap: 5.0.0timelib: Not InstalledTornado: 6.3.3ZMQ: 4.3.4System Versions:
dist: fedora 39 locale: utf-8machine: x86_64release: 6.5.5-300.fc39.x86_64system: Linuxversion: Fedora Linux 39
Additional context
I've checked firewall ports, tcp connectivity, DNS, and rekeyed the master and minions. Nothing helps.
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.
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.
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.
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.
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.
@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.
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.
@mepreston Upstream only supports onedir packaging, which avoids these problems because it just bundles all dependencies. Easy to maintain and test, terrible for distributions.
@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.
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.
Activity
limburgher commentedon Oct 6, 2023
Additionally, salt-call works from minions on all sls I've tested.
limburgher commentedon Oct 6, 2023
One exception: salt-call failed to add an apply job to the scheduler from an sls.
Vaelatern commentedon Oct 18, 2023
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
ifcondition below is the root of the problem. Thematch_hostnamefunction was deprecated in 3.7, and removed in 3.12.Vaelatern commentedon Oct 18, 2023
An error stacktrace for the curious
Note well how using upstream tornado would fix this.
limburgher commentedon Oct 18, 2023
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?
Vaelatern commentedon Oct 18, 2023
I would expect upstream tornado to land in 3007. I would expect 3007 to land in the next 10 days or so.
limburgher commentedon Oct 18, 2023
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.
Vaelatern commentedon Oct 18, 2023
I am not affiliated with the salt project, I've only gotten minor patches in before.
limburgher commentedon Nov 14, 2023
Has anyone heard anything on the timeline for 3007?
Vaelatern commentedon Nov 15, 2023
Nope. I keep reloading https://docs.saltproject.io/salt/install-guide/en/latest/topics/salt-version-support-lifecycle.html hoping to see news.
ndim commentedon Nov 16, 2023
Just in case someone stumbles upon this issue and thinks changing the Fedora 39 salt package's
USE_VENDORED_TORNADO = TruetoUSE_VENDORED_TORNADO = Falseis the obvious workaround: That did not work for me.limburgher commentedon Nov 16, 2023
Indeed, the results of that are...bad(tm).
16 remaining items
hartwork commentedon Dec 14, 2023
@limburgher could you turn that into a new issue with a traceback?
mepreston commentedon Feb 18, 2024
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.
dmurphy18 commentedon Feb 21, 2024
@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.
DemiMarie commentedon May 5, 2024
It looks like the Salt master is going to be dropped from Fedora 39.
mepreston commentedon May 5, 2024
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.
DemiMarie commentedon May 5, 2024
@mepreston Upstream only supports onedir packaging, which avoids these problems because it just bundles all dependencies. Easy to maintain and test, terrible for distributions.
dmurphy18 commentedon May 6, 2024
@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.
bchill commentedon Jul 2, 2024
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.
hartwork commentedon Dec 12, 2024
That link has gone 404, if anyony else needs a working version of that link: https://src.fedoraproject.org/rpms/salt/blob/f41/f/match_hostname.patch
DdangJin commentedon Oct 20, 2025
@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
Add regression test + changelog for #65360 Py3.12 netutil import