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 1034429 - 'NoneType' object has no attribute 'supports_resource'
Summary: 'NoneType' object has no attribute 'supports_resource'
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Devan Goodwin
QA Contact: John Sefler
URL:
Whiteboard:
: 1037712 1039749 (view as bug list)
Depends On:
Blocks: rhsm-rhel70
TreeView+ depends on / blocked
 
Reported: 2013-11-25 20:07 UTC by John Sefler
Modified: 2014-06-18 00:29 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 09:20:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description John Sefler 2013-11-25 20:07:39 UTC
Description of problem:
subscription-manager is throwing this exception in the rhsm.log during an unregister after auto-subscribing using the TESTDATA candlepin environment.  As a result, the  /etc/yum.repos.d/redhat.repo remains populated.


Version-Release number of selected component (if applicable):
[root@jsefler-7 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 0.8.33-1
subscription-manager: 1.10.7-1.git.4.f784e47.el7
python-rhsm: 1.10.7-1.git.2.916640d.el7
[root@jsefler-f14-candlepin candlepin]# git show-ref | grep master
1b3a30efd4dde991b4044ee545882942534489ea refs/heads/master


How reproducible:


Steps to Reproduce:
[root@jsefler-7 ~]# subscription-manager register --autosubscribe --username=testuser1 --org=admin --serverurl=jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin
Password: 
The system has been registered with ID: 7025b78b-afb4-4db8-aa6f-e6e8aeb4673e 
Installed Product Current Status:
Product Name: Awesome OS for S390 Bits
Status:       Not Subscribed

Product Name: Stackable with Awesome OS for x86_64 Bits
Status:       Subscribed

Product Name: Awesome OS Developer Basic
Status:       Not Subscribed

Product Name: Awesome OS for x86_64/i686/ia64/ppc/ppc64/s390x/s390 Bits
Status:       Subscribed

Product Name: Awesome OS Workstation Bits
Status:       Subscribed

Product Name: Red Hat Enterprise Linux 7 Server High Touch Beta
Status:       Not Subscribed

Product Name: Awesome OS Developer Bits
Status:       Not Subscribed

Product Name: Management Bits
Status:       Subscribed

Product Name: Large File Support Bits
Status:       Subscribed

Product Name: Awesome OS for All Arch (x86 content) Bits
Status:       Subscribed

Product Name: Clustering Bits
Status:       Subscribed

Product Name: Shared Storage Bits
Status:       Subscribed

Product Name: Awesome OS Server Bits
Status:       Subscribed

Product Name: Awesome OS Premium Architecture Bits
Status:       Not Subscribed

Product Name: Awesome OS for ia64 Bits
Status:       Not Subscribed

Product Name: Awesome OS for i686 Bits
Status:       Not Subscribed

Product Name: Awesome OS for x86_64 Bits
Status:       Subscribed

Product Name: Awesome OS for ppc64 Bits
Status:       Not Subscribed

Product Name: Awesome OS for S390X Bits
Status:       Not Subscribed

Product Name: Awesome OS for i386 Bits
Status:       Not Subscribed

Product Name: Awesome OS for All Arch (all per arch content) Bits
Status:       Subscribed

Product Name: Virt Only Awesome OS for i386 Bits
Status:       Not Subscribed

Product Name: Awesome OS for All Arch (excpt for x86_64 content) Bits
Status:       Subscribed

Product Name: Awesome OS for All Arch (just x86_64 content) Bits
Status:       Subscribed

Product Name: Awesome OS for x86 Bits
Status:       Not Subscribed

Product Name: Awesome OS Instance Server Bits
Status:       Subscribed

Product Name: Shared File System Bits
Status:       Subscribed

Product Name: Multi-Attribute Limited Product
Status:       Subscribed

Product Name: Multiplier Product Bits
Status:       Not Subscribed

Product Name: Awesome OS Modifier Bits
Status:       Subscribed

Product Name: RAM Limiting Product
Status:       Subscribed

Product Name: Core Limiting Product
Status:       Subscribed

Product Name: Load Balancing Bits
Status:       Subscribed

[root@jsefler-7 ~]# subscription-manager unregister
System has been unregistered.
[root@jsefler-7 ~]# 


Actual results:
[root@jsefler-7 ~]# tail -f /var/log/rhsm/rhsm.log
2013-11-25 15:00:13,407 [DEBUG] subscription-manager @plugins.py:519 - loaded plugin modules: []
2013-11-25 15:00:13,408 [DEBUG] subscription-manager @plugins.py:520 - loaded plugins: {}
2013-11-25 15:00:13,454 [DEBUG] subscription-manager @identity.py:130 - Loading consumer info from identity certificates.
2013-11-25 15:00:13,467 [DEBUG] subscription-manager @profile.py:97 - Loading current RPM profile.
2013-11-25 15:00:13,781 [INFO] subscription-manager @managercli.py:306 - Client Versions: {'python-rhsm': '1.10.7-1.git.2.916640d.el7', 'subscription-manager': '1.10.7-1.git.4.f784e47.el7'}
2013-11-25 15:00:13,782 [INFO] subscription-manager @connection.py:653 - Using certificate authentication: key = /etc/pki/consumer/key.pem, cert = /etc/pki/consumer/cert.pem, ca = /etc/rhsm/ca/, insecure = False
2013-11-25 15:00:13,782 [INFO] subscription-manager @connection.py:664 - Connection Built: host: jsefler-f14-candlepin.usersys.redhat.com, port: 8443, handler: /candlepin
2013-11-25 15:00:13,783 [INFO] subscription-manager @connection.py:660 - Using no auth
2013-11-25 15:00:13,783 [INFO] subscription-manager @connection.py:664 - Connection Built: host: jsefler-f14-candlepin.usersys.redhat.com, port: 8443, handler: /candlepin
2013-11-25 15:00:13,806 [DEBUG] subscription-manager @connection.py:412 - Loaded CA certificates from /etc/rhsm/ca/: jsefler-f14-candlepin.pem, candlepin-stage.pem, redhat-uep.pem
2013-11-25 15:00:13,806 [DEBUG] subscription-manager @connection.py:444 - Making request: GET /candlepin/
2013-11-25 15:00:13,877 [DEBUG] subscription-manager @connection.py:467 - Response: status=200, requestUuid=1730ad8f-603a-4a64-8b8a-befd599b5aa0
2013-11-25 15:00:13,882 [DEBUG] subscription-manager @connection.py:680 - Server supports the following resources:
2013-11-25 15:00:13,882 [DEBUG] subscription-manager @connection.py:681 - {'': '/', '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', 'statistics/generate': '/statistics/generate', 'activation_keys': '/activation_keys', 'atom': '/atom', 'owners': '/owners', 'roles': '/roles', 'admin': '/admin', 'products': '/products', 'pools': '/pools', 'consumertypes': '/consumertypes', 'crl': '/crl'}
2013-11-25 15:00:13,886 [DEBUG] subscription-manager @connection.py:412 - Loaded CA certificates from /etc/rhsm/ca/: jsefler-f14-candlepin.pem, candlepin-stage.pem, redhat-uep.pem
2013-11-25 15:00:13,887 [DEBUG] subscription-manager @connection.py:444 - Making request: GET /candlepin/status
2013-11-25 15:00:13,985 [DEBUG] subscription-manager @connection.py:467 - Response: status=200, requestUuid=0681d086-5b42-4156-8bb0-f1a92867d134
2013-11-25 15:00:13,988 [INFO] subscription-manager @managercli.py:317 - Server Versions: {'candlepin': '0.8.33-1', 'server-type': 'Red Hat Subscription Management'}
2013-11-25 15:00:13,992 [DEBUG] subscription-manager @connection.py:412 - Loaded CA certificates from /etc/rhsm/ca/: jsefler-f14-candlepin.pem, candlepin-stage.pem, redhat-uep.pem
2013-11-25 15:00:13,993 [DEBUG] subscription-manager @connection.py:444 - Making request: DELETE /candlepin/consumers/7025b78b-afb4-4db8-aa6f-e6e8aeb4673e
2013-11-25 15:00:15,618 [DEBUG] subscription-manager @connection.py:467 - Response: status=204, requestUuid=bb82382e-1f6a-45e4-94b4-c1356a077b8a
2013-11-25 15:00:15,622 [INFO] subscription-manager @managerlib.py:808 - Successfully un-registered.
2013-11-25 15:00:15,629 [DEBUG] subscription-manager @identity.py:130 - Loading consumer info from identity certificates.
2013-11-25 15:00:15,635 [INFO] subscription-manager @cache.py:116 - Deleting cache: /var/lib/rhsm/facts/facts.json
2013-11-25 15:00:15,636 [INFO] subscription-manager @cache.py:116 - Deleting cache: /var/lib/rhsm/cache/installed_products.json
2013-11-25 15:00:15,637 [INFO] subscription-manager @cache.py:116 - Deleting cache: /var/lib/rhsm/cache/entitlement_status.json
2013-11-25 15:00:15,638 [INFO] subscription-manager @cache.py:116 - Deleting cache: /var/lib/rhsm/cache/product_status.json
2013-11-25 15:00:15,639 [INFO] subscription-manager @certlib.py:245 - certs updated:
Total updates: 0
Found (local) serial# []
Expected (UEP) serial# []
Added (new)
  <NONE>
Deleted (rogue):
  <NONE>
2013-11-25 15:00:15,642 [WARNING] subscription-manager @certmgr.py:107 - Exception caught while running <subscription_manager.repolib.RepoLib object at 0x1578c50> update
2013-11-25 15:00:15,642 [ERROR] subscription-manager @certmgr.py:108 - 'NoneType' object has no attribute 'supports_resource'
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/certmgr.py", line 100, in update
    updates += lib.update()
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 69, in update
    return self._do_update()
  File "/usr/share/rhsm/subscription_manager/repolib.py", line 47, in _do_update
    action = UpdateAction(self.uep, cache_only=self.cache_only)
  File "/usr/share/rhsm/subscription_manager/repolib.py", line 112, in __init__
    self.override_supported = self.uep.supports_resource('content_overrides')
AttributeError: 'NoneType' object has no attribute 'supports_resource'
2013-11-25 15:00:15,645 [INFO] subscription-manager @facts.py:73 - Cache /var/lib/rhsm/facts/facts.json does not exit
2013-11-25 15:00:15,692 [DEBUG] subscription-manager @hwprobe.py:531 - cpu info: {'cpu.cpu(s)': 2, 'cpu.core(s)_per_socket': 1, 'cpu.thread(s)_per_core': 1, 'cpu.topology_source': 'kernel /sys cpu sibling lists', 'cpu.cpu_socket(s)': 2}
2013-11-25 15:00:15,768 [DEBUG] subscription-manager @hwprobe.py:747 - Running 'virt-what'
2013-11-25 15:00:15,836 [DEBUG] subscription-manager @hwprobe.py:751 - virt-what stdout: kvm

2013-11-25 15:00:15,836 [DEBUG] subscription-manager @hwprobe.py:752 - virt-what stderr: 
2013-11-25 15:00:15,837 [INFO] subscription-manager @hwprobe.py:740 - virt.is_guest: True
2013-11-25 15:00:15,837 [INFO] subscription-manager @hwprobe.py:741 - virt.host_type: kvm
2013-11-25 15:00:15,850 [INFO] subscription-manager @hwprobe.py:796 - virt.uuid: 0fd9a4d3-6c13-921d-6675-c9b7be913437
2013-11-25 15:00:15,882 [DEBUG] subscription-manager @certdirectory.py:204 - Installed product IDs: ['100000000000060', '1000000000000023', '1144', '100000000000011', '27060', '230', '1', '37069', '37068', '213412341237', '37065', '37067', '37060', '37062', '100000000000006', '100000000000005', '100000000000002', '100000000000003', '100000000000000', '100000000000001', '213412341236', '100000000000069', '213412341234', '213412341235', '100000000000020', '32060', '88888', '900', '917571', '37080', '801', '806', '37070']
2013-11-25 15:00:15,883 [DEBUG] subscription-manager @cert_sorter.py:131 - Unregistered, skipping server compliance check.
2013-11-25 15:00:16,112 [INFO] rhsmd @rhsmd:193 - rhsmd started
2013-11-25 15:00:16,128 [INFO] rhsmd @rhsmd:148 - D-Bus interface com.redhat.SubscriptionManager.EntitlementStatus.update_status called with status = 0
2013-11-25 15:00:16,215 [INFO] rhsmd @rhsmd:116 - D-Bus signal com.redhat.SubscriptionManager.EntitlementStatus.entitlement_status_changed emitted
2013-11-25 15:00:16,219 [DEBUG] subscription-manager @utils.py:389 - No virt-who pid file, not attempting to restart



Additional info:

After unregister, the repos in /etc/yum.repos.d/redhat.repo should be empty.  It is not.

[root@jsefler-7 ~]# yum repolist all
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
repo id                       repo name                                              status
awesomeos/x86_64/7.0          awesomeos                                              disabled
awesomeos-i686                awesomeos-i686                                         disabled
awesomeos-ia64                awesomeos-ia64                                         disabled
awesomeos-modifier            awesomeos-modifier                                     disabled
awesomeos-ppc                 awesomeos-ppc                                          disabled
awesomeos-ppc64               awesomeos-ppc64                                        disabled
awesomeos-s390x               awesomeos-s390x                                        disabled
awesomeos-x86_64              awesomeos-x86_64                                       disabled
awesomeos-x86_64-i386-content awesomeos-x86_64-i386-content                          disabled
awesomeos-x86_64-only-content awesomeos-x86_64-only-content                          disabled
content-label                 content                                                disabled
content-label-empty-gpg       content-emptygpg                                       disabled
content-label-no-gpg          content-nogpg                                          disabled
never-enabled-content         never-enabled-content                                  disabled
repolist: 0
[root@jsefler-7 ~]#

Comment 1 J.C. Molet 2013-12-09 22:07:30 UTC
*** Bug 1039749 has been marked as a duplicate of this bug. ***

Comment 2 Devan Goodwin 2014-01-02 15:23:29 UTC
Fixed in subscription-manager.git master: b5a2e8e79dd1660e5a975b006af4b5365797364f

Will appear in subscription-manager-1.10.9-1

Comment 4 Carter Kozak 2014-01-03 16:28:21 UTC
*** Bug 1037712 has been marked as a duplicate of this bug. ***

Comment 6 John Sefler 2014-01-24 22:46:07 UTC
Verifying Version...
[root@jsefler-7 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.9.2-1
subscription-manager: 1.10.11-1.el7
python-rhsm: 1.10.11-1.el7


[root@jsefler-7 ~]# subscription-manager register --autosubscribe --username=testuser1 --org=admin --serverurl=jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin
Password: 
The system has been registered with ID: 1d78c739-a64b-4f8d-8ceb-666fe59d5b3a 
Installed Product Current Status:
Product Name: Awesome OS for S390 Bits
Status:       Not Subscribed

Product Name: Stackable with Awesome OS for x86_64 Bits
Status:       Subscribed

Product Name: Awesome OS Developer Basic
Status:       Not Subscribed

Product Name: Awesome OS for x86_64/i686/ia64/ppc/ppc64/s390x/s390 Bits
Status:       Subscribed

Product Name: Awesome OS Workstation Bits
Status:       Subscribed

Product Name: Red Hat Enterprise Linux 7 Server High Touch Beta
Status:       Not Subscribed

Product Name: Awesome OS Developer Bits
Status:       Not Subscribed

Product Name: Management Bits
Status:       Subscribed

Product Name: Large File Support Bits
Status:       Subscribed

Product Name: Awesome OS for All Arch (x86 content) Bits
Status:       Subscribed

Product Name: Clustering Bits
Status:       Subscribed

Product Name: Shared Storage Bits
Status:       Subscribed

Product Name: Awesome OS Server Bits
Status:       Subscribed

Product Name: Awesome OS Premium Architecture Bits
Status:       Not Subscribed

Product Name: Awesome OS for ia64 Bits
Status:       Not Subscribed

Product Name: Awesome OS for i686 Bits
Status:       Not Subscribed

Product Name: Awesome OS for x86_64 Bits
Status:       Subscribed

Product Name: Awesome OS for ppc64 Bits
Status:       Not Subscribed

Product Name: Awesome OS for S390X Bits
Status:       Not Subscribed

Product Name: Awesome OS for i386 Bits
Status:       Not Subscribed

Product Name: Awesome OS for All Arch (all per arch content) Bits
Status:       Subscribed

Product Name: Virt Only Awesome OS for i386 Bits
Status:       Not Subscribed

Product Name: Awesome OS for All Arch (excpt for x86_64 content) Bits
Status:       Subscribed

Product Name: Awesome OS for All Arch (just x86_64 content) Bits
Status:       Subscribed

Product Name: Awesome OS for x86 Bits
Status:       Not Subscribed

Product Name: Awesome OS Instance Server Bits
Status:       Subscribed

Product Name: Shared File System Bits
Status:       Subscribed

Product Name: Multi-Attribute Limited Product
Status:       Subscribed

Product Name: Awesome Hypervisor Bits
Status:       Subscribed

Product Name: Multiplier Product Bits
Status:       Not Subscribed

Product Name: Awesome OS Modifier Bits
Status:       Subscribed

Product Name: RAM Limiting Product
Status:       Subscribed

Product Name: Core Limiting Product
Status:       Subscribed

Product Name: Load Balancing Bits
Status:       Subscribed

[root@jsefler-7 ~]# subscription-manager unregister 
System has been unregistered.
[root@jsefler-7 ~]# 


[root@jsefler-7 ~]# grep -i "Traceback" /var/log/rhsm/rhsm.log
[root@jsefler-7 ~]# 
[root@jsefler-7 ~]# cat /etc/yum.repos.d/redhat.repo 
#
# Certificate-Based Repositories
# Managed by (rhsm) subscription-manager
#
# *** This file is auto-generated.  Changes made here will be over-written. ***
# *** Use "subscription-manager repo-override --help" if you wish to make changes. ***
#
# If this file is empty and this system is subscribed consider 
# a "yum repolist" to refresh available repos
#

[root@jsefler-7 ~]# 



VERIFIED: No Traceback in rhsm.log after unregister.
VERIFIED: The redhat.repo is emptied after unregister.

Comment 7 Ludek Smid 2014-06-13 09:20:33 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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