You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A kitchen converge on Amazon Linux 2023, the installer installs an el6 Chef client.
Describe the problem
When using Kitchen with the omnitruck installer, the https://omnitruk.chef.io/install.sh defaults to EL6 for Amazon Linux 2023. This is causing library issues due to Amazon Linux 2023 is not EL6 binary compatible.
Software Version
CentOS 7 with Chef Workstation 23.5.1040
Chef Workstation version: 23.5.1040
Test Kitchen version: 3.5.0
Cookstyle version: 7.32.2
Chef Infra Client version: 18.2.7
Chef InSpec version: 5.21.29
Chef CLI version: 5.6.11
Chef Habitat version: 1.6.652
Choosing EL6 by default for Amazon Linux 2023
Running the https://omnitruk.chef.io/install.sh on Amazon 2023 will default to EL6 based on the code block below. This appears to be coming from Chef mixlib-install: `https://github.com/chef/mixlib-install/blob/main/lib/mixlib/install/generator/bourne/scripts/platform_detection.sh#L64-L83`
elif test -f "/etc/system-release"; then
platform=`sed 's/^\(.\+\) release.\+/\1/' /etc/system-release | tr '[A-Z]' '[a-z]'`
platform_version=`sed 's/^.\+ release \([.0-9]\+\).*/\1/' /etc/system-release | tr '[A-Z]' '[a-z]'`
case $platform in amazon*) # sh compat method of checking for a substring
. /etc/os-release
platform_version=$VERSION_ID
if test "$platform_version" = "2022"; then
platform="amazon"
platform_version="2022"
elif test "$platform_version" = "2"; then
platform="el"
platform_version="7"
else
platform="el"
# VERSION_ID will match YYYY.MM for Amazon Linux AMIs
platform_version="6"
fi
esac
Possible Solution
Change the https://github.com/chef/mixlib-install/blob/main/lib/mixlib/install/generator/bourne/scripts/platform_detection.sh at line 71 to add Amazon Linux 2023 detection and change the original line 71 to an elif below the new code.
if test "$platform_version" = "2023"; then
platform="amazon"
platform_version="2023"
elif test "$platform_version" = "2022"; then
platform="amazon"
platform_version="2022"
The text was updated successfully, but these errors were encountered:
A
kitchen converge
on Amazon Linux 2023, the installer installs an el6 Chef client.Describe the problem
When using Kitchen with the omnitruck installer, the https://omnitruk.chef.io/install.sh defaults to EL6 for Amazon Linux 2023. This is causing library issues due to Amazon Linux 2023 is not EL6 binary compatible.
Software Version
CentOS 7 with Chef Workstation 23.5.1040
Chef Workstation version: 23.5.1040
Test Kitchen version: 3.5.0
Cookstyle version: 7.32.2
Chef Infra Client version: 18.2.7
Chef InSpec version: 5.21.29
Chef CLI version: 5.6.11
Chef Habitat version: 1.6.652
Replication Case
Stacktrace
Choosing EL6 by default for Amazon Linux 2023
Running the https://omnitruk.chef.io/install.sh on Amazon 2023 will default to EL6 based on the code block below. This appears to be coming from Chef mixlib-install: `https://github.com/chef/mixlib-install/blob/main/lib/mixlib/install/generator/bourne/scripts/platform_detection.sh#L64-L83`Possible Solution
Change the
https://github.com/chef/mixlib-install/blob/main/lib/mixlib/install/generator/bourne/scripts/platform_detection.sh
at line 71 to add Amazon Linux 2023 detection and change the original line 71 to anelif
below the new code.The text was updated successfully, but these errors were encountered: