Bug 1679509

Summary: [libdnf] Set skip_if_unavailable=false as default behavior for software management tools
Product: Red Hat Enterprise Linux 8 Reporter: Marek Blaha <mblaha>
Component: libdnfAssignee: Jaroslav Mracek <jmracek>
Status: CLOSED ERRATA QA Contact: Jan Blazek <jblazek>
Severity: high Docs Contact: Marie Dolezelova <mdolezel>
Priority: high    
Version: 8.0CC: csnyder, cww, dmach, igkioka, james.antill, jblazek, jmracek, ksrot, lmanasko, mdomonko, pkratoch, stefw, tbowling, toneata, vanhoof, wargre, wchadwic
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: 8.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libdnf-0.22.5-5.el8 Doc Type: Bug Fix
Doc Text:
.*YUM v4* no longer skips unavailable repositories by default *YUM v4* defaults to the "skip_if_unavailable=False" setting for all repositories. Previously, if the required repository was not available, the packages from the repository were not considered in the install, search, or update operations. Subsequently, some `yum` commands and yum-based scripts succeeded with exit code 0 even if there were unavailable repositories. With this update, `libdnf` has been modified, and *YUM v4* no longer skips unavailable repositories by default.
Story Points: ---
Clone Of:
: 1692452 (view as bug list) Environment:
Last Closed: 2019-11-05 22:21:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1679648, 1681084, 1689401, 1692453, 1692454    
Bug Blocks: 1689400, 1692452    

Description Marek Blaha 2019-02-21 09:55:13 UTC
Description of problem:

Unlike the YUM3, dnf in repo configuration defaults to skip_if_unavailable=True. We should consider adding `skip_if_unavailable=false` into important system repositories generated by subscription manager, because unavailability of these repos without noticing can cause a lot of troubles to customers.

How reproducible:
always

Steps to Reproduce:

On RHEL 8 system without network connection:

# yum makecache
Failed to set locale, defaulting to C
Updating Subscription Management repositories.
Updating Subscription Management repositories.
Red Hat Enterprise Linux 8 for x86_64 - AppStream Beta (RPMs)            0.0 B/s |   0  B   00:00
Red Hat Enterprise Linux 8 for x86_64 - BaseOS Beta (RPMs)               0.0 B/s |   0  B   00:00           
Failed to synchronize cache for repo 'rhel-8-for-x86_64-appstream-beta-rpms', ignoring this repo.
Failed to synchronize cache for repo 'rhel-8-for-x86_64-baseos-beta-rpms', ignoring this repo.
Metadata cache created.

Actual results:
redhat repos are ignored
# echo $?
0

Expected results:
redhat repos are not ignored.

# yum makecache
Failed to set locale, defaulting to C
Updating Subscription Management repositories.
Updating Subscription Management repositories.
Red Hat Enterprise Linux 8 for x86_64 - BaseOS Beta (RPMs)               0.0 B/s |   0  B   00:00           
Error: Failed to synchronize cache for repo 'rhel-8-for-x86_64-baseos-beta-rpms'

echo $?
1

Additional info:

Comment 6 Karel Srot 2019-03-14 20:48:32 UTC
*** Bug 1601911 has been marked as a duplicate of this bug. ***

Comment 16 Jaroslav Mracek 2019-03-20 08:28:42 UTC
I created a patch https://github.com/rpm-software-management/libdnf/pull/701 that changes a defaults for dnf, microdnf, and PackageKit to skip_if_unavailable=false.

Comment 41 edward Grey 2019-10-17 08:54:48 UTC
I understand why this option should be defaulted to 'false' for OS like RHEL8.

Now on fedora were the lifecycle are pretty fast, it can be a burden. I'm on fedora 31 with a repository that is not yet available for fedora31 (there is many, but let's give an example: postgresql repo).
 Without me checking why some library did not get upgraded automatically, I would have not detected that the cause is an unrelated repository. 


This comment is just to write what is on my mind, and make other people react

I did not check if this option can be set at repository level but I guess it is. On Fedora would it have been preferable to have this option set to true at global level and false for the core repositories (fedora, fedora update, fedora modular, fedora modular update)?

Comment 43 errata-xmlrpc 2019-11-05 22:21:13 UTC
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, 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/RHSA-2019:3583