saltstack/salt-bootstrap

Bootstraping on fresh install Ubuntu 22.04 ended up using 20.04 repo

compi-tom opened this issue · 2 comments

Description of Issue/Question

Bootstraping on Ubuntu 22.04 LTS is using 20.04 LTS repo on fresh install.
The required change seems to be required here (as stated by the comment):

# Workaround for latest non-LTS Ubuntu
if { [ "$DISTRO_MAJOR_VERSION" -eq 20 ] && [ "$DISTRO_MINOR_VERSION" -eq 10 ]; } || \
# remove 22 version when salt packages for 22.04 are available
[ "$DISTRO_MAJOR_VERSION" -eq 21 ] || [ "$DISTRO_MAJOR_VERSION" -eq 22 ]; then
echowarn "Non-LTS Ubuntu detected, but stable packages requested. Trying packages for previous LTS release. You may experience problems."
UBUNTU_VERSION=20.04
UBUNTU_CODENAME="focal"

[ "$DISTRO_MAJOR_VERSION" -eq 21 ] || [ "$DISTRO_MAJOR_VERSION" -eq 22 ]; then
==>
[ "$DISTRO_MAJOR_VERSION" -eq 21 ] || [ "$DISTRO_MAJOR_VERSION" -eq 22 ] && && [ "$DISTRO_MINOR_VERSION" -eq 10 ]; then

Setup / Steps to Reproduce Issue

Bootstraping on an Ubuntu 22.04 VM using a script.
Extract:
wget https://bootstrap.saltstack.com -O install_salt.sh >> $log 2>&1; check
sh install_salt.sh -x python3 -U -A "_<master's fqdn>_" -i "_<minion's name>_" >> $log 2>&1; check

Debug logs
(Include debug logs if possible, bootstrap-salt.sh -D.)

root@trans-test-xxxx:~# sh install_salt.sh -x python3 -U -A "salt.master.fqdn" -i "trans-test-xxxx" -D

  • INFO: Running version: 2022.10.04

  • INFO: Executed by: sh

  • INFO: Command line: 'install_salt.sh -x python3 -U -A salt.master.fqdn -i trans-test-xxxx-D'

  • INFO: System Information:

  • INFO: CPU: GenuineIntel

  • INFO: CPU Arch: x86_64

  • INFO: OS Name: Linux

  • INFO: OS Version: 5.15.0-67-generic

  • INFO: Distribution: Ubuntu 22.04
    ...

  • WARN: Non-LTS Ubuntu detected, but stable packages requested. Trying packages for previous LTS release. You may experience problems.
    ...

Versions and Systems

(salt --versions-report, bootstrap-salt.sh -v, system type and version,
cloud/VM provider as appropriate.)

root@trans-test-xxxxx:~# salt --versions-report
Salt Version:
Salt: 3005.1

Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.8.1
docker-py: Not Installed
gitdb: 4.0.9
gitpython: 3.1.24
Jinja2: 3.0.3
libgit2: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack: 1.0.3
msgpack-pure: Not Installed
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: Not Installed
pycryptodome: 3.11.0
pygit2: Not Installed
Python: 3.10.6 (main, Mar 10 2023, 10:55:28) [GCC 11.3.0]
python-gnupg: 0.4.8
PyYAML: 5.4.1
PyZMQ: 22.3.0
smmap: 5.0.0
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.3.4

System Versions:
dist: ubuntu 22.04 Jammy Jellyfish
locale: utf-8
machine: x86_64
release: 5.15.0-67-generic
system: Linux
version: Ubuntu 22.04 Jammy Jellyfish

I was having the same issue and found out if you pass onedir in the bootstrap script arguments then it uses the correct repository for Jammy.

It seems like maybe that should be the default for newer distributions that don't have repositories for the classic installation.

Closing this issue as the "onedir" will be mandatory starting salt 3006 as stated in the install documentation.
Also the stable package (3005) is already avaiblable.