saltstack/salt-bootstrap

Failure to install (correct) 3005.X on CentOS Stream 9

Closed this issue · 1 comments

Description of Issue/Question

I am doing some interop. testing of salt 3006.X with other downstream components of our system. One of the use cases is s regression test where I need to test with 3005.X. Using bootstrap-salt.sh to install/reinstall salt, I've noticed two issues:

(1) Failure to install 3005.X on CentOS Stream 9 on a fresh system
(2) Failure to provide correct error/message when installing 3005.X on a system that had previously 3006.X installed -- script always tries to install latest 3006.X

Workaround:
sh bootstrap-salt.sh -M stable 3005.1

Setup

CentOS Stream release 9
bootstrap version: ./bootstrap-salt.sh -- Version 2023.04.21

Steps to Reproduce Issue

(1) sh bootstrap-salt.sh -M stable 3005.1

[root@centos9 ~]# sh bootstrap-salt.sh -M stable 3005.1
 *  INFO: Running version: 2023.04.21
 *  INFO: Executed by: sh
 *  INFO: Command line: 'bootstrap-salt.sh -M stable 3005.1'
 *  WARN: Running the unstable version of bootstrap-salt.sh

 *  INFO: System Information:
 *  INFO:   CPU:          GenuineIntel
 *  INFO:   CPU Arch:     x86_64
 *  INFO:   OS Name:      Linux
 *  INFO:   OS Version:   5.14.0-115.el9.x86_64
 *  INFO:   Distribution: CentOS 9

 *  INFO: Installing minion
 *  INFO: Installing master
 *  INFO: Found function install_centos_stable_deps
 *  INFO: Found function config_salt
 *  INFO: Found function preseed_master
 *  INFO: Found function install_centos_stable
 *  INFO: Found function install_centos_stable_post
 *  INFO: Found function install_centos_restart_daemons
 *  INFO: Found function daemons_running
 *  INFO: Found function install_centos_check_services
 *  INFO: Running install_centos_stable_deps()
 *  WARN: salt.repo already exists, ignoring salt version argument.
 *  WARN: Use -F (forced overwrite) to install archive/3005.1.
Last metadata expiration check: 2:29:09 ago on Sun 25 Jun 2023 04:55:42 AM MDT.
Package yum-utils-4.3.0-8.el9.noarch is already installed.
Package chkconfig-1.24-1.el9.x86_64 is already installed.
Package python3-pyyaml-5.4.1-6.el9.x86_64 is already installed.
Package python3-setuptools-53.0.0-12.el9.noarch is already installed.
Package procps-ng-3.3.17-11.el9.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
 *  INFO: Running install_centos_stable()
Last metadata expiration check: 2:29:10 ago on Sun 25 Jun 2023 04:55:42 AM MDT.
Error:
 Problem 1: package salt-minion-3005.1-1.el8.noarch requires salt = 3005.1-1.el8, but none of the providers can be installed
  - conflicting requests
  - nothing provides python(abi) = 3.6 needed by salt-3005.1-1.el8.noarch
  - nothing provides python3.6dist(distro) >= 1.0.1 needed by salt-3005.1-1.el8.noarch
  - nothing provides python3.6dist(requests) >= 1.0.0 needed by salt-3005.1-1.el8.noarch
  - nothing provides python3.6dist(jinja2) needed by salt-3005.1-1.el8.noarch
  - nothing provides python3.6dist(jmespath) needed by salt-3005.1-1.el8.noarch
  - nothing provides python3.6dist(markupsafe) needed by salt-3005.1-1.el8.noarch
  - nothing provides python3.6dist(pyyaml) needed by salt-3005.1-1.el8.noarch
 Problem 2: package salt-master-3005.1-1.el8.noarch requires salt = 3005.1-1.el8, but none of the providers can be installed
  - conflicting requests
  - nothing provides python(abi) = 3.6 needed by salt-3005.1-1.el8.noarch
  - nothing provides python3.6dist(distro) >= 1.0.1 needed by salt-3005.1-1.el8.noarch
  - nothing provides python3.6dist(requests) >= 1.0.0 needed by salt-3005.1-1.el8.noarch
  - nothing provides python3.6dist(jinja2) needed by salt-3005.1-1.el8.noarch
  - nothing provides python3.6dist(jmespath) needed by salt-3005.1-1.el8.noarch
  - nothing provides python3.6dist(markupsafe) needed by salt-3005.1-1.el8.noarch
  - nothing provides python3.6dist(pyyaml) needed by salt-3005.1-1.el8.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
 * ERROR: Failed to run install_centos_stable()!!!

(2) sh bootstrap-salt.sh -M stable 3005.1

