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.

Bug 1822029

Summary: 'Restlib' object has no attribute '_get_cert_key_list' when registration
Product: Red Hat Enterprise Linux 7 Reporter: qianzhan
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED DUPLICATE QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: high Docs Contact:
Priority: high    
Version: 7.9CC: redakkan
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-08 06:41:27 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:
Attachments:
Description Flags
AttributeError-when-launching-subscription-manager-gui.png
none
AttributeError-when-registering-by-subscription-manager-gui.png none

Description qianzhan 2020-04-08 06:16:44 UTC
Description of problem:
'Restlib' object has no attribute '_get_cert_key_list' when registration

Version-Release number of selected component (if applicable):
subscription-manager-1.24.31-1.el7.x86_64
package dnf-plugin-subscription-manager is not installed
subscription-manager-cockpit-1.24.31-1.el7.noarch
subscription-manager-rhsm-1.24.31-1.el7.x86_64
subscription-manager-rhsm-certificates-1.24.31-1.el7.x86_64
tfm-rubygem-katello-3.14.0.20-1.el7sat.noarch
katello-3.14.0-6.el7sat.noarch
candlepin-2.9.25-1.el7sat.noarch

How reproducible:
always

Steps to Reproduce:
1. Register RHEL-7.9-20200407.0 against Satellite6.7-snap20.0:

[root@hpe-dl380pgen8-02-vm-5 ~]# subscription-manager register
Registering to: dell-per810-03.dell2.lab.eng.bos.redhat.com:443/rhsm
Username: admin
Password: 
'Restlib' object has no attribute '_get_cert_key_list'


Actual results:
As step 1, failed to register.

Expected results:
Registration should succeed.

Additional info:

Comment 2 qianzhan 2020-04-08 06:19:49 UTC
[root@hpe-dl380pgen8-02-vm-5 ~]# cat /var/log/rhsm/rhsm.log 
2020-04-08 02:11:03,165 [INFO] subscription-manager:20119:MainThread @connection.py:919 - Connection built: host=dell-per810-03.dell2.lab.eng.bos.redhat.com port=443 handler=/rhsm auth=identity_cert ca_dir=/etc/rhsm/ca/ insecure=False
2020-04-08 02:11:03,178 [INFO] subscription-manager:20119:MainThread @connection.py:919 - Connection built: host=dell-per810-03.dell2.lab.eng.bos.redhat.com port=443 handler=/rhsm auth=identity_cert ca_dir=/etc/rhsm/ca/ insecure=False
2020-04-08 02:11:03,178 [INFO] subscription-manager:20119:MainThread @connection.py:919 - Connection built: host=dell-per810-03.dell2.lab.eng.bos.redhat.com port=443 handler=/rhsm auth=none
2020-04-08 02:11:06,321 [INFO] subscription-manager:20119:MainThread @connection.py:919 - Connection built: host=dell-per810-03.dell2.lab.eng.bos.redhat.com port=443 handler=/rhsm auth=basic username=admin
2020-04-08 02:11:06,322 [ERROR] subscription-manager:20119:MainThread @managercli.py:215 - Error during registration: 'Restlib' object has no attribute '_get_cert_key_list'
2020-04-08 02:11:06,322 [ERROR] subscription-manager:20119:MainThread @managercli.py:216 - 'Restlib' object has no attribute '_get_cert_key_list'
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/subscription_manager/managercli.py", line 1365, in _do_command
    owner_key = self._determine_owner_key(admin_cp)
  File "/usr/lib64/python2.7/site-packages/subscription_manager/managercli.py", line 1513, in _determine_owner_key
    owners = cp.getOwnerList(self.username)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 1281, in getOwnerList
    return self.conn.request_get(method)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 740, in request_get
    return self._request("GET", method, headers=headers)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 766, in _request
    info=info, headers=headers)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 574, in _request
    cert_key_pairs = self._get_cert_key_list()
AttributeError: 'Restlib' object has no attribute '_get_cert_key_list'
[root@hpe-dl380pgen8-02-vm-5 ~]#

Comment 3 qianzhan 2020-04-08 06:35:31 UTC
This bug also happens when:
1) registering by cockpit.
2) launching subscription-manager-gui. Please refer attachment 'AttributeError-when-launching-subscription-manager-gui.png'
3) registering by subscription-manager-gui. Please refer attachment 'AttributeError-when-registering-by-subscription-manager-gui.png'.

Comment 4 qianzhan 2020-04-08 06:37:13 UTC
Created attachment 1677139 [details]
AttributeError-when-launching-subscription-manager-gui.png

Comment 5 qianzhan 2020-04-08 06:37:45 UTC
Created attachment 1677140 [details]
AttributeError-when-registering-by-subscription-manager-gui.png

Comment 6 Rehana 2020-04-08 06:41:27 UTC

*** This bug has been marked as a duplicate of bug 1821830 ***