RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1403015 - yum does not obey [repo].skip_if_unavailable=true
Summary: yum does not obey [repo].skip_if_unavailable=true
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: yum-utils
Version: 7.3
Hardware: All
OS: All
unspecified
high
Target Milestone: rc
: ---
Assignee: Michal Domonkos
QA Contact: Eva Mrakova
URL:
Whiteboard:
Depends On:
Blocks: 1393866
TreeView+ depends on / blocked
 
Reported: 2016-12-08 21:48 UTC by Joe Wright
Modified: 2018-09-25 22:42 UTC (History)
7 users (show)

Fixed In Version: yum-utils-1.1.31-41.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 12:27:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
log collected using script (14.31 KB, text/plain)
2016-12-08 21:48 UTC, Joe Wright
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2067 0 normal SHIPPED_LIVE yum-utils bug fix and enhancement update 2017-08-01 16:06:21 UTC

Description Joe Wright 2016-12-08 21:48:32 UTC
Created attachment 1229658 [details]
log collected using script

Description of problem:
- yum commands fail if repo is unavailable when repo is set to skip if unavailable


Version-Release number of selected component (if applicable):
yum-utils-1.1.31-40.el7.noarch
yum-3.4.3-150.el7.noarch
yum-langpacks-0.4.2-7.el7.noarch
yum-rhn-plugin-2.0.1-6.el7.noarch
yum-metadata-parser-1.1.4-10.el7.x86_64
PackageKit-yum-1.0.7-6.el7.x86_64

How reproducible:


Steps to Reproduce:
1. Run command: yum-config-manager --save --setopt=rhel-7-server-openstack-10-tools-debug-rpms.skip_if_unavailable=true (or use whatever repo you want)
2. Run something like: 

3. If repo cannot be contacted, command will fail with a 404 error

Actual results:
- failure to contact cancelled repo causes command to fail

Expected results:


Additional info:
See attached log file yum.error

Comment 1 Joe Wright 2016-12-08 21:56:54 UTC
Passing --setopt=*.skip_if_unavailable=true to the actual yum command appears to work, however setting in yum.conf or using yum-config-manager does not work.

Comment 2 Joe Wright 2016-12-08 22:02:27 UTC
Corrected reproduce steps:

Steps to Reproduce:
1. Run command: yum-config-manager --save --setopt=rhel-7-server-openstack-10-tools-debug-rpms.skip_if_unavailable=true (or use whatever repo you want)
2. Run something like: yum --enablerepo='*debug*' install /usr/lib/debug/.build-id/c8/04823bc571a3a9bf79be0e341048db167eae6b 

3. If any one repo cannot be contacted, command will fail with a 404 error, despite if a blanket *.skip_if_unavailable=true or that specific repo is set to skip if unavailable.

Comment 5 Karel Srot 2017-01-04 08:03:25 UTC
Hi Joe,
could you please confirm that you have the repo "rhel-7-server-openstack-10-tools-debug-rpms" configured in /etc/yum.repos.d/? Because it seem not to be listed in your yum-config-manager output.

Comment 6 Karel Srot 2017-01-04 08:09:07 UTC
Seem to be duplicate of bug 1369682

Comment 7 Valentina Mukhamedzhanova 2017-01-04 11:39:21 UTC
(In reply to Joe Wright from comment #2)
> 1. Run command: yum-config-manager --save
> --setopt=rhel-7-server-openstack-10-tools-debug-rpms.
> skip_if_unavailable=true (or use whatever repo you want)

Unless a specific repo is explicitly provided to yum-config-manager, it only affects the enabled repos. In the described scenario the repo is disabled, so you have to provide it explicitly. In other words, the way you're currently supposed to run the command in order to achieve the desired effect is like this:

# yum-config-manager --save --setopt=rhel-7-server-openstack-10-tools-debug-rpms.skip_if_unavailable=true rhel-7-server-openstack-10-tools-debug-rpms

The reason for this behaviour is that users usually have *a lot* of disabled repos (and often they don't even realise it), and matching them all will only spam and confuse the user.

That being said, I agree that this is a usability issue and the documentation does not explain the behaviour properly. The way we can improve this is we can go through --setopt's and see if they specify a repo explicitly and act upon that repo even if it is disabled. I would still keep the old behaviour for setopt's with globbing expressions. The documentation can also be improved.

I am removing the Regression keyword, as to my knowledge this is not a regression, it has always worked this way.

> Passing --setopt=*.skip_if_unavailable=true to the actual yum command appears
> to work, however setting in yum.conf or using yum-config-manager does not work.

skip_if_unavailable is a per repository option, so setting it in yum.conf (that is, in the [main] section) will not have any effect.

Comment 15 errata-xmlrpc 2017-08-01 12:27:31 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/RHBA-2017:2067


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