Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] Add to bootstrap-salt.sh support for Amazon Linux 2022 #62525

Open
madmac2501 opened this issue Aug 24, 2022 · 4 comments
Open
Labels
Feature new functionality including changes to functionality and code refactors, etc. needs-triage

Comments

@madmac2501
Copy link

Is your feature request related to a problem? Please describe.
bootstrap-salt.sh fails to install salt in an Amazon Linux 2022 EC2 instance

Describe the solution you'd like
bootstrap-salt.sh supports Amazon Linux 2022

Describe alternatives you've considered

Additional context
Tested with this AMI ami-09b54833c45ebb360 in us-west-2 region

Please Note
If this feature request would be considered a substantial change or addition, this should go through a SEP process here https://github.com/saltstack/salt-enhancement-proposals, instead of a feature request.

@madmac2501 madmac2501 added Feature new functionality including changes to functionality and code refactors, etc. needs-triage labels Aug 24, 2022
@welcome
Copy link

welcome bot commented Aug 24, 2022

Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
Please be sure to review our Code of Conduct. Also, check out some of our community resources including:

There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar.
If you have additional questions, email us at saltproject@vmware.com. We’re glad you’ve joined our community and look forward to doing awesome things with you!

@Criggie
Copy link

Criggie commented Nov 1, 2022

Hi there - I'm trying to pre-qualify Amazon Linux 2022 for use in our prod environment. Part of that is getting Salt to work on it.

AWS Linux 2022 will replace AWS Linux 2 over time, so it is not some niche distro.

By the looks of this bootstrap output, its ignoring the python3 parameter, failing to get the content of the repo, and then defaulting to some python 2.7 packages that don't exist - everything in AL2022 is python 3.9 at this date.

[root@al2022 ~]# bash ./bootstrap-salt.sh -x python3 stable 3004.2
 *  INFO: Running version: 2022.10.04
 *  INFO: Executed by: shell pipe
 *  INFO: Command line: './bootstrap-salt.sh -x python3 stable 3004.2'

 *  INFO: System Information:
 *  INFO:   CPU:          GenuineIntel
 *  INFO:   CPU Arch:     x86_64
 *  INFO:   OS Name:      Linux
 *  INFO:   OS Version:   5.15.73-45.135.amzn2022.x86_64
 *  INFO:   Distribution: Amazon Linux AMI 2022

 *  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_stable
 *  INFO: Found function install_amazon_linux_ami_stable_post
 *  INFO: Found function install_amazon_linux_ami_restart_daemons
 *  INFO: Found function daemons_running
 *  INFO: Running install_amazon_linux_ami_deps()
Last metadata expiration check: 0:23:01 ago on Tue 01 Nov 2022 02:19:53 AM UTC.
Package dnf-utils-4.1.0-1.amzn2022.0.1.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
SaltStack repo for Amazon Linux                 4.2 kB/s | 330  B     00:00
Errors during downloading metadata for repository 'saltstack-repo':
  - Status code: 404 for https://repo.saltproject.io/yum/amazon/latest/x86_64/archive/3004.2/repodata/repomd.xml (IP: 108.156.172.19)
Error: Failed to download metadata for repo 'saltstack-repo': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Ignoring repositories: saltstack-repo
Last metadata expiration check: 0:23:01 ago on Tue 01 Nov 2022 02:19:53 AM UTC.
No match for argument: m2crypto
No match for argument: python27-crypto
No match for argument: python27-jinja2
No match for argument: python27-PyYAML
No match for argument: python27-msgpack
No match for argument: python27-requests
No match for argument: python27-zmq
No match for argument: python27-futures
Error: Unable to find a match: m2crypto python27-crypto python27-jinja2 python27-PyYAML python27-msgpack python27-requests python27-zmq python27-futures
 * ERROR: Failed to run install_amazon_linux_ami_deps()!!!

I manually installed the python3- version of all those RPMs and only some were found

python3-crypto-2.6.1-34.amzn2022.0.1.x86_64.rpm
python3-jinja2-2.11.3-1.amzn2022.0.1.noarch
python3-pyyaml-5.4.1-2.amzn2022.0.1.x86_64
python3-requests-2.25.1-1.amzn2022.0.1.noarch
though that might also be due to the non-working Repo.

@Criggie
Copy link

Criggie commented Nov 14, 2022

https://aws.amazon.com/linux/amazon-linux-2022/faqs/ says

The first Release Candidate of AL2022 is now available for testing. Now is the ideal time to validate your services and solutions on AL2022. With the Release Candidate, we freeze major changes, except patches and bug fixes, leading up to the AL2022 Generally Available (GA) release later this year. (2022)

How to get some traction on supporting this updated distro ? Given its AWS automation users are likely to be more frequent users.

@Criggie
Copy link

Criggie commented Jan 26, 2023

Further info -the bootstrap script is treating AL2022 like amazon linux 2 and installing python 2.7 stuff, which isn't available.

[root@POCHOST~]# bash bootstrap-salt.sh -x python3  stable 3004.2
 *  INFO: Running version: 2022.10.04
 *  INFO: Executed by: bash
 *  INFO: Command line: 'bootstrap-salt.sh -x python3 stable 3004.2'

 *  INFO: System Information:
 *  INFO:   CPU:          GenuineIntel
 *  INFO:   CPU Arch:     x86_64
 *  INFO:   OS Name:      Linux
 *  INFO:   OS Version:   5.15.73-45.135.amzn2022.x86_64
 *  INFO:   Distribution: Amazon Linux AMI 2022

 *  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_stable
 *  INFO: Found function install_amazon_linux_ami_stable_post
 *  INFO: Found function install_amazon_linux_ami_restart_daemons
 *  INFO: Found function daemons_running
 *  INFO: Running install_amazon_linux_ami_deps()
SaltStack repo for Amazon Linux                 1.3 kB/s | 334  B     00:00
Errors during downloading metadata for repository 'saltstack-repo':
  - Status code: 404 for https://repo.saltproject.io/yum/amazon/latest/x86_64/latest/repodata/repomd.xml (IP: 108.156.172.88)
Error: Failed to download metadata for repo 'saltstack-repo': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Ignoring repositories: saltstack-repo
Last metadata expiration check: 0:49:06 ago on Wed 25 Jan 2023 11:36:38 PM UTC.
Package dnf-utils-4.1.0-1.amzn2022.0.1.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
SaltStack repo for Amazon Linux                 1.3 kB/s | 334  B     00:00
Errors during downloading metadata for repository 'saltstack-repo':
  - Status code: 404 for https://repo.saltproject.io/yum/amazon/latest/x86_64/latest/repodata/repomd.xml (IP: 108.156.172.88)
Error: Failed to download metadata for repo 'saltstack-repo': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Ignoring repositories: saltstack-repo
Last metadata expiration check: 0:49:07 ago on Wed 25 Jan 2023 11:36:38 PM UTC.
No match for argument: m2crypto
No match for argument: python27-crypto
No match for argument: python27-jinja2
No match for argument: python27-PyYAML
No match for argument: python27-msgpack
No match for argument: python27-requests
No match for argument: python27-zmq
No match for argument: python27-futures
Error: Unable to find a match: m2crypto python27-crypto python27-jinja2 python27-PyYAML python27-msgpack python27-requests python27-zmq python27-futures
 * ERROR: Failed to run install_amazon_linux_ami_deps()!!!

Even forcing python3 and git as a source still attempts python27 installs.

sh bootstrap-salt.sh -P -y -x python3 git 3004.2
...
Error: Unable to find a match: python27-pip python27-setuptools python27-devel
 * ERROR: Failed to run install_amazon_linux_ami_git_deps()!!!

I can't go to salt 3005 yet - that would probably work better with the onedir thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature new functionality including changes to functionality and code refactors, etc. needs-triage
Projects
None yet
Development

No branches or pull requests

2 participants