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

[Bug]: Install script on Amazon Linux 2023 fails to install native #17324

Closed
Unaidedsteak opened this issue Apr 5, 2024 · 2 comments · Fixed by #17330
Closed

[Bug]: Install script on Amazon Linux 2023 fails to install native #17324

Unaidedsteak opened this issue Apr 5, 2024 · 2 comments · Fixed by #17330
Labels
area/packaging Packaging and operating systems support bug

Comments

@Unaidedsteak
Copy link

Unaidedsteak commented Apr 5, 2024

Bug description

When using the kickstart script to install the agent on an Amazon Linux 2023 machine, the native install installs the repo, but then fails to install the agent with the following:

Netdata                                                                                                                                                                             181  B/s | 153  B     00:00     │
Errors during downloading metadata for repository 'netdata':                                                                                                                                                        │
  - Status code: 404 for https://repo.netdata.cloud/repos/stable/amazonlinux/2023.4.20240401/x86_64/repodata/repomd.xml (IP: 172.67.72.170)                                                                         │
Error: Failed to download metadata for repo 'netdata': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried                                                                      │
Netdata Repository Config                                                                                                                                                           308  B/s | 153  B     00:00     │
Errors during downloading metadata for repository 'netdata-repoconfig':                                                                                                                                             │
  - Status code: 404 for https://repo.netdata.cloud/repos/repoconfig/amazonlinux/2023.4.20240401/x86_64/repodata/repomd.xml (IP: 104.26.9.141)                                                                      │
Error: Failed to download metadata for repo 'netdata-repoconfig': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried                                                           │
Ignoring repositories: netdata, netdata-repoconfig                                                                                                                                                                  │
Last metadata expiration check: 0:05:25 ago on Fri Apr  5 11:34:20 2024.                                                                                                                                            │
No match for argument: netdata                                                                                                                                                                                      │
Error: Unable to find a match: netdata          `

Expected behavior

Netdata is successfully installed

Steps to reproduce

  1. Create Amazon Linux 2023 x86 VM
  2. Run kickstart script (optionally specifying --native-only to highlight the issue)
  3. See the install fails
    ...

Installation method

kickstart.sh

System info

/etc/amazon-linux-release:Amazon Linux release 2023.4.20240401 (Amazon Linux)                                                                                                                                       │
/etc/os-release:NAME="Amazon Linux"                                                                                                                                                                                 │
/etc/os-release:VERSION="2023"                                                                                                                                                                                      │
/etc/os-release:ID="amzn"                                                                                                                                                                                           │
/etc/os-release:ID_LIKE="fedora"                                                                                                                                                                                    │
/etc/os-release:VERSION_ID="2023"                                                                                                                                                                                   │
/etc/os-release:PLATFORM_ID="platform:al2023"                                                                                                                                                                       │
/etc/os-release:PRETTY_NAME="Amazon Linux 2023.4.20240401"                                                                                                                                                          │
/etc/os-release:ANSI_COLOR="0;33"                                                                                                                                                                                   │
/etc/os-release:CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2023"                                                                                                                                                       │
/etc/os-release:VENDOR_NAME="AWS"                                                                                                                                                                                   │
/etc/os-release:SUPPORT_END="2028-03-15"                                                                                                                                                                            │
/etc/system-release:Amazon Linux release 2023.4.20240401 (Amazon Linux)

Netdata build info

N/A

Additional info

No response

@Unaidedsteak Unaidedsteak added bug needs triage Issues which need to be manually labelled labels Apr 5, 2024
@Unaidedsteak
Copy link
Author

To me it looks like your repo structure doesn't match what the script populates based on /etc/os-release.

https://repo.netdata.cloud/repos/repoconfig/amazonlinux/2023.4.20240401/x86_64/
should just be
https://repo.netdata.cloud/repos/repoconfig/amazonlinux/2023/x86_64/

@PaulSzymanski
Copy link
Contributor

I have the same issue. I noticed that dnf/yum resolves $releasever to 2023.4.20240401.

$ dnf config-manager --dump-variables
arch = aarch64
basearch = aarch64
awsdomain = amazonaws.com
awsregion = eu-central-1
repoguid = ...
releasever = 2023.4.20240401

Now, we might just be able to override the variable like so: echo 2023 > /etc/dnf/vars/releasever. However, this is not a practical solution, since Amazon is using the more verbose release versioning for their repos.

@ilyam8 ilyam8 added area/packaging Packaging and operating systems support and removed needs triage Issues which need to be manually labelled labels Apr 8, 2024
Ferroin pushed a commit that referenced this issue Apr 11, 2024
* Add repo config for Amazon Linux 2023.

dnf and yum resolve $releasever to a verbose release version (e.g. 2023.4.20240401).
However, there is no need to create repositories for every version Amazon comes up with.

Resolves #17324

* Have a more specific conditional file install (amzn2)

* Bump repo spec release for Amazon Linux changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/packaging Packaging and operating systems support bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants