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
salt --versions-report
Salt Version:
Salt: 3006.1
...
salt salt01 grains.get saltversion
salt01:
3006.1
salt salt01 grains.get saltversioninfo
salt01:
- 3006
- 1
salt salt01 salt_version.get_release_number 'Sulfur'
salt01:
No version assigned.
salt salt01 salt_version.equal 'Sulfur'
salt01:
False
salt salt01 salt_version.less_than 'Sulfur'
salt01:
True
salt salt01 salt_version.less_than '3006'
salt01:
The minion function caused an exception: Traceback (most recent call last):
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/minion.py", line 1935, in _thread_return
return_data = minion_instance._execute_job_function(
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/minion.py", line 1894, in _execute_job_function
return_data = self.executors[fname](opts, data, func, args, kwargs)
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 149, in __call__
return self.loader.run(run_func, *args, **kwargs)
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1232, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1247, in _run_as
return _func_or_method(*args, **kwargs)
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/executors/direct_call.py", line 10, in execute
return func(*args, **kwargs)
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 149, in __call__
return self.loader.run(run_func, *args, **kwargs)
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1232, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1247, in _run_as
return _func_or_method(*args, **kwargs)
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/salt_version.py", line 145, in less_than
if _check_release_cmp(name) == -1:
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/salt_version.py", line 161, in _check_release_cmp
map_version = get_release_number(name)
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/salt_version.py", line 69, in get_release_number
name = name.lower()
AttributeError: 'int' object has no attribute 'lower'
salt salt01 salt_version.less_than '3006.0'
salt01:
The minion function caused an exception: Traceback (most recent call last):
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/minion.py", line 1935, in _thread_return
return_data = minion_instance._execute_job_function(
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/minion.py", line 1894, in _execute_job_function
return_data = self.executors[fname](opts, data, func, args, kwargs)
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 149, in __call__
return self.loader.run(run_func, *args, **kwargs)
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1232, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1247, in _run_as
return _func_or_method(*args, **kwargs)
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/executors/direct_call.py", line 10, in execute
return func(*args, **kwargs)
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 149, in __call__
return self.loader.run(run_func, *args, **kwargs)
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1232, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1247, in _run_as
return _func_or_method(*args, **kwargs)
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/salt_version.py", line 145, in less_than
if _check_release_cmp(name) == -1:
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/salt_version.py", line 161, in _check_release_cmp
map_version = get_release_number(name)
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/salt_version.py", line 69, in get_release_number
name = name.lower()
AttributeError: 'float' object has no attribute 'lower'
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
salt salt01 salt_version.get_release_number 'Sulfur'
salt01:
No version assigned.
salt salt01 salt_version.equal 'Sulfur'
salt01:
False
salt salt01 salt_version.less_than 'Sulfur'
salt01:
True
Expected behavior
salt salt01 salt_version.get_release_number 'Sulfur'
salt01:
3006
salt salt01 salt_version.equal 'Sulfur'
salt01:
True
salt salt01 salt_version.less_than 'Sulfur'
salt01:
False
salt salt01 salt_version.less_than '3006'
salt01:
False
salt salt01 salt_version.less_than '3006.0'
salt01:
False
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
salt --versions-reportSalt Version:
Salt: 3006.1Python Version:
Python: 3.10.11 (main, May 5 2023, 02:31:54) [GCC 11.2.0]Dependency Versions:
cffi: 1.14.6cherrypy: unknowndateutil: 2.8.1docker-py: Not Installedgitdb: Not Installedgitpython: Not InstalledJinja2: 3.1.2libgit2: 1.5.0looseversion: 1.0.2M2Crypto: Not InstalledMako: Not Installedmsgpack: 1.0.2msgpack-pure: Not Installedmysql-python: Not Installedpackaging: 22.0pycparser: 2.21pycrypto: Not Installedpycryptodome: 3.9.8pygit2: 1.11.1python-gnupg: 0.4.8PyYAML: 5.4.1PyZMQ: 23.2.0relenv: 0.12.3smmap: Not Installedtimelib: 0.2.4Tornado: 4.5.3ZMQ: 4.3.4Salt Extensions:
saltext.bitwarden: 0.0.1b14System Versions:
dist: almalinux 8.7 Stone Smilodonlocale: utf-8machine: x86_64release: 4.18.0-425.19.2.el8_7.x86_64system: Linuxversion: AlmaLinux 8.7 Stone Smilodon
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Description
The salt_version module appears to be broken. Per this page: https://docs.saltproject.io/en/latest/topics/releases/version_numbers.html#version-numbers, Salt 3006.1 should have the codename
Sulfur
. However:Also, the docs at https://docs.saltproject.io/en/latest/ref/modules/all/salt.modules.salt_version.html claim you should also be able to pass a version number, but this results in a traceback:
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
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: