Repository navigation
Description
Description
On a master (ubuntu 20.04, 3006.9 salt packages installed) if I run "salt '*' grains.get saltversion" The responses are all as expected. But on a minion, if I run salt-call grains.get saltversion I get a different, incorrect response.
Also, on the master, salt --version returns 3007.1, despite 3006.9 being installed.
Setup
Just recently upgraded from 3002.8 to 3006.9 (big jump, yes, I know.)
Please be as specific as possible and give set-up details.
- [ x] on-prem machine
- [ x] 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
- [x ] classic packaging
- onedir packaging
- used bootstrap to install
Steps to Reproduce the behavior
On master:
saltmaster1:~# salt-call grains.get saltversion
local:
3007.1
saltmaster1:~# salt 'saltmaster1*' grains.get saltversion
saltmaster1.peak6.net:
3006.9
saltmaster1:~# salt --version
salt 3007.1 (Chlorine)
saltmaster1:~# dpkg -l | grep salt
ii salt-api 3006.9 amd64 Generic, modular network access system
ii salt-common 3006.9 amd64 shared libraries that salt requires for all packages
ii salt-master 3006.9 amd64 remote manager to administer servers via salt
ii salt-minion 3006.9 amd64 client package for salt, the distributed remote execution system
Expected behavior
All of the above commands should return 3006.9
Screenshots
If applicable, add screenshots to help explain your problem.
Versions Report
salt --versions-report
Salt Version:
Salt: 3007.1
Python Version:
Python: 3.8.10 (default, Mar 25 2024, 10:42:49)
Dependency Versions:
cffi: 1.17.1
cherrypy: 18.10.0
dateutil: 2.9.0.post0
docker-py: Not Installed
gitdb: 2.0.6
gitpython: 3.0.7
Jinja2: 2.10.1
libgit2: Not Installed
looseversion: 1.3.0
M2Crypto: Not Installed
Mako: Not Installed
msgpack: 1.1.0
msgpack-pure: Not Installed
mysql-python: Not Installed
packaging: 24.2
pycparser: 2.22
pycrypto: 2.6.1
pycryptodome: 3.21.0
pygit2: Not Installed
python-gnupg: 0.5.3
PyYAML: 5.3.1
PyZMQ: 26.2.0
relenv: Not Installed
smmap: 2.0.5
timelib: 0.3.0
Tornado: 6.4.1
ZMQ: 4.3.5
Salt Package Information:
Package Type: Not Installed
System Versions:
dist: ubuntu 18.04.2 focal
locale: utf-8
machine: x86_64
release: 5.4.0-164-generic
system: Linux
version: Ubuntu 18.04.2 focal
PASTE HEREAdditional context
Add any other context about the problem here.
Activity
welcome commentedon Nov 21, 2024
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
Please be sure to review our Code of Conduct. Also, check out some of our community resources including:
There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar.
If you have additional questions, email us at [email protected]. We’re glad you’ve joined our community and look forward to doing awesome things with you!
whytewolf commentedon Nov 22, 2024
just to be sure of some things, can you do a
apt list salt\* -aon the minion/master system? and paste the contents. within triple tick marks so that it parses out correctly.should look like the following except 3006.9 showing as latest installed.
Peak6DevOps commentedon Nov 22, 2024
Here you go:
Peak6DevOps commentedon Dec 11, 2024
Has anyone been able to recreate this?
whytewolf commentedon Dec 11, 2024
wait, i just noticed something about your versions info i hadn't before. the python version is showing as 3.8.10.
that is wrong for 3006.x and 3007.x versions installed from packages. how was salt originally installed? cause i don't think it was properly removed. it looks like it was pip installed or installed through github. into the system python.
Peak6DevOps commentedon Dec 11, 2024
We have a local mirror of the public saltstack repo. Salt was installed from that.
whytewolf commentedon Dec 11, 2024
that does not explain the difference in python version. it should be python 3.10 not 3.8.
whytewolf commentedon Dec 11, 2024
this is what it should look like.
also here is the python path.
whytewolf commentedon Dec 11, 2024
notice the salt package information. and python versions.
Peak6DevOps commentedon Dec 11, 2024
It seems to be using the wrong python env:
whytewolf commentedon Dec 11, 2024
yes. like i said before that looks like it is installed in your system python. that normally happens if you install through pip or github.
Peak6DevOps commentedon Dec 11, 2024
I can confirm that it was not installed by either of those methods. It was installed via apt. We upgraded from 3002.8 recently, but I can also confirm that that version (and previous versions) were all installed via apt.
whytewolf commentedon Dec 11, 2024
so. denying it happened isn't going to help. you have salt in your system python. I have no idea how you did it besides magic at this point since you say the only way it can happen wasn't used.
at this point. uninstall all salt. and run
apt autoremoveto cover any dependencies. and then remove the salt python package from your system pythonpip removeshould do it.after that you should be able to reinstall salt as you did before.
lkubb commentedon Dec 12, 2024
I suspect there could be a bug in the upgrade process from pre-onedir to onedir packages. I had to debug a similar weird issue in salt-extensions/saltext-vault#95 (comment) where the running master daemon was out of sync with the onedir version. This master was also upgraded from non-onedir to onedir.
Either way, the steps mentioned above should fix it.
whytewolf commentedon Dec 12, 2024
looking at that it looks like they did have a pip installed version. which could account for the random update to 3007.1 when they ran the pip install saltext-vault. as I'm sure you have salt as a dependency of vault and it would have tried to install the latest compatible version. the call script in /usr/local does point to a pip installed version of salt as well. pip within a venv.
it is possible someone did something similar here. ran pip install instead of salt-pip install for something that required salt. such as libpepper. or a saltext. which would pull in the latest version of salt into the environment that hosts pip. the pip installed version would overwrite the call scripts making it the default version.
there were problems with straight updating from nononedir to onedir without uninstalling first. but they were not the package being installed into the system python which it can't do. they were more along the lines of being unable to start salt as incompatible versions were fighting over the call scripts. and libraries being confused.
but agree. the directions given would fix it.
Peak6DevOps commentedon Dec 12, 2024
I think I was confused earlier. When you asked about salt being installed via pip or github, I thought you meant the salt-master and/or salt-minion. We do have python scripts that interact with salt, so it is quite likely that a version of the salt py module was installed via pip at some point.
rbgarga commentedon May 1, 2025
I built salt 3006.10 and noticed it was announcing its version as 3007.0
then I noticed the following code on
salt/version.pyconsidering the fact 3007 is the first one with
released=Falseit makes sense it's reporting it wrongFix wrong reported major version on the 3006.x branch
Forward-port 3006.x AsyncReqMessageClient and adapt tests
test_version: assert current_release() contract, not a hardcoded code…
test_version: assert current_release() contract, not a hardcoded code…