Skip to content

[BUG] Minion and master report different saltversions #67061

Closed

Description

@Peak6DevOps

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 HERE

Additional context
Add any other context about the problem here.

Activity

  1. added
    bug
    on Nov 21, 2024
  2. welcome commented on Nov 21, 2024

    @welcome

    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!

  3. whytewolf commented on Nov 22, 2024

    @whytewolf
    Collaborator

    just to be sure of some things, can you do a apt list salt\* -a on 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.

    root@salt00:/srv/salt/tests# apt list salt\* -a
    Listing... Done
    salt-api/stable,now 3007.1 amd64 [installed]
    salt-api/stable 3007.0 amd64
    salt-api/stable 3006.9 amd64
    salt-api/stable 3006.8 amd64
    salt-api/stable 3006.7 amd64
    salt-api/stable 3006.6 amd64
    salt-api/stable 3006.5 amd64
    salt-api/stable 3006.4 amd64
    salt-api/stable 3006.3 amd64
    salt-api/stable 3006.2 amd64
    salt-api/stable 3006.1 amd64
    salt-api/stable 3006.0 amd64
    salt-api/jammy 3004.1+dfsg-2 amd64
    
    salt-cloud/stable,now 3007.1 amd64 [installed]
    salt-cloud/stable 3007.0 amd64
    salt-cloud/stable 3006.9 amd64
    salt-cloud/stable 3006.8 amd64
    salt-cloud/stable 3006.7 amd64
    salt-cloud/stable 3006.6 amd64
    salt-cloud/stable 3006.5 amd64
    salt-cloud/stable 3006.4 amd64
    salt-cloud/stable 3006.3 amd64
    salt-cloud/stable 3006.2 amd64
    salt-cloud/stable 3006.1 amd64
    salt-cloud/stable 3006.0 amd64
    salt-cloud/jammy 3004.1+dfsg-2 amd64
    
    salt-common/stable,now 3007.1 amd64 [installed,automatic]
    salt-common/stable 3007.0 amd64
    salt-common/stable 3006.9 amd64
    salt-common/stable 3006.8 amd64
    salt-common/stable 3006.7 amd64
    salt-common/stable 3006.6 amd64
    salt-common/stable 3006.5 amd64
    salt-common/stable 3006.4 amd64
    salt-common/stable 3006.3 amd64
    salt-common/stable 3006.2 amd64
    salt-common/stable 3006.1 amd64
    salt-common/stable 3006.0 amd64
    salt-common/jammy 3004.1+dfsg-2 amd64
    
    salt-dbg/stable,now 3007.1 amd64 [installed]
    salt-dbg/stable 3007.0 amd64
    salt-dbg/stable 3006.9 amd64
    salt-dbg/stable 3006.8 amd64
    salt-dbg/stable 3006.7 amd64
    salt-dbg/stable 3006.6 amd64
    salt-dbg/stable 3006.5 amd64
    salt-dbg/stable 3006.4 amd64
    salt-dbg/stable 3006.3 amd64
    
    salt-doc/jammy 3004.1+dfsg-2 all
    
    salt-master/stable,now 3007.1 amd64 [installed]
    salt-master/stable 3007.0 amd64
    salt-master/stable 3006.9 amd64
    salt-master/stable 3006.8 amd64
    salt-master/stable 3006.7 amd64
    salt-master/stable 3006.6 amd64
    salt-master/stable 3006.5 amd64
    salt-master/stable 3006.4 amd64
    salt-master/stable 3006.3 amd64
    salt-master/stable 3006.2 amd64
    salt-master/stable 3006.1 amd64
    salt-master/stable 3006.0 amd64
    salt-master/jammy 3004.1+dfsg-2 amd64
    
    salt-minion/stable,now 3007.1 amd64 [installed]
    salt-minion/stable 3007.0 amd64
    salt-minion/stable 3006.9 amd64
    salt-minion/stable 3006.8 amd64
    salt-minion/stable 3006.7 amd64
    salt-minion/stable 3006.6 amd64
    salt-minion/stable 3006.5 amd64
    salt-minion/stable 3006.4 amd64
    salt-minion/stable 3006.3 amd64
    salt-minion/stable 3006.2 amd64
    salt-minion/stable 3006.1 amd64
    salt-minion/stable 3006.0 amd64
    salt-minion/jammy 3004.1+dfsg-2 amd64
    
    salt-pepper/jammy 0.5.5-1 all
    
    salt-proxy/jammy 3004.1+dfsg-2 all
    
    salt-ssh/stable,now 3007.1 amd64 [installed]
    salt-ssh/stable 3007.0 amd64
    salt-ssh/stable 3006.9 amd64
    salt-ssh/stable 3006.8 amd64
    salt-ssh/stable 3006.7 amd64
    salt-ssh/stable 3006.6 amd64
    salt-ssh/stable 3006.5 amd64
    salt-ssh/stable 3006.4 amd64
    salt-ssh/stable 3006.3 amd64
    salt-ssh/stable 3006.2 amd64
    salt-ssh/stable 3006.1 amd64
    salt-ssh/stable 3006.0 amd64
    salt-ssh/jammy 3004.1+dfsg-2 amd64
    
    salt-syndic/stable 3007.1 amd64
    salt-syndic/stable 3007.0 amd64
    salt-syndic/stable 3006.9 amd64
    salt-syndic/stable 3006.8 amd64
    salt-syndic/stable 3006.7 amd64
    salt-syndic/stable 3006.6 amd64
    salt-syndic/stable 3006.5 amd64
    salt-syndic/stable 3006.4 amd64
    salt-syndic/stable 3006.3 amd64
    salt-syndic/stable 3006.2 amd64
    salt-syndic/stable 3006.1 amd64
    salt-syndic/stable 3006.0 amd64
    salt-syndic/jammy 3004.1+dfsg-2 amd64
    
  4. Peak6DevOps commented on Nov 22, 2024

    @Peak6DevOps
    Author

    Here you go:

    saltmaster1:~# apt list salt\* -a
    Listing... Done
    salt-api/stable 3007.1 amd64
    salt-api/stable 3007.0 amd64
    salt-api/stable,now 3006.9 amd64 [installed]
    salt-api/stable 3006.8 amd64
    salt-api/stable 3006.7 amd64
    salt-api/stable 3006.6 amd64
    salt-api/stable 3006.5 amd64
    salt-api/stable 3006.4 amd64
    salt-api/stable 3006.3 amd64
    salt-api/stable 3006.2 amd64
    salt-api/stable 3006.1 amd64
    salt-api/stable 3006.0 amd64
    salt-api/bionic 3000.3+ds-1 amd64
    
    salt-cloud/stable 3007.1 amd64
    salt-cloud/stable 3007.0 amd64
    salt-cloud/stable 3006.9 amd64
    salt-cloud/stable 3006.8 amd64
    salt-cloud/stable 3006.7 amd64
    salt-cloud/stable 3006.6 amd64
    salt-cloud/stable 3006.5 amd64
    salt-cloud/stable 3006.4 amd64
    salt-cloud/stable 3006.3 amd64
    salt-cloud/stable 3006.2 amd64
    salt-cloud/stable 3006.1 amd64
    salt-cloud/stable 3006.0 amd64
    salt-cloud/bionic 3000.3+ds-1 amd64
    
    salt-common/stable 3007.1 amd64
    salt-common/stable 3007.0 amd64
    salt-common/stable,now 3006.9 amd64 [installed,automatic]
    salt-common/stable 3006.8 amd64
    salt-common/stable 3006.7 amd64
    salt-common/stable 3006.6 amd64
    salt-common/stable 3006.5 amd64
    salt-common/stable 3006.4 amd64
    salt-common/stable 3006.3 amd64
    salt-common/stable 3006.2 amd64
    salt-common/stable 3006.1 amd64
    salt-common/stable 3006.0 amd64
    salt-common/bionic 3000.3+ds-1 amd64
    
    salt-dbg/stable 3007.1 amd64
    salt-dbg/stable 3007.0 amd64
    salt-dbg/stable 3006.9 amd64
    salt-dbg/stable 3006.8 amd64
    salt-dbg/stable 3006.7 amd64
    salt-dbg/stable 3006.6 amd64
    salt-dbg/stable 3006.5 amd64
    salt-dbg/stable 3006.4 amd64
    salt-dbg/stable 3006.3 amd64
    
    salt-master/stable 3007.1 amd64
    salt-master/stable 3007.0 amd64
    salt-master/stable,now 3006.9 amd64 [installed]
    salt-master/stable 3006.8 amd64
    salt-master/stable 3006.7 amd64
    salt-master/stable 3006.6 amd64
    salt-master/stable 3006.5 amd64
    salt-master/stable 3006.4 amd64
    salt-master/stable 3006.3 amd64
    salt-master/stable 3006.2 amd64
    salt-master/stable 3006.1 amd64
    salt-master/stable 3006.0 amd64
    salt-master/bionic 3000.3+ds-1 amd64
    
    salt-minion/stable 3007.1 amd64
    salt-minion/stable 3007.0 amd64
    salt-minion/stable,now 3006.9 amd64 [installed]
    salt-minion/stable 3006.8 amd64
    salt-minion/stable 3006.7 amd64
    salt-minion/stable 3006.6 amd64
    salt-minion/stable 3006.5 amd64
    salt-minion/stable 3006.4 amd64
    salt-minion/stable 3006.3 amd64
    salt-minion/stable 3006.2 amd64
    salt-minion/stable 3006.1 amd64
    salt-minion/stable 3006.0 amd64
    salt-minion/bionic 3000.3+ds-1 amd64
    
    salt-pepper/focal 0.5.5-1 all
    
    salt-ssh/stable 3007.1 amd64
    salt-ssh/stable 3007.0 amd64
    salt-ssh/stable 3006.9 amd64
    salt-ssh/stable 3006.8 amd64
    salt-ssh/stable 3006.7 amd64
    salt-ssh/stable 3006.6 amd64
    salt-ssh/stable 3006.5 amd64
    salt-ssh/stable 3006.4 amd64
    salt-ssh/stable 3006.3 amd64
    salt-ssh/stable 3006.2 amd64
    salt-ssh/stable 3006.1 amd64
    salt-ssh/stable 3006.0 amd64
    salt-ssh/bionic 3000.3+ds-1 amd64
    
    salt-syndic/stable 3007.1 amd64
    salt-syndic/stable 3007.0 amd64
    salt-syndic/stable 3006.9 amd64
    salt-syndic/stable 3006.8 amd64
    salt-syndic/stable 3006.7 amd64
    salt-syndic/stable 3006.6 amd64
    salt-syndic/stable 3006.5 amd64
    salt-syndic/stable 3006.4 amd64
    salt-syndic/stable 3006.3 amd64
    salt-syndic/stable 3006.2 amd64
    salt-syndic/stable 3006.1 amd64
    salt-syndic/stable 3006.0 amd64
    salt-syndic/bionic 3000.3+ds-1 amd64
    
  5. Peak6DevOps commented on Dec 11, 2024

    @Peak6DevOps
    Author

    Has anyone been able to recreate this?

  6. whytewolf commented on Dec 11, 2024

    @whytewolf
    Collaborator

    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.

  7. Peak6DevOps commented on Dec 11, 2024

    @Peak6DevOps
    Author

    We have a local mirror of the public saltstack repo. Salt was installed from that.

  8. whytewolf commented on Dec 11, 2024

    @whytewolf
    Collaborator

    that does not explain the difference in python version. it should be python 3.10 not 3.8.

  9. whytewolf commented on Dec 11, 2024

    @whytewolf
    Collaborator

    this is what it should look like.

    root@salt00:~# salt-call --versions
    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.8.0
          dateutil: 2.8.2
         docker-py: Not Installed
             gitdb: Not Installed
         gitpython: Not Installed
            Jinja2: 3.1.4
           libgit2: 1.7.2
      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: 1.14.1
      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: ubuntu 24.04.1 noble
            locale: utf-8
           machine: x86_64
           release: 6.8.0-49-generic
            system: Linux
           version: Ubuntu 24.04.1 noble
    

    also here is the python path.

    root@salt00:~# salt-call grains.get pythonpath
    local:
        - /opt/saltstack/salt
        - /opt/saltstack/salt/extras-3.10
        - /opt/saltstack/salt/lib/python310.zip
        - /opt/saltstack/salt/lib/python3.10
        - /opt/saltstack/salt/lib/python3.10/lib-dynload
        - /opt/saltstack/salt/lib/python3.10/site-packages
    
  10. whytewolf commented on Dec 11, 2024

    @whytewolf
    Collaborator

    notice the salt package information. and python versions.

  11. Peak6DevOps commented on Dec 11, 2024

    @Peak6DevOps
    Author

    It seems to be using the wrong python env:

    local:
        - /usr/local/bin
        - /usr/lib/python38.zip
        - /usr/lib/python3.8
        - /usr/lib/python3.8/lib-dynload
        - /usr/local/lib/python3.8/dist-packages
        - /usr/lib/python3/dist-packages
    
  12. whytewolf commented on Dec 11, 2024

    @whytewolf
    Collaborator

    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.

  13. Peak6DevOps commented on Dec 11, 2024

    @Peak6DevOps
    Author

    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.

  14. whytewolf commented on Dec 11, 2024

    @whytewolf
    Collaborator

    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 autoremove to cover any dependencies. and then remove the salt python package from your system python pip remove should do it.

    after that you should be able to reinstall salt as you did before.

  15. lkubb commented on Dec 12, 2024

    @lkubb
    Contributor

    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.

  16. whytewolf commented on Dec 12, 2024

    @whytewolf
    Collaborator

    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.

    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.

  17. Peak6DevOps commented on Dec 12, 2024

    @Peak6DevOps
    Author

    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.

  18. rbgarga commented on May 1, 2025

    @rbgarga

    I built salt 3006.10 and noticed it was announcing its version as 3007.0

    $ grep -i version salt.egg-info/PKG-INFO
    Metadata-Version: 2.4
    Version: 3007.0

    then I noticed the following code on salt/version.py

        @classmethod
        def current_release(cls):
            if cls._current_release is None:
                for version in cls.versions():
                    if version.released is False:
                        cls._current_release = version
                        break
            return cls._current_release

    considering the fact 3007 is the first one with released = False it makes sense it's reporting it wrong

        # pylint: disable=bad-whitespace
        # ----- Please refrain from fixing whitespace ---------------------------------->
        # The idea is to keep this readable.
        # -------------------------------------------------------------------------------
        # fmt: off
        HYDROGEN      = SaltVersion("Hydrogen"     , info=(2014, 1),  released=True)
        HELIUM        = SaltVersion("Helium"       , info=(2014, 7),  released=True)
        LITHIUM       = SaltVersion("Lithium"      , info=(2015, 5),  released=True)
        BERYLLIUM     = SaltVersion("Beryllium"    , info=(2015, 8),  released=True)
        BORON         = SaltVersion("Boron"        , info=(2016, 3),  released=True)
        CARBON        = SaltVersion("Carbon"       , info=(2016, 11), released=True)
        NITROGEN      = SaltVersion("Nitrogen"     , info=(2017, 7),  released=True)
        OXYGEN        = SaltVersion("Oxygen"       , info=(2018, 3),  released=True)
        FLUORINE      = SaltVersion("Fluorine"     , info=(2019, 2),  released=True)
        NEON          = SaltVersion("Neon"         , info=3000,       released=True)
        SODIUM        = SaltVersion("Sodium"       , info=3001,       released=True)
        MAGNESIUM     = SaltVersion("Magnesium"    , info=3002,       released=True)
        ALUMINIUM     = SaltVersion("Aluminium"    , info=3003,       released=True)
        SILICON       = SaltVersion("Silicon"      , info=3004,       released=True)
        PHOSPHORUS    = SaltVersion("Phosphorus"   , info=3005,       released=True)
        SULFUR        = SaltVersion("Sulfur"       , info=3006,       released=True)
        CHLORINE      = SaltVersion("Chlorine"     , info=3007)
        ARGON         = SaltVersion("Argon"        , info=3008)
    
  19. added this to the Sulphur v3006.26 milestone on Jun 18, 2026
  20. added 2 commits that reference this issue on Jun 18, 2026
    2414b2f
    535370d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions