saltstack/salt-bootstrap

Cannot install Salt on Centos via git if not onedir

Opened this issue · 1 comments

hegyre commented

Description of Issue/Question

I'm using the salt bootstrap to install Salt v2017.7.2 on a CentOS 7.9 box.
Even if this is an old salt version, last week it worked well, however today it doesn't work anymore, most probably due to the new bootstrap version.

I'm using the archive.repo.saltproject.io repo to install this old version.

After some digging, I found that the possible culprit is #1934 and more precisely ec14233 (* use install_centos_onedir_deps when installing via git on centos like distros)
This commit assumes that onedir deps will always be used if installing via git on centos.
But this is not always the case, one may want to install the classic version via git.

The image below shows an issue about GPG key because it tries to go into the install_centos_onedir_deps function instead of the -now removed - install_centos_stable_deps function.
https://imgur.com/D6sac7Q
Also, as per my ticket #1937, here you see v2023.04.26 on that picture but in reality it's the new version from yesterday (2023.06.28).

Steps to Reproduce Issue

2 methods to reproduce:

  • Can be reproduced on a Normal CentOS 7 machine:

    cd /tmp && /usr/bin/curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
    sh /tmp/bootstrap-salt.sh -X -d -R archive.repo.saltproject.io -x python2 -c /tmp git v2017.7.2
    
  • The same issue using Vagrant with relevant options:

    salt.masterless = true
    salt.install_type = "git"
    salt.install_args = "v2017.7.2"
    salt.bootstrap_options = "-X -d -R archive.repo.saltproject.io -x python2"
    salt.verbose = true
    salt.log_level = "info"
    

Versions and Systems

Salt Bootstrap 2023.06.28 (displays v2023.04.26 because of #1937)
CentOS 7.9
(Vagrant v2.3.7 if using the vagrant method)

Reproduced the issue, script tries to import the key from the wrong url:

ERROR: https://archive.repo.saltproject.io/salt/yum/redhat/7/x86_64/latest/SALT-PROJECT-GPG-PUBKEY-2023.pub failed to download to /tmp/salt-gpg-O5zPUySR.pub