voxpupuli / puppet-yum

Puppet module for Yum
https://forge.puppet.com/puppet/yum
MIT License
16 stars 99 forks source link

RHEL8, epel-modular is installed with the wrong repo-name #246

Closed ccolic closed 2 years ago

ccolic commented 2 years ago

Affected Puppet, Ruby, OS and module versions/distributions

How to reproduce (e.g Puppet code you use)

I defined the following data in Hiera to install the built-in epel and epel-modular Repos for RHEL8:

yum::managed_repos:
  - "epel"
  - "epel-modular"

This installs the repos defined at https://github.com/voxpupuli/puppet-yum/blob/v5.3.1/data/repos/RedHat/8.yaml

What are you seeing

When running yum/dnf commands such as dnf check-update I get the following errors:

[root@server ~]# dnf check-update
Updating Subscription Management repositories.
Extra Packages for Enterprise Linux Modular 8 - x86_64                                                           41 kB/s |  93 kB     00:02
Errors during downloading metadata for repository 'epel-modular':
  - Status code: 404 for https://mirrors.fedoraproject.org/metalink?repo=modular-epel8&arch=x86_64&infra=$infra&content=$contentdir (IP: 152.19.134.198)
  - Status code: 404 for https://mirrors.fedoraproject.org/metalink?repo=modular-epel8&arch=x86_64&infra=$infra&content=$contentdir (IP: 85.236.55.6)
  - Status code: 404 for https://mirrors.fedoraproject.org/metalink?repo=modular-epel8&arch=x86_64&infra=$infra&content=$contentdir (IP: 18.159.254.57)
Error: Failed to download metadata for repo 'epel-modular': Cannot prepare internal mirrorlist: Status code: 404 for https://mirrors.fedoraproject.org/metalink?repo=modular-epel8&arch=x86_64&infra=$infra&content=$contentdir (IP: 85.236.55.6)

When checking the URL manually with curl, I get the following error message:

curl -v 'https://mirrors.fedoraproject.org/metalink?repo=modular-epel8&arch=x86_64&infra=$infra&content=$contentdir'
<!-- # repo = modular-epel8 arch = x86_64 error: invalid repo or arch

further down in the output, the valid repo-names are listed as:

# repo=epel-modular-8&arch=aarch64
# repo=epel-modular-8&arch=ppc64le
# repo=epel-modular-8&arch=s390x
# repo=epel-modular-8&arch=x86_64

What behaviour did you expect instead

I expect the repo 'epel-modular' to be installed with the correct URL, setting repo=epel-modular-$releasever and not repo=modular-epel$releasever

Output log

See above.