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

Unable to install any versions of Chef except the latest one on Amazon Linux 2023 #14383

Open
arundhansingh opened this issue May 17, 2024 · 1 comment

Comments

@arundhansingh
Copy link

Describe the problem

I was able to install 17.10.122 version of chef with below installation script on Amazon linux 2.

curl --silent --show-error --retry 3 --location https://omnitruck.chef.io/install.sh | bash -s -- -v "17.10.122"

However, we are getting 404 error when we try to install the same version on Amazon linux 2023.
The only chef version gets installed on Amazon linux 2023 is the latest one (i.e 18.4.12)

Is there any reason why we cannot install any previous versions of chef on Amazon linux 2023?

Software Version

Chef version <= 18.4.2
OS - Amazon linux 2023

Replication Case

Launch an EC2 instance with Amazon linux 2023 AMI and try installing chef with below method specifying any version except the latest one.

curl --silent --show-error --retry 3 --location https://omnitruck.chef.io/install.sh | bash -s -- -v "<Chef_Version>"

Stacktrace

``` root@ip-170-35-0-71 ~]# curl --silent --show-error --retry 3 --location https://omnitruck.chef.io/install.sh | bash -s -- -v "${CHEF_CLIENT_VERSION}" amazon 2023 x86_64 Getting information for chef stable 17.10.122 for amazon... downloading https://omnitruck.chef.io/stable/chef/metadata?v=17.10.122&p=amazon&pv=2023&m=x86_64 to file /tmp/install.sh.29100/metadata.txt trying wget... ERROR 404 Omnitruck artifact does not exist for version 17.10.122 on platform amazon

Either this means:

  • We do not support amazon
  • We do not have an artifact for 17.10.122

This is often the latter case due to running a prerelease or RC version of Chef
or a gem version which was only pushed to rubygems and not omnitruck.

You may be able to set your knife[:bootstrap_version] to the most recent stable
release of Chef to fix this problem (or the most recent stable major version number).

In order to test the version parameter, adventurous users may take the Metadata URL
below and modify the '&v=' parameter until you successfully get a URL that
does not 404 (e.g. via curl or wget). You should be able to use '&v=11' or '&v=12'
successfully.

If you cannot fix this problem by setting the bootstrap_version, it probably means
that amazon is not supported.

Metadata URL: https://omnitruck.chef.io/stable/chef/metadata?v=17.10.122&p=amazon&pv=2023&m=x86_64

</details>

## Possible Solution
<!--- If you already have ideas about how to solve the issue, add them here. -->
@Stromweld
Copy link
Contributor

up until the latest version of chef-client 18.4.12 there wasn't any amazon linux 2023 support or builds for it. You can try downloading an rpm version for rhel platform and install it but you may have to fix any library issues that may be missing due to differences in RHEL and Amazon Linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants