Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1195501 - The redhat.repo file should be refreshed after a successful repo-override removal
Summary: The redhat.repo file should be refreshed after a successful repo-override rem...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.7
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: Michael Stead
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel67
TreeView+ depends on / blocked
 
Reported: 2015-02-23 23:10 UTC by John Sefler
Modified: 2015-07-22 06:52 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-22 06:52:59 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1345 0 normal SHIPPED_LIVE subscription-manager and python-rhsm bug fix and enhancement update 2015-07-20 17:59:53 UTC

Description John Sefler 2015-02-23 23:10:37 UTC
Description of problem:
Similar to bug 1008016 and bug 1090206, upon removal of a repo-override, the removal should be reflected in /etc/yum.repos.d/redhat.repo.  Unfortunately this does not always appear right away.  There seems to be an unpredictable delay.


Version-Release number of selected component (if applicable):
[root@jsefler-os6 ~]# rpm -q subscription-manager
subscription-manager-1.14.1-1.git.16.8bd8008.el6.x86_64


How reproducible:
THIS IS THE STRANGE PART... The results shown below are not repeatable.  They appear to fail most frequently when testing against a standalone candlepin with TESTDATA deployed.


Steps to Reproduce:
[root@jsefler-os6 ~]# subscription-manager register --username=testuser1 --org=admin
Password: 
The system has been registered with ID: e5d6c4b1-6f58-42a3-8e81-6cf23d97398c 
[root@jsefler-os6 ~]# 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:             2c90af8b4b135280014b13558a211261
Provides Management: No
Available:           10
Suggested:           1
Service Level:       
Service Type:        
Subscription Type:   Stackable
Ends:                01/21/2016
System Type:         Physical

[root@jsefler-os6 ~]# subscription-manager attach --pool 2c90af8b4b135280014b13558a211261
Successfully attached a subscription for: Awesome OS for x86_64
[root@jsefler-os6 ~]# grep "\[awesomeos-x86_64\]" -B1 -A11 /etc/yum.repos.d/redhat.repo 

[awesomeos-x86_64]
metadata_expire = 3600
sslclientcert = /etc/pki/entitlement/4284317455352553105.pem
baseurl = https://cdn.redhat.com/path/to/awesomeos/x86_64
sslverify = 1
name = awesomeos-x86_64
sslclientkey = /etc/pki/entitlement/4284317455352553105-key.pem
gpgkey = https://cdn.redhat.com/path/to/awesomeos/gpg/
enabled = 0          <============== EXPECTED ORIGINAL NON-OVERRIDE VALUE
sslcacert = /etc/rhsm/ca/redhat-uep.pem
gpgcheck = 1

[root@jsefler-os6 ~]# subscription-manager repo-override --repo=awesomeos-x86_64 --add=enabled:TrUe
[root@jsefler-os6 ~]# subscription-manager repo-override --list
Repository: awesomeos-x86_64
  enabled: TrUe

[root@jsefler-os6 ~]# grep "\[awesomeos-x86_64\]" -B1 -A11 /etc/yum.repos.d/redhat.repo 

[awesomeos-x86_64]
metadata_expire = 3600
sslclientcert = /etc/pki/entitlement/4284317455352553105.pem
baseurl = https://cdn.redhat.com/path/to/awesomeos/x86_64
sslverify = 1
name = awesomeos-x86_64
sslclientkey = /etc/pki/entitlement/4284317455352553105-key.pem
gpgkey = https://cdn.redhat.com/path/to/awesomeos/gpg/
enabled = TrUe         <============== EXPECTED OVERRIDE
sslcacert = /etc/rhsm/ca/redhat-uep.pem
gpgcheck = 1

[root@jsefler-os6 ~]# subscription-manager repo-override --repo=awesomeos-x86_64 --remove=enabled
[root@jsefler-os6 ~]# subscription-manager repo-override --list
This system does not have any content overrides applied to it.
[root@jsefler-os6 ~]# grep "\[awesomeos-x86_64\]" -B1 -A11 /etc/yum.repos.d/redhat.repo 

[awesomeos-x86_64]
metadata_expire = 3600
sslclientcert = /etc/pki/entitlement/4284317455352553105.pem
baseurl = https://cdn.redhat.com/path/to/awesomeos/x86_64
sslverify = 1
name = awesomeos-x86_64
sslclientkey = /etc/pki/entitlement/4284317455352553105-key.pem
gpgkey = https://cdn.redhat.com/path/to/awesomeos/gpg/
enabled = TrUe         <============== FAILED TO REMOVE OVERRIDE
sslcacert = /etc/rhsm/ca/redhat-uep.pem
gpgcheck = 1

[root@jsefler-os6 ~]# subscription-manager repo-override --repo=awesomeos-x86_64 --remove=enabled
[root@jsefler-os6 ~]# grep "\[awesomeos-x86_64\]" -B1 -A11 /etc/yum.repos.d/redhat.repo 

[awesomeos-x86_64]
metadata_expire = 3600
sslclientcert = /etc/pki/entitlement/4284317455352553105.pem
baseurl = https://cdn.redhat.com/path/to/awesomeos/x86_64
sslverify = 1
name = awesomeos-x86_64
sslclientkey = /etc/pki/entitlement/4284317455352553105-key.pem
gpgkey = https://cdn.redhat.com/path/to/awesomeos/gpg/
enabled = TrUe         <============== FAILED TO REMOVE OVERRIDE AGAIN
sslcacert = /etc/rhsm/ca/redhat-uep.pem
gpgcheck = 1

[root@jsefler-os6 ~]# subscription-manager repo-override --remove-all 
[root@jsefler-os6 ~]# grep "\[awesomeos-x86_64\]" -B1 -A11 /etc/yum.repos.d/redhat.repo 

[awesomeos-x86_64]
metadata_expire = 3600
sslclientcert = /etc/pki/entitlement/4284317455352553105.pem
baseurl = https://cdn.redhat.com/path/to/awesomeos/x86_64
sslverify = 1
name = awesomeos-x86_64
sslclientkey = /etc/pki/entitlement/4284317455352553105-key.pem
gpgkey = https://cdn.redhat.com/path/to/awesomeos/gpg/
enabled = TrUe         <============== FAILED TO REMOVE OVERRIDE USING REMOVE-ALL
sslcacert = /etc/rhsm/ca/redhat-uep.pem
gpgcheck = 1

[root@jsefler-os6 ~]# subscription-manager repo-override --list
This system does not have any content overrides applied to it.
[root@jsefler-os6 ~]# grep "\[awesomeos-x86_64\]" -B1 -A11 /etc/yum.repos.d/redhat.repo 

[awesomeos-x86_64]
metadata_expire = 3600
sslclientcert = /etc/pki/entitlement/4284317455352553105.pem
baseurl = https://cdn.redhat.com/path/to/awesomeos/x86_64
sslverify = 1
name = awesomeos-x86_64
sslclientkey = /etc/pki/entitlement/4284317455352553105-key.pem
gpgkey = https://cdn.redhat.com/path/to/awesomeos/gpg/
enabled = TrUe         <============== STILL NOT REMOVED
sslcacert = /etc/rhsm/ca/redhat-uep.pem
gpgcheck = 1

[root@jsefler-os6 ~]# yum clean all
Loaded plugins: product-id, security, subscription-manager
Cleaning repos: awesomeos-x86_64
Cleaning up Everything
[root@jsefler-os6 ~]# grep "\[awesomeos-x86_64\]" -B1 -A11 /etc/yum.repos.d/redhat.repo 

