Closed sayf-eddine-scality closed 3 months ago
Hi @sayf-eddine-scality I am interested to regain salt-api function on RockLinux/RHEL using onedir(self-contained python in /opt/salt/*). I will setup test VM for this endeavor.
@sayf-eddine-scality From the version of Python
Python Version:
Python: 3.9.18 (main, Jul 3 2024, 00:00:00)
I can assume that you used bootstrap to install Salt, rather than the packaged versions which use Python 3.10. The most recent version of the bootstrap script now installs salt-api, previously it did not.
I suggest that you use the packaged versions of Salt, see https://docs.saltproject.io/salt/install-guide/en/latest/topics/install-by-operating-system/rhel.html#install-salt-on-redhat-rhel-9-x86-64.
The only other way to install Salt and have Python 3.9, other than bootstrap would be to pip install salt, recommend installing packages which are tested and supported (recommend for production environments), otherwise your mileage may vary.
If this resolves your issue, please consider closing it, unless you have other information pertinent to the issue
we actually package salt ourselves from the source, you think the issue is python3.9? I ll dig deeper
@sayf-eddine-scality You do your own packaging then you are responsible for delivery of salt-api, and I shall close this as not the Salt Projects problem.
Yes, Python 3.9 is a problem since the onedir architecture embeds Python 3.10 and everything is tested using Python 3.10 (currently working on getting Python 3.12 working but having issues). Python 3.10 will have deprecated some items and may have removed them that are present in Python 3.9.
Given that there are perfectly fine packages for RHEL 9 available from Salt, and the reduced size of the Salt Team recently, not that much help can be fore-coming from the Salt Team on helping you create your own packages.
Description Running salt-api with the following config
Fails with the following exception
Setup (Please provide relevant configs and/or SLS files (be sure to remove sensitive info. There is no general set-up of Salt.)
Please be as specific as possible and give set-up details.
Steps to Reproduce the behavior (Include debug logs if possible and relevant)
Expected behavior Salt API to respond 200 OK
Screenshots If applicable, add screenshots to help explain your problem.
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.) ```yaml Salt Version: Salt: 3007.1 Python Version: Python: 3.9.18 (main, Jul 3 2024, 00:00:00) Dependency Versions: cffi: 1.14.5 cherrypy: unknown dateutil: 2.8.1 docker-py: Not Installed gitdb: Not Installed gitpython: Not Installed Jinja2: 3.1.2 libgit2: Not Installed looseversion: 1.2.0 M2Crypto: 0.38.0 Mako: 1.1.2 msgpack: 1.0.3 msgpack-pure: Not Installed mysql-python: Not Installed packaging: 21.3 pycparser: 2.20 pycrypto: Not Installed pycryptodome: 3.20.0 pygit2: Not Installed python-gnupg: 0.4.8 PyYAML: 5.4.1 PyZMQ: 22.3.0 relenv: Not Installed smmap: Not Installed timelib: 0.3.0 Tornado: 6.3.3 ZMQ: 4.3.4 Salt Package Information: Package Type: Not Installed System Versions: dist: rhel 9.4 Plow locale: utf-8 machine: x86_64 release: 5.14.0-362.13.1.el9_3.x86_64 system: Linux version: Red Hat Enterprise Linux 9.4 Plow ```Additional context It seems the ioloop is not sent to the Lock object, because when I modifie it manually
vim /usr/lib/python3.9/site-packages/salt/transport/zeromq.py +1084
It works.