Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
With both mirrorlist and baseurl defined in a repo file, if the mirrorlist cannot be found it does not fall back to baseurl.
This worked on previous RHEL major versions (5/6/7)
Version-Release number of selected component (if applicable):
dnf-4.2.7-6.el8.noarch
How reproducible:
Always
Steps to Reproduce:
Create custom repo file, create a mirrorlist that is not available
[RHEL-8-20191106_3]
#BaseOS
name=RHEL-8-20191106_3
#fake mirror list to replicate issue
mirrorlist=http://192.168.122.1:8080/BaseOSXX
enabled=1
baseurl=http://192.168.122.1:8080/BaseOS
gpgcheck=0
repo_gpgcheck=1
gpgkey=http://192.168.122.1:8080/BaseOS/my.key
running yum/dnf commands
# dnf -v --disablerepo=* --enablerepo=RHEL-8-20191106_3 list
Loaded plugins: builddep, changelog, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, needs-restarting, playground, product-id, repoclosure, repodiff, repograph, repomanage, reposync, uploadprofile
DNF version: 4.2.7
cachedir: /var/cache/dnf
repo: downloading from remote: RHEL-8-20191106_3
error: Status code: 404 for http://192.168.122.1:8080/BaseOSXX (http://192.168.122.1:8080/BaseOSXX).
RHEL-8-20191106_3 22 kB/s | 195 B 00:00
Cannot download 'http://192.168.122.1:8080/BaseOSXX': Cannot prepare internal mirrorlist: Status code: 404 for http://192.168.122.1:8080/BaseOSXX.
Failed to download metadata for repo 'RHEL-8-20191106_3'
Error: Failed to download metadata for repo 'RHEL-8-20191106_3'
Actual results:
cannot find mirrorlist so fails to download repo metadata but basurl (which is available) is never tried
Expected results:
Fall back to basurl if mirrorlist is unavailable similar to what happened on previous RHEL releases
behaviour on RHEL7
# yum --disablerepo=* --enablerepo=myrepo list | more
Loaded plugins: boks-protect, changelog, fastestmirror, langpacks, tmprepo,
: verify, versionlock
Determining fastest mirrors
Could not retrieve mirrorlist http://url/myrepoXX error was
14: HTTP Error 404 - Not Found
* myrepo
Installed Packages
GeoIP.x86_64 1.5.0-13.el7 @repo
NetworkManager.x86_64 1:1.12.0-10.el7_6 @repo
NetworkManager-config-server.noarch 1:1.12.0-10.el7_6 @repo
NetworkManager-libnm.x86_64 1:1.12.0-10.el7_6 @repo
Additional info:
Proposing AC:
- When dnf is using a repository with both baseurl and mirrorlist specified and the mirrorlist file cannot be found, baseurl is used as a fallback.
- When dnf is using a repository with both baseurl and mirrorlist specified and all the mirrorlist urls are invalid, baseurl is used as a fallback.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (yum bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHEA-2020:4510