saltstack/salt-bootstrap

[BUG] Minion bootstrap installation fails on Amazon Linux 2023

Opened this issue · 13 comments

Description

Minion bootstrap installation fails on Amazon Linux 2023. I initially discovered this problem when using 'salt-cloud' to spin up instances in AWS. When that failed, I SSHed into the Amazon Linux minion and attempted to run the (newly downloaded) bootstrap script manually.

Setup
(Please provide relevant configs and/or SLS files (be sure to remove sensitive info. There is no general set-up of Salt.)

Please be as specific as possible and give set-up details.

  • on-prem machine
  • VM (Virtualbox, KVM, etc. please specify)
  • [ X] 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
  • classic packaging
  • onedir packaging
  • used bootstrap to install

Steps to Reproduce the behavior
(Include debug logs if possible and relevant)

% ssh <AWS instance>

...
...

A newer release of "Amazon Linux" is available.
  Version 2023.0.20230614:
  Version 2023.1.20230628:
  Version 2023.1.20230629:
Run "/usr/bin/dnf check-release-update" for full release and version update info
   ,     #_
   ~\_  ####_        Amazon Linux 2023
  ~~  \_#####\
  ~~     \###|
  ~~       \#/ ___   https://aws.amazon.com/linux/amazon-linux-2023
   ~~       V~' '->
    ~~~         /
      ~~._.   _/
         _/ _/
       _/m/'
Last login: Fri Jun 30 13:53:03 2023 from 10.0.168.112
[ec2-user@ip-10-0-85-124 ~]$ sudo -i
[root@ip-10-0-85-124 ~]# curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  345k  100  345k    0     0  1828k      0 --:--:-- --:--:-- --:--:-- 1836k
[root@ip-10-0-85-124 ~]# sh bootstrap-salt.sh
 *  INFO: Running version: 2023.04.26
 *  INFO: Executed by: sh
 *  INFO: Command line: 'bootstrap-salt.sh '
 *  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:   6.1.29-47.49.amzn2023.x86_64
 *  INFO:   Distribution: Amazon Linux AMI 2023

 *  INFO: Installing minion
 *  INFO: Found function install_amazon_linux_ami_deps
 *  INFO: Found function config_salt
 *  INFO: Found function preseed_master
 *  INFO: Found function install_amazon_linux_ami_restart_daemons
 *  INFO: Found function daemons_running_onedir
 * ERROR: No installation function found. Exiting...
[root@ip-10-0-85-124 ~]#

Expected behavior

I expected to be able to install and configure the minion via the bootstrap method.

Screenshots
If applicable, add screenshots to help explain your problem.

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
PASTE HERE

Additional context
Add any other context about the problem here.

Bootstrap issues should go here: https://github.com/saltstack/salt-bootstrap

Any status on this? AL2023 has been out for six months. Anything I can do to help get this resolved?

Same experience here. I think the issue is that there's no install_amazon_linux_ami_2023_check_services (or siblings). I assume that it will work the same as AL2; I will test that sometime soon and if I can get it working I'll submit a PR.

Looks like there's a lot more to it than that; the dependencies have changed names (and it doesn't appear there's a zmq available), and there may not be salt builds for this OS at all ( #64455 ). In my case it's even more complicated since I'm running on aarch64. I don't think there's much I can do until that main al2023 support item is resolved (which dmurphy18's comment suggests might happen in salt 3007+).

As we can see from the release notes of salt version 3006.5 that support for Amazon Linux 2023 has been added. When will the bootstrap script have support for Amazon Linux 2023?

Also if it is going to take some time, then what steps to perform to install salt and run it in masterless mode?

Adding support for Amazon 2023

Adding support for Debian 11, 12, and pulling support for RHEL 6, Debian 7, 8 & 9, Amazon Linux (the RHEL 6 clone) and Python 2.6

Need to check that the script fails and exists if download of gpg key fails.

Removed support for following items:

  • SLES 12
  • MacOS 11
  • Python 2.7
  • Debian 7, 8 & 9
  • RHEL 6
  • Amazon Linux (RHEL 6 clone with Python 2.7)
  • Salt versions prior to v3006.x (that is anything which is not Onedir based)
  • Use of 'old-stable', use earlier release of bootstrap script if desire support for old OSs and Salt pre-3006)

Added support for the following items:

  • Amazon 2023
  • MacOS 13
  • Debian 12
  • Use of kitchen-salt in testing

Updated following items:

  • Updated version of Ruby used in testing to v3.2.3
  • Updated pre-commit versions of utilities used.
  • Test using Github Actions

Need to ensure findutils installed, that is, via the OS or in the container, since 3006.x spec file for rpms relies on use of find (which may not be present in a container, see #1991

Hi @dmurphy18

is there any update on this ? bootstrap script is failing on AL2023 AMIs.
* ERROR: No installation function found. Exiting...

And can you please let me know what can be alternative options for this ?

Working away on GitHub Actions to replace use of kitchen-salt, but will be gone for next 2 weeks. Learning GitHub Actions, some nice reading for the beach during vacation :)

I'm also running into the No installation found. Exiting... error. Any idea when this will be fixed in the bootstrap script?

image