EuroLinux / cloud-images-rfc

This repository contains Requests for Change in EuroLinux made cloud images.
https://app.vagrantup.com/eurolinux-vagrant
9 stars 0 forks source link

[BUG] Rocky 8.8.6 vagrant image can't access repositories #9

Closed hosekadam closed 8 months ago

hosekadam commented 8 months ago

Describe the bug After creating clean vagrant box with vagrant file https://app.vagrantup.com/eurolinux-vagrant/boxes/rocky-8/versions/8.8.6 running the yum update following error is occurred:

Rocky Linux 8 - BaseOS                                                                 54 kB/s | 490 kB     00:09    
Errors during downloading metadata for repository 'baseos':
  - Status code: 404 for http://fosszone.csd.auth.gr/rockylinux/8.8/BaseOS/x86_64/os/repodata/b64b4ba38064de3dfa19aaf5cac463a780915d1ad78ef5727732f40842313597-primary.xml.gz (IP: 155.207.200.222)
.
.
.
Error: Failed to download metadata for repo 'baseos': Yum repo downloading error: Downloading error(s): repodata/b64b4ba38064de3dfa19aaf5cac463a780915d1ad78ef5727732f40842313597-primary.xml.gz - Cannot download, all mirrors were already tried without success; repodata/d73d8d60edcf8599213d01d4ffc9dda7b49449468d006d28770291e70ae99283-filelists.xml.gz - Cannot download, all mirrors were already tried without success

Cloud Image Version: 8.8.6 Provider: Vagrant

To Reproduce

Steps to reproduce the behavior:

  1. Create the Rocky 8.8.6 Vagrant box using vagrant file: https://app.vagrantup.com/eurolinux-vagrant/boxes/rocky-8/versions/8.8.6
  2. Login to the machine
  3. Run yum update

Expected behavior Error occurred during yum update, failure of the process:

Rocky Linux 8 - BaseOS                                                                 54 kB/s | 490 kB     00:09    
Errors during downloading metadata for repository 'baseos':
  - Status code: 404 for http://fosszone.csd.auth.gr/rockylinux/8.8/BaseOS/x86_64/os/repodata/b64b4ba38064de3dfa19aaf5cac463a780915d1ad78ef5727732f40842313597-primary.xml.gz (IP: 155.207.200.222)
.
.
.
Error: Failed to download metadata for repo 'baseos': Yum repo downloading error: Downloading error(s): repodata/b64b4ba38064de3dfa19aaf5cac463a780915d1ad78ef5727732f40842313597-primary.xml.gz - Cannot download, all mirrors were already tried without success; repodata/d73d8d60edcf8599213d01d4ffc9dda7b49449468d006d28770291e70ae99283-filelists.xml.gz - Cannot download, all mirrors were already tried without success
AlexBaranowski commented 8 months ago

Hi @hosekadam, it looks more like Rocky's Linux problem than ours.

The host is looking for the nearest/best mirror. Then yum uses the repomd.xml file to determine where it can find other files describing the repository.

At the moment everything should work fine as repomd.xml points to a file existing in the directory.

Alex@NormandySR2 ~> curl -s http://fosszone.csd.auth.gr/rockylinux/8.8/BaseOS/x86_64/os/repodata/ | grep primary.xml

returns

<tr><td valign="top"><img src="/icons/compressed.gif" alt="[   ]"></td><td><a href="423c62b3d724f64a31f46325aa81bbe26372eba1f18da5c90a650a48abe18f6b-primary.xml.gz">423c62b3d724f64a31f46325aa81bbe26372eba1f18da5c90a650a48abe18f6b-primary.xml.gz</a></td><td align="right">2023-10-24 03:19  </td><td align="right">3.6M</td><td>&nbsp;</td></tr>

and

Alex@NormandySR2 ~> curl -s http://fosszone.csd.auth.gr/rockylinux/8.8/BaseOS/x86_64/os/repodata/repomd.xml | grep primary.xml

returns

    <location href="repodata/423c62b3d724f64a31f46325aa81bbe26372eba1f18da5c90a650a48abe18f6b-primary.xml.gz"/>

If you still experience the problem you might try

sudo dnf clean all

Best, Alex

BTW. This happens all the time -> especially with CentOS Stream and RL.

hosekadam commented 8 months ago

Hi @AlexBaranowski thanks for responding!

I tried it now, and I'm still getting the error, but now it was for the AppStream repository (while I was creating the issue it was for BaseOS).

But using the sudo dnf clean all helped, even the output from this command was 0 files removed , so it solved the problem, thanks!

What is just weird to me, that when I use the https://app.vagrantup.com/eurolinux-vagrant/boxes/rocky-8/versions/8.8.5 (the previous box version) the yum update works fine. And as far as I know, the repos should be the same. So that's why thought the issue is related to you.

AlexBaranowski commented 8 months ago

I would love to help, but as said this is Rocky's Linux mirroring system issue. The problem with mirrors is that sometimes they do not reload files after sync or they are syncing slowly. Also a lot of admins just rsync instead of rsync on Packages then metadata, but this is another talk.

Some distros (EuroLinux not included in that matter 😢 [a lot of sites don't want to mirror with pulp 😭 ]) might use pulp or another project that allows more "atomic" repository metadata replacement with reloading the webserver/cache dropping etc. I believe that Red Hat uses it and as said this solution has a lot of benefits. The only problem with pulp, and like systems, is that they are not as widespread as simple rsync. One of the reasons is that mirroring sites have dozens of systems (ubuntu,debian,openbsd,alpine,fedora) and rsync always works.

Also, there is a possibility to use the "baseurl" instead of mirrors, in yum.repos.d for RL, but it would require additional automation on Your side.

Best, Alex

I'm closing the issue. If You believe that there is another problem (or even the same) in our images You can create a new one. I will then debug even deeper.