[root@centos9 ~]# sh bootstrap-salt.sh -M stable 3005.1
 *  INFO: Running version: 2023.04.21
 *  INFO: Executed by: sh
 *  INFO: Command line: 'bootstrap-salt.sh -M stable 3005.1'
 *  WARN: Running the unstable version of bootstrap-salt.sh

 *  INFO: System Information:
 *  INFO:   CPU:          GenuineIntel
 *  INFO:   CPU Arch:     x86_64
 *  INFO:   OS Name:      Linux
 *  INFO:   OS Version:   5.14.0-115.el9.x86_64
 *  INFO:   Distribution: CentOS 9

 *  INFO: Installing minion
 *  INFO: Installing master
 *  INFO: Found function install_centos_stable_deps
 *  INFO: Found function config_salt
 *  INFO: Found function preseed_master
 *  INFO: Found function install_centos_stable
 *  INFO: Found function install_centos_stable_post
 *  INFO: Found function install_centos_restart_daemons
 *  INFO: Found function daemons_running
 *  INFO: Found function install_centos_check_services
 *  INFO: Running install_centos_stable_deps()
 *  WARN: salt.repo already exists, ignoring salt version argument.
 *  WARN: Use -F (forced overwrite) to install archive/3005.1.
Last metadata expiration check: 3:02:00 ago on Sun 25 Jun 2023 04:29:20 AM MDT.
Package yum-utils-4.3.0-8.el9.noarch is already installed.
Package chkconfig-1.24-1.el9.x86_64 is already installed.
Package python3-pyyaml-5.4.1-6.el9.x86_64 is already installed.
Package python3-setuptools-53.0.0-10.el9.noarch is already installed.
Package procps-ng-3.3.17-11.el9.x86_64 is already installed.
Dependencies resolved.
================================================================================
 Package                  Architecture Version               Repository    Size
================================================================================
Upgrading:
 python3-setuptools       noarch       53.0.0-12.el9         baseos       944 k

Transaction Summary
================================================================================
Upgrade  1 Package

Total download size: 944 k
Downloading Packages:
python3-setuptools-53.0.0-12.el9.noarch.rpm     1.0 MB/s | 944 kB     00:00
--------------------------------------------------------------------------------
Total                                           656 kB/s | 944 kB     00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1
  Upgrading        : python3-setuptools-53.0.0-12.el9.noarch                1/2
  Cleanup          : python3-setuptools-53.0.0-10.el9.noarch                2/2
  Running scriptlet: python3-setuptools-53.0.0-10.el9.noarch                2/2
  Verifying        : python3-setuptools-53.0.0-12.el9.noarch                1/2
  Verifying        : python3-setuptools-53.0.0-10.el9.noarch                2/2

Upgraded:
  python3-setuptools-53.0.0-12.el9.noarch

Complete!
 *  INFO: Running install_centos_stable()
Last metadata expiration check: 3:02:03 ago on Sun 25 Jun 2023 04:29:20 AM MDT.
Package salt-master-3006.1-0.x86_64 is already installed.
Package salt-minion-3006.1-0.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
 *  INFO: Running install_centos_stable_post()
 *  INFO: Running install_centos_check_services()
 *  INFO: Running install_centos_restart_daemons()
 *  INFO: Running daemons_running()
 *  INFO: Salt installed!

This is is the contents of salt repo at the time of installation (contains contents seeded by the previous installation of 3006):

[root@centos9 ~]# cat /etc/yum.repos.d/salt.repo
[saltstack]
name=SaltStack latest Release Channel for RHEL/CentOS $releasever
baseurl=https://repo.saltproject.io/salt/py3/redhat/9/$basearch/latest/
skip_if_unavailable=True
gpgcheck=1
gpgkey=https://repo.saltproject.io/salt/py3/redhat/9/$basearch/latest/SALT-PROJECT-GPG-PUBKEY-2023.pub,
enabled=1
enabled_metadata=1

Workaround:
sh bootstrap-salt.sh -M git v3005.1

Versions and Systems

cat /etc/centos-release
CentOS Stream release 9
sh ./bootstrap-salt.sh -v
./bootstrap-salt.sh -- Version 2023.04.21

@devkits The problem is that you are trying to install the classically packaged Salt v3005.1 on Centosstream 9, which is not supported. You should have used the Tiamat-backed Salt v3005.1, that is, onedir packages which do support Centosstream 9. From the errors produced, you can see that it is trying to install the version for Centosstream 8, which would be the latest OS that the classically packaged Salt v3005.1 can support, that el8.

  - nothing provides python3.6dist(distro) >= 1.0.1 needed by salt-3005.1-1.el8.noarch

Note Salt 3005.x is now EOL, and recommend using Salt 3006.x or 3007.0 on Centosstream 9.

BTW: The bootstrap script is undergoing a major re-write at the moment to remove support for EOL, OSs (Wheezy, RHEL 6, Salt pre-3006, Python 2, etc).

Both Centosstream 9 and Ubuntu 22.04 dropped support for SHA-1 keys, hence that had to have a new SHA-256 key, and with the move to 'onedir' architecture and the soon EOL for classically packaged Salt (which relied on the OS to supply Python and dependencies), the decision was made to only support the newer OS's (9 & 22.04) with the 'onedir' architecture.

Closing this since the issue should have be lodged against the bootstrap repo, https://github.com/saltstack/salt-bootstrap