[awesomeos-x86_64]
metadata_expire = 3600
sslclientcert = /etc/pki/entitlement/4284317455352553105.pem
baseurl = https://cdn.redhat.com/path/to/awesomeos/x86_64
sslverify = 1
name = awesomeos-x86_64
sslclientkey = /etc/pki/entitlement/4284317455352553105-key.pem
gpgkey = https://cdn.redhat.com/path/to/awesomeos/gpg/
enabled = TrUe         <============== STILL NOT REMOVED
sslcacert = /etc/rhsm/ca/redhat-uep.pem
gpgcheck = 1

[root@jsefler-os6 ~]# yum clean all --enablerepo=*
Loaded plugins: product-id, security, subscription-manager
Cleaning repos: awesomeos awesomeos-x86_64 beta-RHEL66 latest-RHEL6 latest-RHEL6-optional never-enabled-content
              : released-RHEL64 released-RHEL65 released-RHEL66 released-RHEL66-optional rhel-source
              : rhel-source-beta
Cleaning up Everything
[root@jsefler-os6 ~]# grep "\[awesomeos-x86_64\]" -B1 -A11 /etc/yum.repos.d/redhat.repo 

[awesomeos-x86_64]
metadata_expire = 3600
sslclientcert = /etc/pki/entitlement/4284317455352553105.pem
baseurl = https://cdn.redhat.com/path/to/awesomeos/x86_64
sslverify = 1
name = awesomeos-x86_64
sslclientkey = /etc/pki/entitlement/4284317455352553105-key.pem
gpgkey = https://cdn.redhat.com/path/to/awesomeos/gpg/
enabled = TrUe         <============== STILL NOT REMOVED
sslcacert = /etc/rhsm/ca/redhat-uep.pem
gpgcheck = 1

[root@jsefler-os6 ~]# subscription-manager repo-override --remove-all 
[root@jsefler-os6 ~]# grep "\[awesomeos-x86_64\]" -B1 -A11 /etc/yum.repos.d/redhat.repo 

[awesomeos-x86_64]
metadata_expire = 3600
sslclientcert = /etc/pki/entitlement/4284317455352553105.pem
baseurl = https://cdn.redhat.com/path/to/awesomeos/x86_64
sslverify = 1
name = awesomeos-x86_64
sslclientkey = /etc/pki/entitlement/4284317455352553105-key.pem
gpgkey = https://cdn.redhat.com/path/to/awesomeos/gpg/
enabled = TrUe         <============== STILL NOT REMOVED
sslcacert = /etc/rhsm/ca/redhat-uep.pem
gpgcheck = 1

[root@jsefler-os6 ~]# subscription-manager repo-override --remove-all 
[root@jsefler-os6 ~]# grep "\[awesomeos-x86_64\]" -B1 -A11 /etc/yum.repos.d/redhat.repo 

[awesomeos-x86_64]
metadata_expire = 3600
sslclientcert = /etc/pki/entitlement/4284317455352553105.pem
baseurl = https://cdn.redhat.com/path/to/awesomeos/x86_64
sslverify = 1
name = awesomeos-x86_64
sslclientkey = /etc/pki/entitlement/4284317455352553105-key.pem
gpgkey = https://cdn.redhat.com/path/to/awesomeos/gpg/
enabled = 0        <============== FINALLY REMOVED; THE ORIGINAL VALUE IS RESTORED
sslcacert = /etc/rhsm/ca/redhat-uep.pem
gpgcheck = 1





Actual results:
above

Expected results:
The repo-override removal should be reflected in the redhat.repo after the first removal.



