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 #14034

Open
gpanula opened this issue Oct 19, 2023 · 11 comments
Open

Omnitruck artifact does not exist for Rocky Linux #14034

gpanula opened this issue Oct 19, 2023 · 11 comments
Labels
Status: Untriaged An issue that has yet to be triaged.

Comments

@gpanula
Copy link

gpanula commented Oct 19, 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.

@gpanula gpanula added the Status: Untriaged An issue that has yet to be triaged. label Oct 19, 2023
@gpanula
Copy link
Author

gpanula commented Oct 19, 2023

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

@djoos
Copy link

djoos commented Oct 20, 2023

Argh, bitten by the same issue here... Thank you for the write-up @gpanula!
Would it make sense to open an issue over at https://github.com/chef/omnitruck ?

@shashank-gugalia-ck
Copy link

Thanks @gpanula for details. I am blocked because of the same, was wondering if there is way to get the older install.sh while the current one gets fixed

@gpanula
Copy link
Author

gpanula commented Oct 24, 2023

Argh, bitten by the same issue here... Thank you for the write-up @gpanula! Would it make sense to open an issue over at https://github.com/chef/omnitruck ?

Thanks, I wasn't aware of the omnitruck repo.
I've opened chef/omnitruck#600 for this issue in that repo.

@gpanula
Copy link
Author

gpanula commented Oct 24, 2023

Running this sed command on the rocky linux machine will work-around the issue

sed -e 's/^ID="[^"]*"/ID="redhat"/' -i /etc/os-release

@mauroseb
Copy link

mauroseb commented Nov 3, 2023

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

@varnav
Copy link

varnav commented Jan 25, 2024

https://omnitruck.chef.io/install.sh works for me as it has parameter p=el

But test kitchen fails. My kitchen.yml contains this:

  - name: rocky8
    driver:
      image_urn: center-for-internet-security-inc:cis-rocky:cis-rockylinux-8-l1-gen2:latest
      plan:
        name: "cis-rockylinux-8-l1-gen2"
        product: "cis-rocky"
        publisher: "center-for-internet-security-inc"
    transport:
      name: ssh
      elevated: true
    provisioner:
      name: chef_infra
      product_name: chef
      # product_version: 17.10.95 # https://github.com/chef/omnitruck/issues/600
      product_version: 18.3.0
      always_update_cookbooks: true
      chef_license: accept-no-persist
      root_path: /home/azure/test-kitchen # default /tmp has noexec on CIS hardened images

error is

       Preparing client.rb
       rocky 8.7 x86_64
       Getting information for chef stable 18.3.0 for rocky...
       downloading https://omnitruck.chef.io/stable/chef/metadata?v=18.3.0&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.3.0

Note p=rocky in the URL.

There is no problem with 17.10.95

Workaround is to add:

    lifecycle:
      pre_converge:
        remote: mkdir -p /home/azure/test-kitchen && cd /home/azure/test-kitchen && curl -Os https://omnitruck.chef.io/install.sh && chmod +x install.sh && sudo ./install.sh -d /home/azure/test-kitchen

@varnav
Copy link

varnav commented Feb 1, 2024

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

@djoos
Copy link

djoos commented Feb 2, 2024

Well...

https://omnitruck.chef.io/stable/chef/metadata?v=18.2.7&p=rocky&pv=8.8&m=x86_64 had been working fine for us for months, until it seems to have fallen off the bandwagon today. We'd only do the "sudo sed -e 's/^ID=\"[^\"]*\"/ID=\"redhat\"/' -i /etc/os-release" hack on < 18.2.7, but have now had to extend that to 18.2.7 as well.

https://omnitruck.chef.io/stable/chef/metadata?v=18.4.2&p=rocky&pv=8.8&m=x86_64 is fine, but is it a "feature" that previous artifacts evaporate all of a sudden?

Thanks!

@hamsjelv
Copy link

👀

@Stromweld
Copy link
Contributor

There are no artifacts for ARM64(aarch64) either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Untriaged An issue that has yet to be triaged.
Projects
None yet
Development

No branches or pull requests

7 participants