Bootstrapping isnt working on AL2, looks to be attempting to use DNF calls instead of yum in install_amazon_linux_ami_2_onedir_deps(), first run fails, second run succeeds, needs to be fixed to be deterministic.
Setup
Steps to Reproduce Issue
Just run the bootstrap script.
root@ip-10-48-58-167 bin]# curl -L https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh | sudo sh -s -- -D
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
* INFO: Running version: 2024.11.07
* INFO: Executed by: shell pipe
* INFO: Command line: 'sh -D'
* INFO: System Information:
* INFO: CPU: GenuineIntel
* INFO: CPU Arch: x86_64
* INFO: OS Name: Linux
* INFO: OS Version: 5.10.227-219.884.amzn2.x86_64
* INFO: Distribution: Amazon Linux AMI 2
* DEBUG: Binaries will be searched using the following $PATH: /sbin:/bin:/usr/sbin:/usr/bin
* INFO: Installing minion
100 283k 100 283k 0 0 227k 0 0:00:01 0:00:01 --:--:-- 0
* INFO: Found function install_amazon_linux_ami_2_onedir_deps
* DEBUG: DEPS_INSTALL_FUNC=install_amazon_linux_ami_2_onedir_deps
* DEBUG: config_amazon_linux_ami_2_onedir_salt not found....
* DEBUG: config_amazon_linux_ami_2_salt not found....
* DEBUG: config_amazon_linux_ami_onedir_salt not found....
* DEBUG: config_amazon_linux_ami_salt not found....
* INFO: Found function config_salt
* DEBUG: CONFIG_SALT_FUNC=config_salt
* DEBUG: preseed_amazon_linux_ami_2_onedir_master not found....
* DEBUG: preseed_amazon_linux_ami_2_master not found....
* DEBUG: preseed_amazon_linux_ami_onedir_master not found....
* DEBUG: preseed_amazon_linux_ami_master not found....
* INFO: Found function preseed_master
* DEBUG: PRESEED_MASTER_FUNC=preseed_master
* DEBUG: INSTALL_FUNC_NAMES=install_amazon_linux_ami_2_onedir install_amazon_linux_ami_2_onedir install_amazon_linux_ami_onedir
* INFO: Found function install_amazon_linux_ami_2_onedir
* DEBUG: INSTALL_FUNC=install_amazon_linux_ami_2_onedir
* INFO: Found function install_amazon_linux_ami_2_onedir_post
* DEBUG: POST_INSTALL_FUNC=install_amazon_linux_ami_2_onedir_post
* DEBUG: install_amazon_linux_ami_2_onedir_restart_daemons not found....
* INFO: Found function install_amazon_linux_ami_2_restart_daemons
* DEBUG: STARTDAEMONS_INSTALL_FUNC=install_amazon_linux_ami_2_restart_daemons
* DEBUG: daemons_running_amazon_linux_ami_2_onedir not found....
* DEBUG: daemons_running_amazon_linux_ami_2 not found....
* DEBUG: daemons_running_amazon_linux_ami_onedir not found....
* DEBUG: daemons_running_amazon_linux_ami not found....
* INFO: Found function daemons_running_onedir
* DEBUG: DAEMONS_RUNNING_FUNC=daemons_running_onedir
* DEBUG: install_amazon_linux_ami_2_onedir_check_services not found....
* INFO: Found function install_amazon_linux_ami_2_check_services
* DEBUG: CHECK_SERVICES_FUNC=install_amazon_linux_ami_2_check_services
* INFO: Running install_amazon_linux_ami_2_onedir_deps()
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Package yum-utils-1.1.31-46.amzn2.0.1.noarch already installed and latest version
Nothing to do
sh: line 5580: dnf: command not found
sh: line 5581: dnf: command not found
sh: line 5583: dnf: command not found
* ERROR: Failed to run install_amazon_linux_ami_2_onedir_deps()!!!
* DEBUG: Removing the logging pipe /tmp/bootstrap-salt.logpipe
* DEBUG: Removing the temporary apt error file /tmp/apt_error.uJBXMT
* DEBUG: Killing logging pipe tee's with pid(s): 2669
[root@ip-10-48-58-167 bin]# curl -L https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh | sudo sh -s -- -D
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
* INFO: Running version: 2024.11.07
* INFO: Executed by: shell pipe
* INFO: Command line: 'sh -D'
* INFO: System Information:
* INFO: CPU: GenuineIntel
* INFO: CPU Arch: x86_64
* INFO: OS Name: Linux
* INFO: OS Version: 5.10.227-219.884.amzn2.x86_64
* INFO: Distribution: Amazon Linux AMI 2
* DEBUG: Binaries will be searched using the following $PATH: /sbin:/bin:/usr/sbin:/usr/bin
* INFO: Installing minion
100 283k 100 283k 0 0 253k 0 0:00:01 0:00:01 --:--:-- 0
* INFO: Found function install_amazon_linux_ami_2_onedir_deps
* DEBUG: DEPS_INSTALL_FUNC=install_amazon_linux_ami_2_onedir_deps
* DEBUG: config_amazon_linux_ami_2_onedir_salt not found....
* DEBUG: config_amazon_linux_ami_2_salt not found....
* DEBUG: config_amazon_linux_ami_onedir_salt not found....
* DEBUG: config_amazon_linux_ami_salt not found....
* INFO: Found function config_salt
* DEBUG: CONFIG_SALT_FUNC=config_salt
* DEBUG: preseed_amazon_linux_ami_2_onedir_master not found....
* DEBUG: preseed_amazon_linux_ami_2_master not found....
* DEBUG: preseed_amazon_linux_ami_onedir_master not found....
* DEBUG: preseed_amazon_linux_ami_master not found....
* INFO: Found function preseed_master
* DEBUG: PRESEED_MASTER_FUNC=preseed_master
* DEBUG: INSTALL_FUNC_NAMES=install_amazon_linux_ami_2_onedir install_amazon_linux_ami_2_onedir install_amazon_linux_ami_onedir
* INFO: Found function install_amazon_linux_ami_2_onedir
* DEBUG: INSTALL_FUNC=install_amazon_linux_ami_2_onedir
* INFO: Found function install_amazon_linux_ami_2_onedir_post
* DEBUG: POST_INSTALL_FUNC=install_amazon_linux_ami_2_onedir_post
* DEBUG: install_amazon_linux_ami_2_onedir_restart_daemons not found....
* INFO: Found function install_amazon_linux_ami_2_restart_daemons
* DEBUG: STARTDAEMONS_INSTALL_FUNC=install_amazon_linux_ami_2_restart_daemons
* DEBUG: daemons_running_amazon_linux_ami_2_onedir not found....
* DEBUG: daemons_running_amazon_linux_ami_2 not found....
* DEBUG: daemons_running_amazon_linux_ami_onedir not found....
* DEBUG: daemons_running_amazon_linux_ami not found....
* INFO: Found function daemons_running_onedir
* DEBUG: DAEMONS_RUNNING_FUNC=daemons_running_onedir
* DEBUG: install_amazon_linux_ami_2_onedir_check_services not found....
* INFO: Found function install_amazon_linux_ami_2_check_services
* DEBUG: CHECK_SERVICES_FUNC=install_amazon_linux_ami_2_check_services
* INFO: Running install_amazon_linux_ami_2_onedir_deps()
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Package yum-utils-1.1.31-46.amzn2.0.1.noarch already installed and latest version
Nothing to do
* INFO: Running install_amazon_linux_ami_2_onedir()
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Resolving Dependencies
--> Running transaction check
---> Package salt-minion.x86_64 0:3006.9-0 will be installed
--> Processing Dependency: salt = 3006.9-0 for package: salt-minion-3006.9-0.x86_64
--> Running transaction check
---> Package salt.x86_64 0:3006.9-0 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
salt-minion x86_64 3006.9-0 salt-repo-3006-lts 253 k
Installing for dependencies:
salt x86_64 3006.9-0 salt-repo-3006-lts 47 M
Transaction Summary
================================================================================
Install 1 Package (+1 Dependent package)
Total download size: 47 M
Installed size: 142 M
Downloading packages:
warning: /var/cache/yum/x86_64/2/salt-repo-3006-lts/packages/salt-minion-3006.9-0.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 73d76b3f: NOKEY
Public key for salt-minion-3006.9-0.x86_64.rpm is not installed
--------------------------------------------------------------------------------
Total 72 MB/s | 47 MB 00:00
Retrieving key from https://packages.broadcom.com/artifactory/api/security/keypair/SaltProjectKey/public
Importing GPG key 0x73D76B3F:
Userid : "Salt Project Packaging <saltproject-packaging@vmware.com>"
Fingerprint: 1085 7ffd d3f9 1eae 577a 21d6 64cb bc81 73d7 6b3f
From : https://packages.broadcom.com/artifactory/api/security/keypair/SaltProjectKey/public
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : salt-3006.9-0.x86_64 1/2
Installing : salt-minion-3006.9-0.x86_64 2/2
Verifying : salt-3006.9-0.x86_64 1/2
Verifying : salt-minion-3006.9-0.x86_64 2/2
Installed:
salt-minion.x86_64 0:3006.9-0
Dependency Installed:
salt.x86_64 0:3006.9-0
Complete!
* INFO: Running install_amazon_linux_ami_2_onedir_post()
* INFO: Running install_amazon_linux_ami_2_check_services()
* DEBUG: __check_services_systemd _SYSTEMD_ACTIVE result ,,
* DEBUG: Checking if service salt-minion is enabled
* DEBUG: Service salt-minion is enabled
* INFO: Running install_amazon_linux_ami_2_restart_daemons()
* DEBUG: Waiting 3 seconds for processes to settle before checking for them
* INFO: Running daemons_running_onedir()
* DEBUG: Waiting 3 seconds for processes to settle before checking for them
* INFO: Salt installed!
* DEBUG: Removing the logging pipe /tmp/bootstrap-salt.logpipe
* DEBUG: Removing the temporary apt error file /tmp/apt_error.togiUz
* DEBUG: Killing logging pipe tee's with pid(s): 2905
[root@ip-10-48-58-167 bin]#
Versions and Systems
(salt --versions-report, bootstrap-salt.sh -v, system type and version,
cloud/VM provider as appropriate.)
AWS EC2, Latest AL2 AMI in USW2 (ami-04907d7291cd8e06a)
Description of Issue/Question
Bootstrapping isnt working on AL2, looks to be attempting to use DNF calls instead of yum in install_amazon_linux_ami_2_onedir_deps(), first run fails, second run succeeds, needs to be fixed to be deterministic.
Setup
Steps to Reproduce Issue
Just run the bootstrap script.
Versions and Systems
(
salt --versions-report
,bootstrap-salt.sh -v
, system type and version, cloud/VM provider as appropriate.)AWS EC2, Latest AL2 AMI in USW2 (ami-04907d7291cd8e06a)