Additional info:
[root@jsefler-os6 ~]# tail -f /var/log/rhsm/rhsm.log
2015-02-23 17:42:42,377 [DEBUG] subscription-manager:30148 @plugins.py:569 - loaded plugin modules: []
2015-02-23 17:42:42,378 [DEBUG] subscription-manager:30148 @plugins.py:570 - loaded plugins: {}
2015-02-23 17:42:42,378 [DEBUG] subscription-manager:30148 @identity.py:131 - Loading consumer info from identity certificates.
2015-02-23 17:42:42,418 [INFO] subscription-manager:30148 @managercli.py:348 - Client Versions: {'python-rhsm': '1.14.1-1.git.4.4ad20dd.el6', 'subscription-manager': '1.14.1-1.git.16.8bd8008.el6'}
2015-02-23 17:42:42,419 [INFO] subscription-manager:30148 @connection.py:699 - Connection built: host=jsefler-os-candlepin.usersys.redhat.com port=8443 handler=/candlepin auth=identity_cert ca_dir=/etc/rhsm/ca/ verify=False
2015-02-23 17:42:42,419 [INFO] subscription-manager:30148 @connection.py:699 - Connection built: host=jsefler-os-candlepin.usersys.redhat.com port=8443 handler=/candlepin auth=none
2015-02-23 17:42:42,437 [DEBUG] subscription-manager:30148 @connection.py:422 - Loaded CA certificates from /etc/rhsm/ca/: candlepin-stage.pem, jsefler-os-candlepin.pem, redhat-uep.pem
2015-02-23 17:42:42,437 [DEBUG] subscription-manager:30148 @connection.py:470 - Making request: GET /candlepin/
2015-02-23 17:42:42,447 [DEBUG] subscription-manager:30148 @connection.py:493 - Response: status=200, requestUuid=a4a62bd6-4829-4b2f-bf81-79dae66472cb
2015-02-23 17:42:42,450 [DEBUG] subscription-manager:30148 @connection.py:716 - Server supports the following resources: {'': '/', 'guestids': '/consumers/{consumer_uuid}/guestids', 'cdn': '/cdn', 'content_overrides': '/consumers/{consumer_uuid}/content_overrides', 'hypervisors': '/hypervisors', 'serials': '/serials', 'deleted_consumers': '/deleted_consumers', 'consumers': '/consumers', 'migrations': '/migrations', 'content': '/content', 'entitlements': '/entitlements', 'events': '/events', 'status': '/status', 'jobs': '/jobs', 'users': '/users', 'subscriptions': '/subscriptions', 'rules': '/rules', 'distributor_versions': '/distributor_versions', 'consumertypes': '/consumertypes', 'statistics/generate': '/statistics/generate', 'pools': '/pools', 'atom': '/atom', 'owners': '/owners', 'roles': '/roles', 'admin': '/admin', 'products': '/products', 'activation_keys': '/activation_keys', 'crl': '/crl'}
2015-02-23 17:42:42,451 [DEBUG] subscription-manager:30148 @connection.py:422 - Loaded CA certificates from /etc/rhsm/ca/: candlepin-stage.pem, jsefler-os-candlepin.pem, redhat-uep.pem
2015-02-23 17:42:42,451 [DEBUG] subscription-manager:30148 @connection.py:470 - Making request: GET /candlepin/status
2015-02-23 17:42:42,462 [DEBUG] subscription-manager:30148 @connection.py:493 - Response: status=200, requestUuid=b903a026-30ae-4f33-92da-9fe6ab85f6ab
2015-02-23 17:42:42,464 [INFO] subscription-manager:30148 @managercli.py:359 - Server Versions: {'rules-version': '5.13', 'candlepin': '0.9.39-1', 'server-type': 'Red Hat Subscription Management'}
2015-02-23 17:42:42,464 [INFO] subscription-manager:30148 @managercli.py:324 - self.identity: <Identity, name=jsefler-os6, uuid=e5d6c4b1-6f58-42a3-8e81-6cf23d97398c, consumer=consumer: name="jsefler-os6", uuid=e5d6c4b1-6f58-42a3-8e81-6cf23d97398c>
2015-02-23 17:42:42,465 [DEBUG] subscription-manager:30148 @connection.py:422 - Loaded CA certificates from /etc/rhsm/ca/: candlepin-stage.pem, jsefler-os-candlepin.pem, redhat-uep.pem
2015-02-23 17:42:42,465 [DEBUG] subscription-manager:30148 @connection.py:470 - Making request: GET /candlepin/
2015-02-23 17:42:42,475 [DEBUG] subscription-manager:30148 @connection.py:493 - Response: status=200, requestUuid=2549bea6-b9fe-485d-a8bc-046c9ef87506
2015-02-23 17:42:42,478 [DEBUG] subscription-manager:30148 @connection.py:716 - Server supports the following resources: {'': '/', 'guestids': '/consumers/{consumer_uuid}/guestids', 'cdn': '/cdn', 'content_overrides': '/consumers/{consumer_uuid}/content_overrides', 'hypervisors': '/hypervisors', 'serials': '/serials', 'deleted_consumers': '/deleted_consumers', 'consumers': '/consumers', 'migrations': '/migrations', 'content': '/content', 'entitlements': '/entitlements', 'events': '/events', 'status': '/status', 'jobs': '/jobs', 'users': '/users', 'subscriptions': '/subscriptions', 'rules': '/rules', 'distributor_versions': '/distributor_versions', 'consumertypes': '/consumertypes', 'statistics/generate': '/statistics/generate', 'pools': '/pools', 'atom': '/atom', 'owners': '/owners', 'roles': '/roles', 'admin': '/admin', 'products': '/products', 'activation_keys': '/activation_keys', 'crl': '/crl'}
2015-02-23 17:42:42,482 [DEBUG] subscription-manager:30148 @connection.py:422 - Loaded CA certificates from /etc/rhsm/ca/: candlepin-stage.pem, jsefler-os-candlepin.pem, redhat-uep.pem
2015-02-23 17:42:42,482 [DEBUG] subscription-manager:30148 @connection.py:470 - Making request: GET /candlepin/consumers/e5d6c4b1-6f58-42a3-8e81-6cf23d97398c/certificates/serials
2015-02-23 17:42:42,551 [DEBUG] subscription-manager:30148 @connection.py:493 - Response: status=200, requestUuid=b4394325-8cf5-4f1b-ae75-58d21dec9524
2015-02-23 17:42:42,552 [INFO] subscription-manager:30148 @entcertlib.py:131 - certs updated:
Total updates: 0
Found (local) serial# [4284317455352553105L]
Expected (UEP) serial# [4284317455352553105]
Added (new)
  <NONE>
Deleted (rogue):
  <NONE>
2015-02-23 17:42:42,554 [INFO] subscription-manager:30148 @cache.py:138 - Checking current system info against cache: /var/lib/rhsm/cache/installed_products.json
2015-02-23 17:42:42,555 [INFO] subscription-manager:30148 @cache.py:155 - No changes.
2015-02-23 17:42:42,555 [DEBUG] subscription-manager:30148 @certdirectory.py:216 - Installed product IDs: ['69']
2015-02-23 17:42:42,556 [DEBUG] subscription-manager:30148 @connection.py:422 - Loaded CA certificates from /etc/rhsm/ca/: candlepin-stage.pem, jsefler-os-candlepin.pem, redhat-uep.pem
2015-02-23 17:42:42,556 [DEBUG] subscription-manager:30148 @connection.py:470 - Making request: GET /candlepin/consumers/e5d6c4b1-6f58-42a3-8e81-6cf23d97398c/compliance
2015-02-23 17:42:42,608 [DEBUG] subscription-manager:30148 @connection.py:493 - Response: status=200, requestUuid=f87b00a2-b3ee-4c8e-94ea-c0d5922c7ca0
2015-02-23 17:42:42,610 [DEBUG] subscription-manager:30148 @cache.py:272 - Started thread to write cache: /var/lib/rhsm/cache/entitlement_status.json
2015-02-23 17:42:42,611 [DEBUG] subscription-manager:30148 @cert_sorter.py:193 - valid entitled products: []
2015-02-23 17:42:42,611 [DEBUG] subscription-manager:30148 @cert_sorter.py:194 - expired entitled products: []
2015-02-23 17:42:42,612 [DEBUG] subscription-manager:30148 @cert_sorter.py:195 - partially entitled products: []
2015-02-23 17:42:42,612 [DEBUG] subscription-manager:30148 @cert_sorter.py:196 - unentitled products: ['69']
2015-02-23 17:42:42,612 [DEBUG] subscription-manager:30148 @cert_sorter.py:197 - future products: []
2015-02-23 17:42:42,612 [DEBUG] subscription-manager:30148 @cert_sorter.py:198 - partial stacks: []
2015-02-23 17:42:42,612 [DEBUG] subscription-manager:30148 @cert_sorter.py:199 - entitlements valid until: None
2015-02-23 17:42:42,615 [DEBUG] subscription-manager:30148 @connection.py:422 - Loaded CA certificates from /etc/rhsm/ca/: candlepin-stage.pem, jsefler-os-candlepin.pem, redhat-uep.pem
2015-02-23 17:42:42,616 [DEBUG] subscription-manager:30148 @connection.py:470 - Making request: DELETE /candlepin/consumers/e5d6c4b1-6f58-42a3-8e81-6cf23d97398c/content_overrides
2015-02-23 17:42:42,687 [DEBUG] subscription-manager:30148 @connection.py:493 - Response: status=200, requestUuid=df10062a-c6d2-40aa-af27-c1546036986d
2015-02-23 17:42:42,689 [DEBUG] subscription-manager:30148 @cache.py:272 - Started thread to write cache: /var/lib/rhsm/cache/content_overrides.json
2015-02-23 17:42:42,691 [DEBUG] subscription-manager:30148 @__init__.py:85 - Searching for content of type: yum
2015-02-23 17:42:42,693 [DEBUG] subscription-manager:30148 @connection.py:422 - Loaded CA certificates from /etc/rhsm/ca/: candlepin-stage.pem, jsefler-os-candlepin.pem, redhat-uep.pem
2015-02-23 17:42:42,693 [DEBUG] subscription-manager:30148 @connection.py:470 - Making request: GET /candlepin/consumers/e5d6c4b1-6f58-42a3-8e81-6cf23d97398c/release
2015-02-23 17:42:42,735 [DEBUG] subscription-manager:30148 @connection.py:493 - Response: status=200, requestUuid=92e0a7ba-ce13-4099-9bc9-ef0d8f4db9a8
2015-02-23 17:42:42,736 [DEBUG] subscription-manager:30148 @cache.py:272 - Started thread to write cache: /var/lib/rhsm/cache/releasever.json
2015-02-23 17:42:42,743 [DEBUG] subscription-manager:30148 @cache.py:110 - Wrote cache: /var/lib/rhsm/cache/written_overrides.json
2015-02-23 17:42:42,744 [INFO] subscription-manager:30148 @repolib.py:270 - repos updated: Repo updates

