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 1821830 - Registration fails with a message "Restlib' object has no attribute '_get_cert_key_list'"
Summary: Registration fails with a message "Restlib' object has no attribute '_get_cer...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.9
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: beta
: ---
Assignee: William Poteat
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
: 1822029 (view as bug list)
Depends On:
Blocks: 1818012
TreeView+ depends on / blocked
 
Reported: 2020-04-07 17:07 UTC by Shwetha Kallesh
Modified: 2020-11-02 06:48 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-29 19:23:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:3866 0 None None None 2020-09-29 19:23:45 UTC

Description Shwetha Kallesh 2020-04-07 17:07:46 UTC
Description of problem:
Registration fails with a message "Restlib' object has no attribute '_get_cert_key_list'"

Version-Release number of selected component (if applicable):
[root@hp-z210-01 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: Unknown
subscription management rules: Unknown
subscription-manager: 1.24.31

How reproducible:


Steps to Reproduce:

[root@hp-z210-01 ~]# subscription-manager register
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: stage_auto_syspurpose001
Password:
'Restlib' object has no attribute '_get_cert_key_list'
 
 

tail from rhsm.log 
----------------------------------------------------------------------
2020-04-07 12:59:25,786 [DEBUG] subscription-manager:10638:MainThread @connection.py:822 - Environment variable NO_PROXY= will be used
2020-04-07 12:59:25,787 [INFO] subscription-manager:10638:MainThread @connection.py:919 - Connection built: host=subscription.rhsm.stage.redhat.com port=443 handler=/subscription auth=basic username=stage_auto_syspurpose001
2020-04-07 12:59:25,787 [ERROR] subscription-manager:10638:MainThread @managercli.py:215 - Error during registration: 'Restlib' object has no attribute '_get_cert_key_list'
2020-04-07 12:59:25,787 [ERROR] subscription-manager:10638: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'

Actual results:


Expected results:


Additional info:

Comment 4 Rehana 2020-04-08 06:41:27 UTC
*** Bug 1822029 has been marked as a duplicate of this bug. ***

Comment 5 William Poteat 2020-04-08 19:34:27 UTC
1. What is the scope of harm if this BZ is not resolved in this release? Reviewers want to know which RHEL features or customers are affected and if it will impact any Layered Product or Hardware partner plans.

Subscription Manager cannot execute a register

2. What are the risks associated with resolving this BZ? Reviewers want to know the scope of retesting, potential regressions.

Subscription Manager cannot execute a register. This is a regression.

3. Provide any other details that meet blocker criteria or should be weighed in making a decision (Other releases affected, upstream status, business impacts, etc).

It will make subscription manager unuseable.

Comment 6 Rehana 2020-04-09 06:53:13 UTC
clearing need info based on comment 5

Comment 10 Shwetha Kallesh 2020-04-15 09:42:40 UTC
Verification:

[root@hpe-dl380pgen8-02-vm-4 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.9.21-1
subscription management rules: 5.37
subscription-manager: 1.24.32
[root@hpe-dl380pgen8-02-vm-4 ~]



[root@hpe-dl380pgen8-02-vm-4 ~]# subscription-manager register --serverurl subscription.rhsm.stage.redhat.com --username stage_auto_testuser --password redhat --auto-attach
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
The system has been registered with ID: acdf2dc2-ec68-4289-b9be-b4543e095b87
The registered system name is: hpe-dl380pgen8-02-vm-4.hpe2.lab.eng.bos.redhat.com
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

^^ moving bug to verified as I system is registered sucessfully without any  "Restlib' object has no attribute '_get_cert_key_list'" error message
[root@hpe-dl380pgen8-02-vm-4 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   Red Hat Enterprise Linux Academic Site Subscription with Smart Management, Premium (Server, Desktop, Workstation, POWER, HPC, per FTE)
Provides:            Red Hat Enterprise Linux Atomic Host
                     Red Hat Enterprise Linux Atomic Host Beta
                     Red Hat Developer Tools (for RHEL Server)
                     Red Hat Container Images
                     RHEL for SAP for Power, little endian - Extended Update Support
                     Red Hat Developer Tools Beta (for RHEL Server)
                     Red Hat Container Images Beta
                     RHEL for SAP HANA for Power, little endian - Extended Update Support
                     Red Hat Software Collections (for RHEL Server for IBM Power)
                     Red Hat Software Collections Beta (for RHEL Server for IBM Power)
                     Red Hat Software Collections (for RHEL Server for IBM Power LE)
                     Red Hat Enterprise Linux for Power, little endian
                     Red Hat Software Collections Beta (for RHEL Server for IBM Power LE)
                     Red Hat Enterprise Linux for x86_64
                     Red Hat Enterprise Linux Resilient Storage for x86_64 - Extended Update Support
                     dotNET on RHEL (for RHEL Server)
                     Red Hat Enterprise Linux Scalable File System (for RHEL Server) - Extended Update Support
                     dotNET on RHEL Beta (for RHEL Server)
                     Oracle Java (for RHEL Server)
                     Oracle Java (for RHEL Client)
                     Oracle Java (for RHEL Compute Node)
                     Oracle Java (for RHEL Workstation)
                     Red Hat Software Collections (for RHEL Server)
SKU:                 RH2501844
Contract:            12032883
Account:             6319586
Serial:              789552165554790931
Pool ID:             8a99f9ae6e15eba0016e180f5f07017c
Provides Management: Yes
Active:              True
Quantity Used:       1
Service Type:        L1-L3
Roles:               
Service Level:       Premium
Usage:               Production
Add-ons:             
Status Details:      Subscription is current
Subscription Type:   Standard
Starts:              10/29/2019
Ends:                10/28/2020
Entitlement Type:    Virtual

Comment 12 errata-xmlrpc 2020-09-29 19:23:08 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 (subscription-manager bug fix update), 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://access.redhat.com/errata/RHBA-2020:3866


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