Bug 920271 - [repos] dnf upgrade fails completely if any repo is unavailable
Summary: [repos] dnf upgrade fails completely if any repo is unavailable
Keywords:
Status: CLOSED DUPLICATE of bug 889202
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ales Kozumplik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-11 16:35 UTC by Karel Volný
Modified: 2014-09-30 23:41 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-04-02 15:17:06 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karel Volný 2013-03-11 16:35:06 UTC
Description of problem:
I have set up some private repositories that are not accessible on the Internet, so trying to refresh repomd.xml fails which leads to failure of the whole upgrade process.
Yum handles this gracefully, not failing on inaccessible repos.

Version-Release number of selected component (if applicable):
dnf-0.2.21-1.git050524e.fc18.noarch

How reproducible:
always

Steps to Reproduce:
1. configure some repos that are inaccessible
2. dnf upgrade
  
Actual results:
[root@kvolny ~]# dnf upgrade
Příprava průběhu aktualizace
Řešení závislostí...
--> Starting dependency resolution
http://(super secret hostname)/client/Fedora18/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: (super secret hostname); Jméno počítače nemá přiřazenu adresu"
Zkusí se jiné zrcadlo...


Can not read repomd file.
[root@kvolny ~]#

Expected results:
[root@kvolny ~]# yum upgrade
Zavedené moduly: auto-update-debuginfo, langpacks
adobe-linux-x86_64                                                                                                                                  |  951 B  00:00:00     
http://(super secret hostname)/client/Fedora18/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: (super secret hostname); Jméno počítače nemá přiřazenu adresu"
Zkusí se jiné zrcadlo...
fedora/18/x86_64/metalink                                                                                                                           |  32 kB  00:00:00     
http://(another secret hostname)/repo/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: (another secret hostname); Jméno počítače nemá přiřazenu adresu"
Zkusí se jiné zrcadlo...
http://(third secret hostname)/dist-git/fedora/18/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: (third secret hostname); Jméno počítače nemá přiřazenu adresu"
Zkusí se jiné zrcadlo...
rpmfusion-free-updates                                                                                                                              | 3.3 kB  00:00:00     
rpmfusion-free-updates-debuginfo                                                                                                                    | 2.7 kB  00:00:00     

...

Aktualizováno:
  kernel-headers.x86_64 0:3.8.2-206.fc18     spherical-cow-kde-theme.noarch 0:18.0.1-1.fc18     systemtap.x86_64 0:2.1-2.fc18     systemtap-client.x86_64 0:2.1-2.fc18    
  systemtap-devel.x86_64 0:2.1-2.fc18        systemtap-runtime.x86_64 0:2.1-2.fc18             

Hotovo!
[root@kvolny ~]#

Additional info:
This may be a duplicate of bug #910088 but that one is about not trying to refresh repos for actions that don't need it if I get it right. This one is about just skipping unavailable repos.

... or at least add an option to skip if not a default behaviour, disabling all the inaccessible repos manually is a PITA

Comment 1 Ales Kozumplik 2013-03-12 09:15:41 UTC
Hi Karel, thanks for the report.

This could be a dup of bug 904706, can I please ask you to try with dnf-0.2.22 and tell me if the problem is gone?

If not, I'll move this to the rawhide version which is getting librepo integrated and situations like this (some mirrors down) will have to be handled and tested anyway.

Comment 2 Karel Volný 2013-03-12 15:28:29 UTC
no, 0.2.22 does not fix this

I've tried to clean metadata to ensure that something has to be downloaded, then  added a fake dns record to /etc/hosts for the Adobe repo to simulate the inaccesibility and got:

[root@kvolny ~]# rpm -q dnf
dnf-0.2.22-1.git97180b8.fc18.noarch
[root@kvolny ~]# dnf upgrade
Příprava průběhu aktualizace
Řešení závislostí...
--> Starting dependency resolution
http://linuxdownload.adobe.com/linux/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "couldn't connect to host"
Zkusí se jiné zrcadlo...
Chyba: failure: repodata/repomd.xml from adobe-linux-x86_64: [Errno 256] No more mirrors to try.


... hm, now it comes to my mind that this testcase is not exactly the same as original, because in the original one I still had the old metadata available (not cleaned), but it doesn't matter much, as you cannot download the packages from unavailable repo so it is unusable for solving the dependencies anyways, no matter if you have the old metadata or not; I'd like to see dnf being able to workaround both cases (old/missing metadata)

Comment 3 Ales Kozumplik 2013-03-12 16:26:17 UTC
Yeah, I was afraid this is actually a different issue.

Thanks for the detailed reproducer, I'll try to have this fixed once librepo is integrated into DNF.

Comment 4 Ales Kozumplik 2013-04-02 15:17:06 UTC
(In reply to comment #2)
> dependencies anyways, no matter if you have the old metadata or not; I'd
> like to see dnf being able to workaround both cases (old/missing metadata)

Ok, this is the situation:

If repo metadata is locally cached and not expired DNF never tries to access the remote repository.

By default, if repo metadata is expired and the repo is inaccessible 'yum upgrade' will fail ("No more mirrors to try") just like DNF. In yum there is a per-repo option called 'skip_if_unavailable' that prevents this: the operation will continue as if the repo didn't exist/was disabled. Bug 889202 returns this support to DNF so it should work fine.

Also, if you want to use a cached, expired that is momentarily unavailable you can use '--cacheonly' to force using even expired repositories.

Closing this as dup 889202, please reopen if that doesn't satisfy you.

*** This bug has been marked as a duplicate of bug 889202 ***

Comment 5 Karel Volný 2013-04-03 10:16:13 UTC
thanks for looking into this; now it seems to behave a bit differently (wonder what has changed since the abovementioned update ...), I'll open a new report if something goes wrong


Note You need to log in before you can comment on or make changes to this bug.