Bug 1662788 - Manual enabling/disabling repository from redhat.repo file is not working
Summary: Manual enabling/disabling repository from redhat.repo file is not working
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: subscription-manager
Version: 8.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: 8.0
Assignee: candlepin-bugs
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-02 01:25 UTC by Suresh
Modified: 2020-01-02 07:23 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-03-29 15:56:50 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)

Description Suresh 2019-01-02 01:25:52 UTC
Description of problem:
Manual enabling/disabling repository from redhat.repo file is not working


Version-Release number of selected component (if applicable):
subscription-manager-1.23.8-1.el8.x86_64
yum-4.0.4-1.el8.noarch

How reproducible:


Steps to Reproduce:
1.register and subscribed the system to the customer portal

 #subscription-manager register --auto-attach

 # subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

System Purpose Status: invalid


2. Check default enabled repository 

]# yum repolist 
Updating Subscription Management repositories.
Updating Subscription Management repositories.
Last metadata expiration check: 0:04:28 ago on Tue 01 Jan 2019 08:13:12 PM EST.
repo id                                              repo name                                                                    status
rhel-8-for-x86_64-appstream-beta-rpms                Red Hat Enterprise Linux 8 for x86_64 - AppStream Beta (RPMs)                4,594
rhel-8-for-x86_64-baseos-beta-rpms                   Red Hat Enterprise Linux 8 for x86_64 - BaseOS Beta (RPMs)                   1,686


3. Disable repository e.g.rhel-8-for-x86_64-appstream-beta-rpms from /etc/yum.repos.d/redhat.repo file by setting "enabled=false"

#vi  /etc/yum.repos.d/redhat.repo

~~~~   snippet ~~~~~

[rhel-8-for-x86_64-appstream-beta-rpms]
name=Red Hat Enterprise Linux 8 for x86_64 - AppStream Beta (RPMs)
baseurl=https://cdn.redhat.com/content/beta/rhel8/8/x86_64/appstream/os
enabled=false                                             <<<--------<<<<
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
gpgcheck=true
metadata_expire=86400
sslclientcert=/etc/pki/entitlement/7142393845298546937.pem
sslclientkey=/etc/pki/entitlement/7142393845298546937-key.pem

~~~~   snippet ~~~~~
 4.Save file and quit

 :wq

5.Clear yum cache

 #yum clean all

6. Check enabled repositories

 # yum repolist
Updating Subscription Management repositories.
Updating Subscription Management repositories.
Red Hat Enterprise Linux 8 for x86_64 - AppStream Beta (RPMs)                                           1.2 MB/s | 6.7 MB     00:05    
Red Hat Enterprise Linux 8 for x86_64 - BaseOS Beta (RPMs)                                              671 kB/s | 2.7 MB     00:04    
Last metadata expiration check: 0:00:01 ago on Tue 01 Jan 2019 08:22:45 PM EST.
repo id                                              repo name                                                                    status
rhel-8-for-x86_64-appstream-beta-rpms                Red Hat Enterprise Linux 8 for x86_64 - AppStream Beta (RPMs)                4,594
rhel-8-for-x86_64-baseos-beta-rpms                   Red Hat Enterprise Linux 8 for x86_64 - BaseOS Beta (RPMs)                   1,686



Actual results:

It shows repository disabled from redhat.repo file i.e.rhel-8-for-x86_64-appstream-beta-rpms

 # yum repolist
Updating Subscription Management repositories.
Updating Subscription Management repositories.
Red Hat Enterprise Linux 8 for x86_64 - AppStream Beta (RPMs)                                           1.2 MB/s | 6.7 MB     00:05    
Red Hat Enterprise Linux 8 for x86_64 - BaseOS Beta (RPMs)                                              671 kB/s | 2.7 MB     00:04    
Last metadata expiration check: 0:00:01 ago on Tue 01 Jan 2019 08:22:45 PM EST.
repo id                                              repo name                                                                    status
rhel-8-for-x86_64-appstream-beta-rpms                Red Hat Enterprise Linux 8 for x86_64 - AppStream Beta (RPMs)                4,594
rhel-8-for-x86_64-baseos-beta-rpms                   Red Hat Enterprise Linux 8 for x86_64 - BaseOS Beta (RPMs)                   1,686


Expected results:

"rhel-8-for-x86_64-appstream-beta-rpms" repository should not be visible as same is disabled from redhat.repo file.

# yum repolist
Updating Subscription Management repositories.
Updating Subscription Management repositories.
Red Hat Enterprise Linux 8 for x86_64 - AppStream Beta (RPMs)                                           1.2 MB/s | 6.7 MB     00:05    
Red Hat Enterprise Linux 8 for x86_64 - BaseOS Beta (RPMs)                                              671 kB/s | 2.7 MB     00:04    
Last metadata expiration check: 0:00:01 ago on Tue 01 Jan 2019 08:22:45 PM EST.
repo id                                              repo name                                                                    status
rhel-8-for-x86_64-baseos-beta-rpms                   Red Hat Enterprise Linux 8 for x86_64 - BaseOS Beta (RPMs)                   1,686

Additional info:

Comment 1 Kevin Howell 2019-01-17 15:21:41 UTC
Does it work if you use enabled=0 instead?

Comment 3 Suresh 2019-01-17 19:27:05 UTC
It is not working  once file save with changes it gets reverted back to original state

Comment 7 Ishan Kulkarni 2019-01-24 04:36:47 UTC
Hi,

On one of my test server, I was able to edit and save the file. The packages are as follows :

#> rpm -qa | egrep "subscription-manager|yum|dnf|librhsm|PackageKit"
PackageKit-1.1.10-6.el8.x86_64
subscription-manager-1.23.8-1.el8.x86_64
librhsm-0.0.3-2.el8.x86_64
dnf-4.0.4-1.el8.noarch
yum-4.0.4-1.el8.noarch

#> egrep "enabled|disabled" /etc/yum.repos.d/redhat.repo | uniq -c
     27 enabled=true



But on the second test server, this failed :

# rpm -qa | egrep "subscription-manager|yum|dnf|librhsm|PackageKit"
PackageKit-1.1.10-5.el8.x86_64
subscription-manager-1.23.8-1.el8.x86_64
librhsm-0.0.3-1.el8.x86_64
dnf-4.0.4-1.el8.noarch
yum-4.0.4-1.el8.noarch


# egrep "enabled|disabled" /etc/yum.repos.d/redhat.repo | uniq -c
     27 enabled=false

Comment 14 Chris Snyder 2019-03-29 15:56:50 UTC
As it's been a few weeks and we have confirmation from at least one other party (James) that the issue appears fixed (and no attached customer cases), I'm closing this bug as worksforme.

If anyone should disagree with this evaluation or be able to reproduce this issue with the latest available version of subscription-manager, please feel free to reopen this bug with the relevant details.


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