salt-bootstrap icon indicating copy to clipboard operation
salt-bootstrap copied to clipboard

Cannot install Salt on Centos via git if not onedir

Open hegyre opened this issue 2 years ago • 1 comments

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 https://github.com/saltstack/salt-bootstrap/pull/1934/commits/ec14233a44c5364f571bd7b0d5f5e151718440c0 (* 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)

hegyre avatar Jun 29 '23 16:06 hegyre

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

koshkin-ccna avatar Oct 11 '23 19:10 koshkin-ccna

@hegyre Non-onedir is no longer supported with current scripts, since any release of Salt prior to version 3006 is no longer supported and EOL. If you wish to install an EOL version of Salt, then use a version of bootstrap from that time period and it should work.

Note: v2017.7.2 is Python 2 and that is EOL since the start of the decade. Closing this due to answer given, feel free to reopen if there is other information relevant to the issue.

dmurphy18 avatar Jul 16 '24 16:07 dmurphy18