Total repo updates: 3
Updated
    [id:awesomeos awesomeos]
    [id:awesomeos-x86_64 awesomeos-x86_64]
    [id:never-enabled-content never-enabled-content]
Added (new)
    <NONE>
Deleted
    <NONE>
2015-02-23 17:42:42,758 [INFO] rhsmd:30151 @rhsmd:276 - rhsmd started
2015-02-23 17:42:42,761 [INFO] rhsmd:30151 @rhsmd:186 - D-Bus interface com.redhat.SubscriptionManager.EntitlementStatus.update_status called with status = 1
2015-02-23 17:42:42,800 [DEBUG] rhsmd:30151 @identity.py:131 - Loading consumer info from identity certificates.
2015-02-23 17:42:42,806 [INFO] rhsmd:30151 @rhsmd:154 - D-Bus signal com.redhat.SubscriptionManager.EntitlementStatus.entitlement_status_changed emitted
2015-02-23 17:42:42,806 [INFO] rhsmd:30151 @rhsmd:201 - D-Bus interface com.redhat.SubscriptionManager.EntitlementStatus.emit_status called 
2015-02-23 17:42:42,808 [INFO] rhsmd:30151 @connection.py:699 - Connection built: host=jsefler-os-candlepin.usersys.redhat.com port=8443 handler=/candlepin auth=identity_cert ca_dir=/etc/rhsm/ca/ verify=False
2015-02-23 17:42:42,808 [INFO] rhsmd:30151 @cache.py:138 - Checking current system info against cache: /var/lib/rhsm/cache/installed_products.json
2015-02-23 17:42:42,809 [INFO] rhsmd:30151 @cache.py:155 - No changes.
2015-02-23 17:42:42,809 [DEBUG] rhsmd:30151 @certdirectory.py:216 - Installed product IDs: ['69']
2015-02-23 17:42:42,810 [DEBUG] rhsmd:30151 @connection.py:422 - Loaded CA certificates from /etc/rhsm/ca/: candlepin-stage.pem, jsefler-os-candlepin.pem, redhat-uep.pem
2015-02-23 17:42:42,811 [DEBUG] rhsmd:30151 @connection.py:470 - Making request: GET /candlepin/consumers/e5d6c4b1-6f58-42a3-8e81-6cf23d97398c/compliance
2015-02-23 17:42:42,864 [DEBUG] rhsmd:30151 @connection.py:493 - Response: status=200, requestUuid=ae69b8b0-1cfa-4509-b991-d78f2e1d5524
2015-02-23 17:42:42,866 [DEBUG] rhsmd:30151 @cache.py:272 - Started thread to write cache: /var/lib/rhsm/cache/entitlement_status.json
2015-02-23 17:42:42,869 [DEBUG] rhsmd:30151 @cert_sorter.py:193 - valid entitled products: []
2015-02-23 17:42:42,869 [DEBUG] rhsmd:30151 @cert_sorter.py:194 - expired entitled products: []
2015-02-23 17:42:42,869 [DEBUG] rhsmd:30151 @cert_sorter.py:195 - partially entitled products: []
2015-02-23 17:42:42,870 [DEBUG] rhsmd:30151 @cert_sorter.py:196 - unentitled products: ['69']
2015-02-23 17:42:42,870 [DEBUG] rhsmd:30151 @cert_sorter.py:197 - future products: []
2015-02-23 17:42:42,870 [DEBUG] rhsmd:30151 @cert_sorter.py:198 - partial stacks: []
2015-02-23 17:42:42,870 [DEBUG] rhsmd:30151 @cert_sorter.py:199 - entitlements valid until: None
2015-02-23 17:42:42,871 [DEBUG] rhsmd:30151 @connection.py:422 - Loaded CA certificates from /etc/rhsm/ca/: candlepin-stage.pem, jsefler-os-candlepin.pem, redhat-uep.pem
2015-02-23 17:42:42,872 [DEBUG] rhsmd:30151 @connection.py:470 - Making request: GET /candlepin/consumers/e5d6c4b1-6f58-42a3-8e81-6cf23d97398c/compliance
2015-02-23 17:42:42,923 [DEBUG] rhsmd:30151 @connection.py:493 - Response: status=200, requestUuid=93ef9651-be5b-46db-857e-2fe9f65c5c0d
2015-02-23 17:42:42,925 [DEBUG] rhsmd:30151 @cache.py:272 - Started thread to write cache: /var/lib/rhsm/cache/entitlement_status.json

Comment 1 John Sefler 2015-02-24 13:58:10 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

Comment 2 Michael Stead 2015-04-09 16:54:03 UTC
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

Comment 3 Michael Stead 2015-04-10 10:10:37 UTC
subscription-manager.git: cbbe1600b386ab287074e413daf903a1f7fc0170
Will appear in subscription-manager-1.14.4-1

Comment 5 Shwetha Kallesh 2015-04-15 06:52:24 UTC
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

Comment 6 errata-xmlrpc 2015-07-22 06:52:59 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://rhn.redhat.com/errata/RHBA-2015-1345.html


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