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
Description
When I call the salt python api in a virtual environment, the following error occurs:
salt 'test' test.ping
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.aix_group. Module will not be loaded: 'kernel'
[WARNING ] salt.loaded.int.module.aix_group.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'aix_group', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.aix_shadow. Module will not be loaded: 'kernel'
[WARNING ] salt.loaded.int.module.aix_shadow.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'aix_shadow', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.aixpkg. Module will not be loaded: 'os_family'
[WARNING ] salt.loaded.int.module.aixpkg.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'aixpkg', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.apache. Module will not be loaded: 'os_family'
[WARNING ] salt.loaded.int.module.apache.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'apache', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.bridge. Module will not be loaded: 'kernel'
[WARNING ] salt.loaded.int.module.bridge.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'bridge', please fix this.
/home/test/.pyenv/versions/3.11.0/envs/dbatask/lib/python3.11/site-packages/salt/utils/pycrypto.py:27: DeprecationWarning: 'crypt' is deprecated and slated for removal in Python 3.13
import crypt
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.deb_apache. Module will not be loaded: 'os_family'
[WARNING ] salt.loaded.int.module.deb_apache.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'deb_apache', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.debconfmod. Module will not be loaded: 'os_family'
[WARNING ] salt.loaded.int.module.debconfmod.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'debconfmod', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.debian_ip. Module will not be loaded: 'os_family'
[WARNING ] salt.loaded.int.module.debian_ip.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'debian_ip', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.debian_service. Module will not be loaded: 'os'
[WARNING ] salt.loaded.int.module.debian_service.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'debian_service', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.dpkg_lowpkg. Module will not be loaded: 'os_family'
[WARNING ] salt.loaded.int.module.dpkg_lowpkg.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'dpkg_lowpkg', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.eix. Module will not be loaded: 'os'
[WARNING ] salt.loaded.int.module.eix.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'eix', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.eselect. Module will not be loaded: 'os'
[WARNING ] salt.loaded.int.module.eselect.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'eselect', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.freebsd_sysctl. Module will not be loaded: 'os'
[WARNING ] salt.loaded.int.module.freebsd_sysctl.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'freebsd_sysctl', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.freebsd_update. Module will not be loaded: 'os'
[WARNING ] salt.loaded.int.module.freebsd_update.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'freebsd_update', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.freebsdjail. Module will not be loaded: 'os'
[WARNING ] salt.loaded.int.module.freebsdjail.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'freebsdjail', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.freebsdkmod. Module will not be loaded: 'kernel'
[WARNING ] salt.loaded.int.module.freebsdkmod.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'freebsdkmod', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.freebsdpkg. Module will not be loaded: 'os'
[WARNING ] salt.loaded.int.module.freebsdpkg.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'freebsdpkg', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.freebsdports. Module will not be loaded: 'os'
[WARNING ] salt.loaded.int.module.freebsdports.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'freebsdports', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.freebsdservice. Module will not be loaded: 'os'
[WARNING ] salt.loaded.int.module.freebsdservice.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'freebsdservice', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.gentoo_service. Module will not be loaded: 'os'
[WARNING ] salt.loaded.int.module.gentoo_service.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'gentoo_service', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.gentoolkitmod. Module will not be loaded: 'os'
[WARNING ] salt.loaded.int.module.gentoolkitmod.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'gentoolkitmod', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.groupadd. Module will not be loaded: 'kernel'
[WARNING ] salt.loaded.int.module.groupadd.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'groupadd', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.grub_legacy. Module will not be loaded: 'os_family'
[WARNING ] salt.loaded.int.module.grub_legacy.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'grub_legacy', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.kmod. Module will not be loaded: 'kernel'
[WARNING ] salt.loaded.int.module.kmod.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'kmod', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.layman. Module will not be loaded: 'os'
[WARNING ] salt.loaded.int.module.layman.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'layman', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.linux_ip. Module will not be loaded: 'os_family'
[WARNING ] salt.loaded.int.module.linux_ip.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'linux_ip', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.linux_service. Module will not be loaded: 'kernel'
[WARNING ] salt.loaded.int.module.linux_service.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'linux_service', please fix this.
/home/test/.pyenv/versions/3.11.0/envs/dbatask/lib/python3.11/site-packages/salt/modules/linux_shadow.py:21: DeprecationWarning: 'spwd' is deprecated and slated for removal in Python 3.13
import spwd
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.linux_sysctl. Module will not be loaded: 'kernel'
[WARNING ] salt.loaded.int.module.linux_sysctl.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'linux_sysctl', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.logadm. Module will not be loaded: 'os_family'
[WARNING ] salt.loaded.int.module.logadm.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'logadm', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.mac_brew_pkg. Module will not be loaded: 'os'
[WARNING ] salt.loaded.int.module.mac_brew_pkg.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'mac_brew_pkg', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.mac_sysctl. Module will not be loaded: 'os'
[WARNING ] salt.loaded.int.module.mac_sysctl.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'mac_sysctl', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.mac_xattr. Module will not be loaded: 'os'
[WARNING ] salt.loaded.int.module.mac_xattr.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'mac_xattr', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.makeconf. Module will not be loaded: 'os'
[WARNING ] salt.loaded.int.module.makeconf.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'makeconf', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.mdadm_raid. Module will not be loaded: 'kernel'
[WARNING ] salt.loaded.int.module.mdadm_raid.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'mdadm_raid', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.netbsd_sysctl. Module will not be loaded: 'os'
[WARNING ] salt.loaded.int.module.netbsd_sysctl.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'netbsd_sysctl', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.netbsdservice. Module will not be loaded: 'os'
[WARNING ] salt.loaded.int.module.netbsdservice.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'netbsdservice', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.nilrt_ip. Module will not be loaded: 'os_family'
[WARNING ] salt.loaded.int.module.nilrt_ip.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'nilrt_ip', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.nspawn. Module will not be loaded: 'kernel'
[WARNING ] salt.loaded.int.module.nspawn.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'nspawn', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.openbsd_sysctl. Module will not be loaded: 'os'
[WARNING ] salt.loaded.int.module.openbsd_sysctl.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'openbsd_sysctl', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.openbsdpkg. Module will not be loaded: 'os'
[WARNING ] salt.loaded.int.module.openbsdpkg.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'openbsdpkg', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.openbsdrcctl_service. Module will not be loaded: 'os'
[WARNING ] salt.loaded.int.module.openbsdrcctl_service.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'openbsdrcctl_service', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.openbsdservice. Module will not be loaded: 'os'
[WARNING ] salt.loaded.int.module.openbsdservice.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'openbsdservice', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.pacmanpkg. Module will not be loaded: 'os_family'
[WARNING ] salt.loaded.int.module.pacmanpkg.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'pacmanpkg', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.pf. Module will not be loaded: 'os'
[WARNING ] salt.loaded.int.module.pf.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'pf', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.pkgin. Module will not be loaded: 'os'
[WARNING ] salt.loaded.int.module.pkgin.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'pkgin', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.pkgng. Module will not be loaded: 'kernel'
[WARNING ] salt.loaded.int.module.pkgng.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'pkgng', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.pkgutil. Module will not be loaded: 'os_family'
[WARNING ] salt.loaded.int.module.pkgutil.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'pkgutil', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.poudriere. Module will not be loaded: 'os'
[WARNING ] salt.loaded.int.module.poudriere.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'poudriere', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.pw_group. Module will not be loaded: 'kernel'
[WARNING ] salt.loaded.int.module.pw_group.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'pw_group', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.pw_user. Module will not be loaded: 'kernel'
[WARNING ] salt.loaded.int.module.pw_user.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'pw_user', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.rbac_solaris. Module will not be loaded: 'kernel'
[WARNING ] salt.loaded.int.module.rbac_solaris.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'rbac_solaris', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.rh_ip. Module will not be loaded: 'os_family'
[WARNING ] salt.loaded.int.module.rh_ip.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'rh_ip', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.selinux. Module will not be loaded: 'kernel'
[WARNING ] salt.loaded.int.module.selinux.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'selinux', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.slackware_service. Module will not be loaded: 'os'
[WARNING ] salt.loaded.int.module.slackware_service.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'slackware_service', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.smf_service. Module will not be loaded: 'os_family'
[WARNING ] salt.loaded.int.module.smf_service.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'smf_service', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.solaris_group. Module will not be loaded: 'kernel'
[WARNING ] salt.loaded.int.module.solaris_group.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'solaris_group', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.solaris_user. Module will not be loaded: 'kernel'
[WARNING ] salt.loaded.int.module.solaris_user.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'solaris_user', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.solarisipspkg. Module will not be loaded: 'os_family'
[WARNING ] salt.loaded.int.module.solarisipspkg.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'solarisipspkg', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.solarispkg. Module will not be loaded: 'os_family'
[WARNING ] salt.loaded.int.module.solarispkg.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'solarispkg', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.suse_ip. Module will not be loaded: 'os_family'
[WARNING ] salt.loaded.int.module.suse_ip.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'suse_ip', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.useradd. Module will not be loaded: 'kernel'
[WARNING ] salt.loaded.int.module.useradd.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'useradd', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.vmctl. Module will not be loaded: 'os'
[WARNING ] salt.loaded.int.module.vmctl.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'vmctl', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.xapi_virt. Module will not be loaded: 'os'
[WARNING ] salt.loaded.int.module.xapi_virt.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'xapi_virt', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.xbpspkg. Module will not be loaded: 'os'
[WARNING ] salt.loaded.int.module.xbpspkg.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'xbpspkg', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.zoneadm. Module will not be loaded: 'kernel'
[WARNING ] salt.loaded.int.module.zoneadm.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'zoneadm', please fix this.
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.zonecfg. Module will not be loaded: 'kernel'
[WARNING ] salt.loaded.int.module.zonecfg.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'zonecfg', please fix this.
[WARNING ] Returner unavailable: 'mysql.get_load'
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.
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
pyenv activate test
salt 'test' test.ping
Expected behavior
How to solve these errors
Versions Report
Salt -VSalt Version:
Salt: 3007.1Python Version:
Python: 3.11.0 (main, Sep 26 2024, 16:43:37) [GCC 8.5.0 20210514 (Red Hat 8.5.0-22)]Dependency Versions:
cffi: 1.16.0cherrypy: 18.10.0dateutil: 2.8.2docker-py: Not Installedgitdb: Not Installedgitpython: Not InstalledJinja2: 3.1.3libgit2: Not Installedlooseversion: 1.3.0M2Crypto: Not InstalledMako: Not Installedmsgpack: 1.0.7msgpack-pure: Not Installedmysql-python: Not Installedpackaging: 23.2pycparser: 2.21pycrypto: 2.6.1pycryptodome: 3.20.0pygit2: Not Installedpython-gnupg: 0.5.3PyYAML: 6.0.1PyZMQ: 25.1.2relenv: 0.16.0smmap: Not Installedtimelib: 0.3.0Tornado: 6.4ZMQ: 4.3.4Salt Package Information:
Package Type: Not InstalledSystem Versions:
dist: centos 8.3.2011 locale: utf-8machine: x86_64release: 4.18.0-240.el8.x86_64system: Linuxversion: CentOS Linux 8.3.2011
Additional context
I always thought it was a problem with a module in Salt. Later, I accidentally discovered that there was no error when using the system Salt to execute, but an error would be reported when entering the virtual environment. Therefore, I thought it might be a problem with some dependencies in the virtual environment. I compared the Salt report output in the virtual environment and the system environment and found some differences, but I couldn't find the specific problem.
salt -V
Salt Version:
Salt: 3007.1
Python Version:
Python: 3.10.14 (main, Apr 3 2024, 21:30:09) [GCC 11.2.0]
Dependency Versions:
cffi: 1.16.0
cherrypy: 18.10.0
dateutil: 2.8.2
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 3.1.4
libgit2: Not Installed
looseversion: 1.3.0
M2Crypto: Not Installed
Mako: Not Installed
msgpack: 1.0.7
msgpack-pure: Not Installed
mysql-python: Not Installed
packaging: 23.1
pycparser: 2.21
pycrypto: Not Installed
pycryptodome: 3.19.1
pygit2: Not Installed
python-gnupg: 0.5.2
PyYAML: 6.0.1
PyZMQ: 25.1.2
relenv: 0.16.0
smmap: Not Installed
timelib: 0.3.0
Tornado: 6.3.3
ZMQ: 4.3.4
Salt Package Information:
Package Type: onedir
System Versions:
dist: centos 8.3.2011
locale: utf-8
machine: x86_64
release: 4.18.0-240.el8.x86_64
system: Linux
version: CentOS Linux 8.3.2011
The text was updated successfully, but these errors were encountered:
@Runbacktoo Can you try this on an OS that is not EOL Centos 8 and Centos Stream 8 are both EOL, for example Rocky Linux 8 would be a good alternative.
Runbacktoo
changed the title
[BUG]
[BUG] When executing Salt in the Python virtual environment, there will be some error prompts (which will not affect task execution)
Sep 27, 2024
@Runbacktoo Can you try this on an OS that is not EOL Centos 8 and Centos Stream 8 are both EOL, for example Rocky Linux 8 would be a good alternative.
Because of my network speed limit, it is difficult to try on other Linux systems that are not installed. I tried it on redhat, and the results are the same. When using salt in a virtual environment, an error message will appear.
There is one thing I may not explain: my virtual environment is created under a normal user using pyenv, and salt is installed using pip in the virtual environment. In the system environment, salt is installed using the rpm package.
I think it may be that the two installation methods handle salt dependencies differently. They have the same version, both 3007.1, but I don’t know which dependencies they are.
@Runbacktoo Can you try this on an OS that is not EOL Centos 8 and Centos Stream 8 are both EOL, for example Rocky Linux 8 would be a good alternative.
Because of my network speed limit, it is difficult to try on other Linux systems that are not installed. I tried it on redhat, and the results are the same. When using salt in a virtual environment, an error message will appear. There is one thing I may not explain: my virtual environment is created under a normal user using pyenv, and salt is installed using pip in the virtual environment. In the system environment, salt is installed using the rpm package. I think it may be that the two installation methods handle salt dependencies differently. They have the same version, both 3007.1, but I don’t know which dependencies they are.
Following is the salt report output for a virtual environment on a redhat system
salt -V
Salt Version:
Salt: 3007.1
Python Version:
Python: 3.9.18 (main, Jun 25 2024, 09:06:31)
Dependency Versions:
cffi: 1.16.0
cherrypy: 18.10.0
dateutil: 2.9.0.post0
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 3.1.4
libgit2: Not Installed
looseversion: 1.3.0
M2Crypto: Not Installed
Mako: Not Installed
msgpack: 1.0.8
msgpack-pure: Not Installed
mysql-python: Not Installed
packaging: 24.1
pycparser: 2.22
pycrypto: 3.20.0
pycryptodome: 3.20.0
pygit2: Not Installed
python-gnupg: 0.5.3
PyYAML: 6.0.1
PyZMQ: 26.0.3
relenv: Not Installed
smmap: Not Installed
timelib: 0.3.0
Tornado: 6.4.1
ZMQ: 4.3.5
Salt Package Information:
Package Type: Not Installed
System Versions:
dist: rhel 7.9 Maipo
locale: utf-8
machine: x86_64
release: 3.10.0-1160.el7.x86_64
system: Linux
version: Red Hat Enterprise Linux Server 7.9 Maipo
Description
When I call the salt python api in a virtual environment, the following error occurs:
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
Expected behavior
How to solve these errors
Versions Report
Additional context
I always thought it was a problem with a module in Salt. Later, I accidentally discovered that there was no error when using the system Salt to execute, but an error would be reported when entering the virtual environment. Therefore, I thought it might be a problem with some dependencies in the virtual environment. I compared the Salt report output in the virtual environment and the system environment and found some differences, but I couldn't find the specific problem.
The text was updated successfully, but these errors were encountered: