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

Omnitruck artifact does not exist for Rocky Linux #600

Open
gpanula opened this issue Oct 24, 2023 · 6 comments
Open

Omnitruck artifact does not exist for Rocky Linux #600

gpanula opened this issue Oct 24, 2023 · 6 comments

Comments

@gpanula
Copy link

gpanula commented Oct 24, 2023

Description

https://omnitruck.chef.io/install.sh is now setting platform to "rocky" for rocky linux. Previously it was setting platform to "el".

The download url created by install.sh is now (notice the p=rocky)
https://omnitruck.chef.io/stable/chef/metadata?v=17.10&p=rocky&pv=8.8&m=x86_64
unfortunately that url returns a 404

Previously(2023-Oct-13) the url created by install.sh for rocky linux was
https://omnitruck.chef.io/stable/chef/metadata?v=17.10&p=el&pv=8&m=x86_64
notice p=el and pv=8

It looks like install.sh was recently updated to better account for the contents of rocky linux's /etc/os-release but https://omnitruck.chef.io/stable/chef/metadata wasn't updated for the new values returned from the updated install.sh

Chef Version

Chef Infra Client: ALL

Platform Version

Rocky Linux 8

Replication Case

These rocky specific values return 404

curl -v "https://omnitruck.chef.io/stable/chef/metadata?v=17.10&p=rocky&pv=8.8&m=x86_64"
curl -v "https://omnitruck.chef.io/stable/chef/metadata?v=17&p=rocky&pv=8.8&m=x86_64"
curl -v "https://omnitruck.chef.io/stable/chef/metadata?v=18.2&p=rocky&pv=8.8&m=x86_64"
curl -v "https://omnitruck.chef.io/stable/chef/metadata?v=18.3&p=rocky&pv=8.8&m=x86_64"
curl -v "https://omnitruck.chef.io/stable/chef/metadata?v=18&p=rocky&pv=8.8&m=x86_64"

These generic "el" values return valid data

curl -v "https://omnitruck.chef.io/stable/chef/metadata?v=17.10&p=el&pv=8.8&m=x86_64"
curl -v "https://omnitruck.chef.io/stable/chef/metadata?v=17&p=el&pv=8.8&m=x86_64"
curl -v "https://omnitruck.chef.io/stable/chef/metadata?v=18.2&p=el&pv=8.8&m=x86_64"

# notice these return a url for el7, not el8.  this should probably also be fixed
curl -v "https://omnitruck.chef.io/stable/chef/metadata?v=18.3&p=el&pv=8.8&m=x86_64"
curl -v "https://omnitruck.chef.io/stable/chef/metadata?v=18&p=el&pv=8.8&m=x86_64"

Client Output

output from broken attempt (2023-Oct-18]
notice the platform is being set to rocky

[2023-10-18T03:26:42.629Z]     amazon-ebs: Now we can run chef-colo version 17.10
[2023-10-18T03:26:42.629Z]     amazon-ebs:
[2023-10-18T03:26:42.629Z] ==> amazon-ebs: Provisioning with chef-solo
[2023-10-18T03:26:42.629Z]     amazon-ebs: Installing Chef...
[2023-10-18T03:26:42.629Z] ==> amazon-ebs:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
[2023-10-18T03:26:42.629Z] ==> amazon-ebs:                                  Dload  Upload   Total   Spent    Left  Speed
[2023-10-18T03:26:42.629Z] ==> amazon-ebs: 100 23710  100 23710    0     0  1218k      0 --:--:-- --:--:-- --:--:-- 1218k
[2023-10-18T03:26:42.630Z]     amazon-ebs: rocky 8.8 x86_64
[2023-10-18T03:26:42.630Z]     amazon-ebs: Getting information for chef stable 17.10 for rocky...
[2023-10-18T03:26:42.630Z]     amazon-ebs: downloading https://omnitruck.chef.io/stable/chef/metadata?v=17.10&p=rocky&pv=8.8&m=x86_64
[2023-10-18T03:26:42.630Z]     amazon-ebs:   to file /tmp/install.sh.5941/metadata.txt
[2023-10-18T03:26:42.630Z]     amazon-ebs: trying wget...
[2023-10-18T03:26:42.630Z]     amazon-ebs: ERROR 404
[2023-10-18T03:26:42.630Z]     amazon-ebs: Omnitruck artifact does not exist for version 17.10 on platform rocky
[2023-10-18T03:26:42.630Z]     amazon-ebs:
[2023-10-18T03:26:42.630Z]     amazon-ebs: Either this means:
[2023-10-18T03:26:42.630Z]     amazon-ebs:    - We do not support rocky
[2023-10-18T03:26:42.630Z]     amazon-ebs:    - We do not have an artifact for 17.10
[2023-10-18T03:26:42.630Z]     amazon-ebs:
[2023-10-18T03:26:42.630Z]     amazon-ebs: This is often the latter case due to running a prerelease or RC version of Chef
[2023-10-18T03:26:42.630Z]     amazon-ebs: or a gem version which was only pushed to rubygems and not omnitruck.
[2023-10-18T03:26:42.630Z]     amazon-ebs:
[2023-10-18T03:26:42.630Z]     amazon-ebs: You may be able to set your knife[:bootstrap_version] to the most recent stable
[2023-10-18T03:26:42.630Z]     amazon-ebs: release of Chef to fix this problem (or the most recent stable major version number).
[2023-10-18T03:26:42.630Z]     amazon-ebs:
[2023-10-18T03:26:42.630Z]     amazon-ebs: In order to test the version parameter, adventurous users may take the Metadata URL
[2023-10-18T03:26:42.630Z]     amazon-ebs: below and modify the '&v=<number>' parameter until you successfully get a URL that
[2023-10-18T03:26:42.630Z]     amazon-ebs: does not 404 (e.g. via curl or wget).  You should be able to use '&v=11' or '&v=12'
[2023-10-18T03:26:42.630Z]     amazon-ebs: successfully.
[2023-10-18T03:26:42.630Z]     amazon-ebs:
[2023-10-18T03:26:42.630Z]     amazon-ebs: If you cannot fix this problem by setting the bootstrap_version, it probably means
[2023-10-18T03:26:42.630Z]     amazon-ebs: that rocky is not supported.
[2023-10-18T03:26:42.630Z]     amazon-ebs:
[2023-10-18T03:26:42.630Z]     amazon-ebs: Metadata URL: https://omnitruck.chef.io/stable/chef/metadata?v=17.10&p=rocky&pv=8.8&m=x86_64

output from successful attempt (2023-Oct-13)
notice the platform is being set to el

[2023-10-13T17:26:50.210Z] ==> amazon-ebs: Provisioning with chef-solo
[2023-10-13T17:26:50.210Z]     amazon-ebs: Installing Chef...
[2023-10-13T17:26:50.210Z] ==> amazon-ebs:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
[2023-10-13T17:26:50.210Z] ==> amazon-ebs:                                  Dload  Upload   Total   Spent    Left  Speed
[2023-10-13T17:26:50.210Z] ==> amazon-ebs: 100 23526  100 23526    0     0   522k      0 --:--:-- --:--:-- --:--:--  522k
[2023-10-13T17:26:50.210Z]     amazon-ebs: el 8 x86_64
[2023-10-13T17:26:50.210Z]     amazon-ebs: Getting information for chef stable 17.10 for el...
[2023-10-13T17:26:50.210Z]     amazon-ebs: downloading https://omnitruck.chef.io/stable/chef/metadata?v=17.10&p=el&pv=8&m=x86_64
[2023-10-13T17:26:50.210Z]     amazon-ebs:   to file /tmp/install.sh.5906/metadata.txt
[2023-10-13T17:26:50.210Z]     amazon-ebs: trying wget...
[2023-10-13T17:26:50.771Z]     amazon-ebs: sha1	25ba625102b3d8d0200f923afe7ccc296945f20a
[2023-10-13T17:26:50.771Z]     amazon-ebs: sha256	c02dea79437b38a8b9e6f4c8d984318b16005ee8ade724708d4312e267d98dbb
[2023-10-13T17:26:50.771Z]     amazon-ebs: url	https://packages.chef.io/files/stable/chef/17.10.3/el/8/chef-17.10.3-1.el8.x86_64.rpm
[2023-10-13T17:26:50.771Z]     amazon-ebs: version	17.10.3
[2023-10-13T17:26:50.771Z]     amazon-ebs: downloaded metadata file looks valid...
[2023-10-13T17:26:50.771Z]     amazon-ebs: downloading https://packages.chef.io/files/stable/chef/17.10.3/el/8/chef-17.10.3-1.el8.x86_64.rpm
[2023-10-13T17:26:50.771Z]     amazon-ebs:   to file /tmp/install.sh.5906/chef-17.10.3-1.el8.x86_64.rpm
[2023-10-13T17:26:50.771Z]     amazon-ebs: trying wget...
[2023-10-13T17:26:51.026Z]     amazon-ebs: Comparing checksum with sha256sum...
[2023-10-13T17:26:51.026Z]     amazon-ebs: Installing chef 17.10
[2023-10-13T17:26:51.027Z]     amazon-ebs: installing with rpm...

Something changed with install.sh between 2023-Oct-13 and 2023-Oct-18.

additional info

Here are the contents of /etc/os-release from my rocky 8 box

NAME="Rocky Linux"
VERSION="8.8 (Green Obsidian)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="8.8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Rocky Linux 8.8 (Green Obsidian)"
ANSI_COLOR="0;32"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:rocky:rocky:8:GA"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
SUPPORT_END="2029-05-31"
ROCKY_SUPPORT_PRODUCT="Rocky-Linux-8"
ROCKY_SUPPORT_PRODUCT_VERSION="8.8"
REDHAT_SUPPORT_PRODUCT="Rocky Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.8"

Contents of /etc/os-release have not change between 2023-Oct-13 and 2023-Oct-18.

Possible Solution

this patch fixes install.sh found at https://omnitruck.chef.io/install.sh

--- install.sh.orig     2023-10-19 13:45:24.733410719 -0500
+++ install.sh  2023-10-19 13:45:56.159421315 -0500
@@ -440,7 +440,7 @@
        source /etc/os-release
        os="${REDHAT_SUPPORT_PRODUCT}"
        platform_version="${ROCKY_SUPPORT_PRODUCT_VERSION}"
-        platform=$ID
+        platform="redhat"

   elif test "$platform" = "xenserver"; then
     # Current XenServer 6.2 is based on CentOS 5, platform is not reset to "el" server should handle response
@vanshikw
Copy link

Hi team, facing the same issue. Please see this

@djoos
Copy link

djoos commented Oct 26, 2023

As mentioned on chef/chef#14034, having the same issue as well.
Temporarily implemented this workaround.

@vanshikw
Copy link

Thanks a lot everyone! This really helped

@mauroseb
Copy link

mauroseb commented Nov 3, 2023

@gpanula, thanks for reporting the issue, the install.sh changes that generated the problem have been reverted now.
Feel free to verify again an report back if the issue still persists.

@varnav
Copy link

varnav commented Jan 24, 2024

Test kitchen fails for me:

       rocky 8.7 x86_64
       Getting information for chef stable 18.4.3 for rocky...
       downloading https://omnitruck.chef.io/stable/chef/metadata?v=18.4.3&p=rocky&pv=8.7&m=x86_64
         to file /home/azure/test-kitchen/metadata.txt
       trying curl...
       Unable to retrieve a valid package!
       Version: 18.4.3

curl -v "https://omnitruck.chef.io/stable/chef/metadata?v=18.4.3&p=rocky&pv=8.7&m=x86_64" returns 404

Tried 8.3.0 - fails same way, and 17.10.95 - it works.

@varnav
Copy link

varnav commented Jan 31, 2024

https://omnitruck.chef.io/stable/chef/metadata?v=18.4.2&p=rocky&pv=8.7&m=x86_64 seems to be good now.

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

5 participants