Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
should be fixed in master in commit c502646730aece92cbc94c6628aa7ab9d3e02c88
commit c502646730aece92cbc94c6628aa7ab9d3e02c88
Author: Adrian Likins <alikins>
Date: Tue Aug 23 10:27:21 2011 -0400
Fix problem with subscribing to products with no product certs
Add the product object to the stackable_product_info dict
so we can get it directly instead of trying to match against
the possibly empty (in the case of no installed product)
all_products dict
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.
http://rhn.redhat.com/errata/RHBA-2011-1695.html
Description of problem: The following stack trace occurs throughout our automated test runs against an onpremises candlepin with TESTDATA=1 deployed and all the generated product certs copied to the client.... [root@jsefler-onprem-62server ~]# tail -f /var/log/rhsm/rhsm.log 2011-08-19 22:45:50,856 [INFO] @connection.py:348 - Using certificate authentication: key = /etc/pki/consumer/key.pem, cert = /etc/pki/consumer/cert.pem, ca = /etc/rhsm/ca/, insecure = False 2011-08-19 22:45:50,857 [DEBUG] @connection.py:188 - Loading CA PEM certificates from: /etc/rhsm/ca/ 2011-08-19 22:45:50,857 [DEBUG] @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/fakamai-cp1.pem' 2011-08-19 22:45:50,858 [DEBUG] @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/jsefler-onprem-62candlepin.pem' 2011-08-19 22:45:50,858 [DEBUG] @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem' 2011-08-19 22:45:50,859 [DEBUG] @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem' 2011-08-19 22:45:50,860 [DEBUG] @connection.py:209 - Making request: GET /candlepin/ 2011-08-19 22:45:50,955 [DEBUG] @connection.py:216 - Response status: 200 2011-08-19 22:45:50,960 [DEBUG] @connection.py:377 - Server supports the following resources: 2011-08-19 22:45:50,961 [DEBUG] @connection.py:378 - {'serials': '/serials', 'status': '/status', 'owners': '/owners', 'jobs': '/jobs', 'users': '/users', 'consumers': '/consumers', 'subscriptions': '/subscriptions', 'admin': '/admin', 'consumertypes': '/consumertypes', 'statistics/generate': '/statistics/generate', 'content': '/content', 'pools': '/pools', 'products': '/products', 'activation_keys': '/activation_keys', 'atom': '/atom', 'entitlements': '/entitlements', 'events': '/events', 'crl': '/crl', 'rules': '/rules'} 2011-08-19 22:45:50,962 [INFO] @connection.py:360 - Connection Established: host: jsefler-onprem-62candlepin.usersys.redhat.com, port: 8443, handler: /candlepin 2011-08-19 22:45:51,138 [DEBUG] @cert_sorter.py:70 - Sorting product and entitlement cert status for: 2011-08-19 22:45:51.138321 2011-08-19 22:45:51,186 [DEBUG] @cert_sorter.py:91 - Installed product IDs: ['100000000000060', '1000000000000023', '1144', '100000000000011', '100000000000010', '100000000000013', '100000000000012', '100000000000015', '27060', '68', '917571', '1', '37069', '37068', '37080', '37065', '37067', '37060', '37062', '100000000000006', '100000000000007', '100000000000004', '100000000000005', '100000000000002', '100000000000003', '100000000000000', '100000000000001', '100000000000020', '100000000000022', '100000000000009', '100000000000008', '37090', '37070'] 2011-08-19 22:45:51,199 [ERROR] @managercli.py:62 - exception caught in subscription-manager 2011-08-19 22:45:51,199 [ERROR] @managercli.py:63 - 'NoneType' object has no attribute 'getHash' Traceback (most recent call last): File "/usr/sbin/subscription-manager", line 78, in <module> sys.exit(abs(main() or 0)) File "/usr/sbin/subscription-manager", line 69, in main return managercli.CLI().main() File "/usr/share/rhsm/subscription_manager/managercli.py", line 1225, in main cmd.main() File "/usr/share/rhsm/subscription_manager/managercli.py", line 215, in main self._do_command() File "/usr/share/rhsm/subscription_manager/managercli.py", line 1090, in _do_command facts, self.options.all, on_date) File "/usr/share/rhsm/subscription_manager/managerlib.py", line 381, in getAvailableEntitlements dlist = list_pools(cpserver, consumer_uuid, facts, get_all, active_on) File "/usr/share/rhsm/subscription_manager/managerlib.py", line 354, in list_pools facts.update_check(uep, consumer_uuid) File "/usr/share/rhsm/subscription_manager/facts.py", line 167, in update_check if self.delta() or force: File "/usr/share/rhsm/subscription_manager/facts.py", line 96, in delta self.facts = self.get_facts() File "/usr/share/rhsm/subscription_manager/facts.py", line 124, in get_facts self.facts = self._find_facts() File "/usr/share/rhsm/subscription_manager/facts.py", line 151, in _find_facts facts_dict=facts) File "/usr/share/rhsm/subscription_manager/cert_sorter.py", line 76, in __init__ self._scan_ent_cert_stackable_products() File "/usr/share/rhsm/subscription_manager/cert_sorter.py", line 126, in _scan_ent_cert_stackable_products product_id = product.getHash() AttributeError: 'NoneType' object has no attribute 'getHash' Version-Release number of selected component (if applicable): [root@jsefler-onprem-62server ~]# rpm -q subscription-manager subscription-manager-0.96.6-1.git.8.6e109e4.el6.x86_64 [root@jsefler-onprem-62server ~]# rpm -q python-rhsm python-rhsm-0.96.9-1.git.3.328723e.el6.noarch How reproducible: Steps to Reproduce: [root@jsefler-onprem-62server ~]# subscription-manager register --username testuser1 --password=password --org=admin The system has been registered with id: 6510950e-cc19-4cbd-a362-56ea35c5dcc2 [root@jsefler-onprem-62server ~]# subscription-manager list --avail | grep -A1 management-100 ProductId: management-100 PoolId: 8a90f8c631e50cd80131e50e3b7e0279 -- ProductId: management-100 PoolId: 8a90f8c631e50cd80131e50e3bcf0281 [root@jsefler-onprem-62server ~]# subscription-manager subscribe --pool=8a90f8c631e50cd80131e50e3b7e0279 Successfully subscribed the system to Pool 8a90f8c631e50cd80131e50e3b7e0279 [root@jsefler-onprem-62server ~]# subscription-manager list --avail 'NoneType' object has no attribute 'getHash' ^^^^^ EXPECTED subscription-manager list --avail TO SHOW ALL THE AVAILABLE SUBSCRIPTIONS.