Bug 1195501
| Summary: | The redhat.repo file should be refreshed after a successful repo-override removal | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | John Sefler <jsefler> |
| Component: | subscription-manager | Assignee: | Michael Stead <mstead> |
| Status: | CLOSED ERRATA | QA Contact: | John Sefler <jsefler> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.7 | CC: | alikins, dgoodwin, mstead, skallesh, wpoteat |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-07-22 06:52:59 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: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1125249 | ||
|
Description
John Sefler
2015-02-23 23:10:37 UTC
The standalone candlepin server I am testing against is version... subscription management server: 0.9.39-1 [root@jsefler-os-candlepin candlepin]# git show | head -1 commit fc95de167295f91a9559ff7f4ca7943c7d9e854e This was a little tricky to reproduce, but is a lot easier on a slower machine/VM. The reason the results vary is due to a race condition b/w a write to the override cache and when the repo file is updated (separate threads). If the cache write happened before the repo update, all is well. On slower systems, it seems that the write took longer than the repo update, causing the bug to surface. That being said, the 'real' issue was not with the treading. An area in the code was incorrectly assuming that [] was the same as None. The following pull request should address the issue and fix the bug. Awaiting Review: https://github.com/candlepin/subscription-manager/pull/1165 subscription-manager.git: cbbe1600b386ab287074e413daf903a1f7fc0170 Will appear in subscription-manager-1.14.4-1 Marking veified.
[root@dhcp35-135 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.9.47-1
subscription management rules: 5.14
subscription-manager: 1.14.5-1.el6
python-rhsm: 1.14.2-1.el6
[root@dhcp35-135 ~]# subscription-manager register --username=testuser1 --org=admin
Password:
The system has been registered with ID: 233b577b-b48b-437a-8199-c217b60f5871
[root@dhcp35-135 ~]# subscription-manager list --available --matches=awesomeos-x86_64
+-------------------------------------------+
Available Subscriptions
+-------------------------------------------+
Subscription Name: Awesome OS for x86_64
Provides: Awesome OS for x86_64 Bits
SKU: awesomeos-x86_64
Contract: 1
Pool ID: 8ac681e44c69cf7c014c69d0bfdd1649
Provides Management: No
Available: 10
Suggested: 10
Service Level:
Service Type:
Subscription Type: Stackable
Ends: 03/29/2016
System Type: Physical
Subscription Name: Awesome OS for x86_64
Provides: Awesome OS for x86_64 Bits
SKU: awesomeos-x86_64
Contract: 0
Pool ID: 8ac681e44c69cf7c014c69d0c18316cc
Provides Management: No
Available: 5
Suggested: 5
Service Level:
Service Type:
Subscription Type: Stackable
Ends: 03/29/2016
System Type: Physical
[root@dhcp35-135 ~]# subscription-manager attach --pool 8ac681e44c69cf7c014c69d0c18316cc
Successfully attached a subscription for: Awesome OS for x86_64
[root@dhcp35-135 ~]# grep "\[awesomeos-x86_64\]" -B1 -A11 /etc/yum.repos.d/redhat.repo
[awesomeos-x86_64]
metadata_expire = 3600
sslclientcert = /etc/pki/entitlement/7517741355599748370.pem
baseurl = https://cdn.stage.redhat.com/path/to/awesomeos/x86_64
sslverify = 1
name = awesomeos-x86_64
sslclientkey = /etc/pki/entitlement/7517741355599748370-key.pem
gpgkey = https://cdn.stage.redhat.com/path/to/awesomeos/gpg/
enabled = 0
sslcacert = /etc/rhsm/ca/redhat-uep.pem
gpgcheck = 1
[root@dhcp35-135 ~]# subscription-manager repo-override --repo=awesomeos-x86_64 --add=enabled:TrUe
[root@dhcp35-135 ~]# grep "\[awesomeos-x86_64\]" -B1 -A11 /etc/yum.repos.d/redhat.repo
[awesomeos-x86_64]
metadata_expire = 3600
sslclientcert = /etc/pki/entitlement/7517741355599748370.pem
baseurl = https://cdn.stage.redhat.com/path/to/awesomeos/x86_64
sslverify = 1
name = awesomeos-x86_64
sslclientkey = /etc/pki/entitlement/7517741355599748370-key.pem
gpgkey = https://cdn.stage.redhat.com/path/to/awesomeos/gpg/
enabled = TrUe
sslcacert = /etc/rhsm/ca/redhat-uep.pem
gpgcheck = 1
[root@dhcp35-135 ~]# subscription-manager repo-override --repo=awesomeos-x86_64 --remove=enabled
[root@dhcp35-135 ~]# subscription-manager repo-override --list
This system does not have any content overrides applied to it.
[root@dhcp35-135 ~]# grep "\[awesomeos-x86_64\]" -B1 -A11 /etc/yum.repos.d/redhat.repo
[awesomeos-x86_64]
metadata_expire = 3600
sslclientcert = /etc/pki/entitlement/7517741355599748370.pem
baseurl = https://cdn.stage.redhat.com/path/to/awesomeos/x86_64
sslverify = 1
name = awesomeos-x86_64
sslclientkey = /etc/pki/entitlement/7517741355599748370-key.pem
gpgkey = https://cdn.stage.redhat.com/path/to/awesomeos/gpg/
enabled = 0 -------------> override is removed a
sslcacert = /etc/rhsm/ca/redhat-uep.pem original value is
gpgcheck = 1 restored
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://rhn.redhat.com/errata/RHBA-2015-1345.html |