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 1479388 - yum-config-manager does not enable repository when called inside a rhel 7.4 container
Summary: yum-config-manager does not enable repository when called inside a rhel 7.4 c...
Keywords:
Status: CLOSED DUPLICATE of bug 1486338
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: yum-utils
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Michal Domonkos
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-08 13:21 UTC by Petr Kubat
Modified: 2018-08-27 11:34 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-09-06 17:34:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Petr Kubat 2017-08-08 13:21:54 UTC
Description of problem:
When 'yum-config-manager --enable ...' is called directly after the 'redhat.repo' file is populated via a different yum command (as suggested by https://access.redhat.com/solutions/1443553) the repository in question does not get enabled for yum (but gets enabled in the 'redhat.repo' file) and all other operations depending on the enabled repository will fail.

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

rhel-server-docker-7.4-81
yum-3.4.3-154.el7.noarch
yum-utils-1.1.31-42.el7.noarch
subscription-manager-1.19.21-1.el7.x86_64


How reproducible:
Every time

Steps to Reproduce:
# docker run --rm -ti registry.access.redhat.com/rhel7:7.4 bash
# yum install yum-utils # < just a command to populate redhat.repo
Package yum-utils-1.1.31-42.el7.noarch already installed and latest version
# yum-config-manager --enable rhel-server-rhscl-7-rpms
# cat /etc/yum.repos.d/redhat.repo | grep rhscl-7-rpms -A 10 | grep enabled
enabled = 1
# yum install -y rh-nginx18

Actual results:
No package rh-nginx18 available.
Error: Nothing to do
# cat /etc/yum.repos.d/redhat.repo | grep rhscl-7-rpms -A 10 | grep enabled
enabled = 0

Expected results:
rh-nginx18 gets installed
# cat /etc/yum.repos.d/redhat.repo | grep rhscl-7-rpms -A 10 | grep enabled
enabled = 1

Additional info:
The repository gets enabled properly if another yum command gets called before the call to yum-config-manager. So something like this works as expected:

# docker run --rm -ti registry.access.redhat.com/rhel7:7.4 bash
# yum install yum-utils
Package yum-utils-1.1.31-42.el7.noarch already installed and latest version
# yum install yum-utils
Package yum-utils-1.1.31-42.el7.noarch already installed and latest version
# yum-config-manager --enable rhel-server-rhscl-7-rpms
# yum install -y rh-nginx18
rh-nginx18 gets installed
# cat /etc/yum.repos.d/redhat.repo | grep rhscl-7-rpms -A 10 | grep enabled
enabled = 1

Comment 2 Tom Deseyn 2017-08-08 14:09:24 UTC
I've also encountered this.

Invoking 'yum install' is disabling repos that were enabled using 'yum-config-manager'.

Comment 3 david.rogina 2017-08-08 16:47:02 UTC
We are noticing the same exact issue.

Comment 4 Petr Kubat 2017-08-09 04:55:10 UTC
One additional note: The issue is not present in the 7.3 version of the rhel7 image, so something in 7.4 must have introduced it.

Comment 5 Pavel Raiskup 2017-08-18 06:43:58 UTC
Ping, could this be prioritized please?  This means that we have to commit
an ugly hack to workaround this issue into *every single* docker image
git repository.

Comment 7 Jason Cohen 2018-08-06 15:15:54 UTC
Has this been resolved? I am unable to view the duplicate issue, as we are not a RH customer, but an internal RH team in Marketing Operations. 

We are cleaning up some tech debt and hoping to remove the ugly workaround in our images if possible.


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