Bug 2219796 - Value of $releasever variable in epel.repo results in 404 error code when hitting metalink for epel in Azure VM
Summary: Value of $releasever variable in epel.repo results in 404 error code when hit...
Keywords:
Status: NEW
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: epel-release
Version: epel9
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-05 12:01 UTC by Devika Vinayarajan
Modified: 2023-07-05 13:22 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Devika Vinayarajan 2023-07-05 12:01:14 UTC
Description of problem:

The value of releasever is automatically picked up as the OS Version of 9.2 in "/etc/yum/vars" on creating an Azure RHEL 9.2 VM. Due to this, the metalink in the epel.repo file in "/etc/yum.repos.d" points to https://mirrors.fedoraproject.org/metalink?repo=epel-9.2&arch=x86_64&infra=$infra&content=$contentdir which is invalid and gives a 404 error code.
The only applicable value for substitution of releasever in the metalink is 9.
This issue was reported in a lower version and reported to have an interim fix of hardcoding the releasever variable (https://bugzilla.redhat.com/show_bug.cgi?id=1969500)


Version-Release number of selected component (if applicable):


How reproducible: 100%


Steps to Reproduce:
1. Create an Azure VM with OS Linux (RHEL 9.2)
2. Confirm value of releasever in "/etc/yum/vars" has been auto populated with 9.2
3. # sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm -y


Actual results:

Extra Packages for Enterprise Linux 9.2 - x86_64                                                                              82 kB/s | 109 kB     00:01
Errors during downloading metadata for repository 'epel':
  - Status code: 404 for https://mirrors.fedoraproject.org/metalink?repo=epel-9.2&arch=x86_64&infra=$infra&content=$contentdir (IP: 38.145.60.20)
  - Status code: 404 for https://mirrors.fedoraproject.org/metalink?repo=epel-9.2&arch=x86_64&infra=$infra&content=$contentdir (IP: 34.221.3.152)
  - Status code: 404 for https://mirrors.fedoraproject.org/metalink?repo=epel-9.2&arch=x86_64&infra=$infra&content=$contentdir (IP: 38.145.60.21)
Error: Failed to download metadata for repo 'epel': Cannot prepare internal mirrorlist: Status code: 404 for https://mirrors.fedoraproject.org/metalink?repo=epel-9.2&arch=x86_64&infra=$infra&content=$contentdir (IP: 38.145.60.21)


Expected results:

The value in metalink should be populated with 9 and running "sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm -y" should allow the user to install the epel-release package.


Additional info:

Workaround - sed -i 's/$releasever/9/g' /etc/yum.repos.d/epel.repo

Comment 1 Troy Dawson 2023-07-05 13:22:43 UTC
I thought we had already made this change ($releasever -> 9) but it looks like we only did it for 8.


Note You need to log in before you can comment on or make changes to this bug.