Bug 2219796

Summary: Value of $releasever variable in epel.repo results in 404 error code when hitting metalink for epel in Azure VM
Product: [Fedora] Fedora EPEL Reporter: Devika Vinayarajan <devika.vinayarajan>
Component: epel-releaseAssignee: Kevin Fenzi <kevin>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: epel9CC: carl, kevin, mastahnke, smooge, tdawson
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.