Bug 25787

Summary: dnf gets broken when upgrading from Mageia 7 to Cauldron
Product: Mageia Reporter: Kristoffer Grundström <lovaren>
Component: RPM PackagesAssignee: Neal Gompa <ngompa13>
Status: REOPENED --- QA Contact:
Severity: major    
Priority: Normal CC: lovaren, ouaurelien, thierry.vignaud
Version: Cauldron   
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Source RPM: dnf-4.2.6-1.mga7.src.rpm CVE:
Status comment:

Description Kristoffer Grundström 2019-11-30 01:43:46 CET
Description of problem: I noticed how upgrading from Mageia 7 to Cauldron broke dnf to the point that trying to update the system isn't working anymore.

I checked which repos that dnf uses using the dnf repolist command and got this as a result:

Failed to download metadata for repo 'mageia-x86_64': Cannot prepare internal mirrorlist: No URLs in mirrorlist
Error: Failed to download metadata for repo 'mageia-x86_64': Cannot prepare internal mirrorlist: No URLs in mirrorlist

I did dnf clean metadata && dnf clean all && dnf install mageia-repos-cauldron and that gave no luck as well.

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

How reproducible: All the time

Steps to Reproduce:
1. Upgrade from Mageia 7 to Cauldron by adding the Cauldron repos with urpmi --add-media
2. Do dnf update.
3. Voila! The update failed with Failed to download metadata for repo 'mageia-x86_64': Cannot prepare internal mirrorlist: No URLs in mirrorlist
Kristoffer Grundström 2019-11-30 01:44:35 CET

CC: (none) => hamnisdude

Comment 1 Lewis Smith 2019-11-30 11:24:24 CET
This looks more like a manipulation gone wrong than a fault in DNF.

Assigning to Neal as active dnf maintainer, CC Thierry for repo advice.

Assignee: bugsquad => ngompa13
CC: (none) => thierry.vignaud
Source RPM: dnf => dnf-4.2.6-1.mga7.src.rpm

Comment 2 Neal Gompa 2019-12-04 22:46:25 CET
I know what causes this quirk, and I'm preparing an update to DNF to resolve this.

Status: NEW => ASSIGNED

Comment 3 Neal Gompa 2019-12-08 19:03:10 CET
This should be fixed with the update to dnf-4.2.17-4.mga8 in Cauldron.

Resolution: (none) => FIXED
Status: ASSIGNED => RESOLVED

Comment 4 Kristoffer Grundström 2019-12-09 02:03:22 CET
(In reply to Neal Gompa from comment #3)
> This should be fixed with the update to dnf-4.2.17-4.mga8 in Cauldron.

I got the update and installed it, but the error still remains.

Error: Failed to download metadata for repo 'mageia-x86_64': Cannot prepare internal mirrorlist: No URLs in mirrorlist
Comment 5 Kristoffer Grundström 2019-12-09 02:04:25 CET
And I got this as well:

Errors during downloading metadata for repository 'cauldron-updates-x86_64':
  - Status code: 404 for http://ftp.acc.umu.se/mirror/mageia/distrib/cauldron/x86_64/media/core/updates/repodata/repomd.xml (IP: 194.71.11.173)
  - Curl error (78): Remote file not found for ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/Mageia/distrib/cauldron/x86_64/media/core/updates/repodata/repomd.xml [RETR response: 550]
  - Status code: 404 for http://ftp.nluug.nl/pub/os/Linux/distr/mageia/distrib/cauldron/x86_64/media/core/updates/repodata/repomd.xml (IP: 145.220.21.40)
  - Curl error (78): Remote file not found for ftp://ftp.snt.utwente.nl/pub/os/linux/mageia/distrib/cauldron/x86_64/media/core/updates/repodata/repomd.xml [RETR response: 550]
  - Curl error (78): Remote file not found for ftp://www.mirrorservice.org/sites/mageia.org/pub/mageia/distrib/cauldron/x86_64/media/core/updates/repodata/repomd.xml [RETR response: 550]
Error: Failed to download metadata for repo 'cauldron-updates-x86_64': repomd.xml parser error: Parse error at line: 6 (Opening and ending tag mismatch: hr line 0 and body
)
Thierry Vignaud 2019-12-10 13:43:07 CET

Status: RESOLVED => REOPENED
Resolution: FIXED => (none)

Comment 6 Neal Gompa 2019-12-15 18:36:06 CET
(In reply to Kristoffer Grundström from comment #4)
> (In reply to Neal Gompa from comment #3)
> > This should be fixed with the update to dnf-4.2.17-4.mga8 in Cauldron.
> 
> I got the update and installed it, but the error still remains.
> 
> Error: Failed to download metadata for repo 'mageia-x86_64': Cannot prepare
> internal mirrorlist: No URLs in mirrorlist

Hmm, so an empty mirrorlist file now causes an error instead of making it skip the repo, that's annoying...
Comment 7 Aurelien Oudelet 2020-07-05 22:53:45 CEST
Hi, issue is still present in Mageia 8 alpha 1 freshly installed with classic ISO installer.

When DNF refreshes, sudo journalctl -f output is like this:

dnf[2901]: détermination du miroir le plus rapide (3 hôtes).. done.
juil. 05 22:34:59 mageia-2 dnf[2901]: Mageia Cauldron - x86_64                        2.2 kB/s | 2.5 kB     00:01
juil. 05 22:35:00 mageia-2 dnf[2901]: détermination du miroir le plus rapide (4 hôtes).. done.
juil. 05 22:35:03 mageia-2 dnf[2901]: Mageia Cauldron - x86_64                         15 MB/s |  47 MB     00:03
juil. 05 22:35:14 mageia-2 dnf[2901]: Mageia Cauldron - x86_64 - Updates              931  B/s | 1.5 kB     00:01
juil. 05 22:35:14 mageia-2 dnf[2901]: Mageia 8 - x86_64                               483  B/s |  51  B     00:00
juil. 05 22:35:14 mageia-2 dnf[2901]: Error: Failed to download metadata for repo 'mageia-x86_64': Cannot prepare internal mirrorlist: No URLs in mirrorlist
juil. 05 22:35:14 mageia-2 dnf[2901]: Mageia 8 - x86_64 - Updates                     494  B/s |  51  B     00:00
juil. 05 22:35:14 mageia-2 dnf[2901]: Error: Failed to download metadata for repo 'updates-x86_64': Cannot prepare internal mirrorlist: No URLs in mirrorlist
juil. 05 22:35:14 mageia-2 dnf[2901]: Dépôts ignorés : mageia-x86_64, updates-x86_64
juil. 05 22:35:15 mageia-2 dnf[2901]: Cache des métadonnées créé.
juil. 05 22:35:15 mageia-2 systemd[1]: dnf-makecache.service: Succeeded.
juil. 05 22:35:15 mageia-2 systemd[1]: Finished dnf makecache.
juil. 05 22:35:15 mageia-2 systemd[1]: dnf-makecache.service: Consumed 11.443s CPU time.

So, repo in DNF are set as this:
# dnf repolist
cauldron-updates-x86_64          Mageia Cauldron - x86_64 - Updates
cauldron-x86_64                  Mageia Cauldron - x86_64
mageia-x86_64                    Mageia 8 - x86_64
updates-x86_64                   Mageia 8 - x86_64 - Updates

Therefore, mageia 8 repos get these errors. If cauldron is active system, DNF shouldn't look for mageia 8 repositories.
These repos could be inactivated before release date and a script should activate them on release date?

CC: (none) => ouaurelien