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 1436344 - m2crypto-0.21.1.pulp-13.el7sat with python-rhsm-1.17.9-1.el7 results in subscription-manager:3997:MainThread @managercli.py:175 - __init__() got an unexpected keyword argument 'family'
Summary: m2crypto-0.21.1.pulp-13.el7sat with python-rhsm-1.17.9-1.el7 results in subsc...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: python-rhsm
Version: 7.3
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Kevin Howell
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-27 17:06 UTC by Kathryn Dixon
Modified: 2020-08-13 09:00 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 19:22:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin python-rhsm pull 184 0 None None None 2017-03-30 14:42:04 UTC
Github candlepin subscription-manager pull 1569 0 None None None 2017-03-30 14:45:06 UTC
Red Hat Bugzilla 1435475 0 urgent CLOSED Registering with subscription-manager-1.18 failing with Unable to connect to certificate server: __init__() got an unexp... 2021-12-10 14:58:14 UTC
Red Hat Product Errata RHBA-2017:2083 0 normal SHIPPED_LIVE python-rhsm and subscription-manager bug fix and enhancement update 2017-08-01 18:14:19 UTC

Internal Links: 1435475

Description Kathryn Dixon 2017-03-27 17:06:47 UTC
Description of problem:

2017-03-24 14:15:52,780 [ERROR] subscription-manager:3997:MainThread @managercli.py:175 - __init__() got an unexpected keyword argument 'family'
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/subscription_manager/managercli.py", line 1126, in _do_command
    owner_key = self._determine_owner_key(admin_cp)
  File "/usr/lib/python2.7/site-packages/subscription_manager/managercli.py", line 1271, in _determine_owner_key
    owners = cp.getOwnerList(self.username)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 1126, in getOwnerList
    return self.conn.request_get(method)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 694, in request_get
    return self._request("GET", method)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 584, in _request
    conn.request(request_type, handler, body=body, headers=headers)
  File "/usr/lib64/python2.7/httplib.py", line 1017, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib64/python2.7/httplib.py", line 1051, in _send_request
    self.endheaders(body)
  File "/usr/lib64/python2.7/httplib.py", line 1013, in endheaders
    self._send_output(message_body)
  File "/usr/lib64/python2.7/httplib.py", line 864, in _send_output
    self.send(msg)
  File "/usr/lib64/python2.7/httplib.py", line 826, in send
    self.connect()
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 246, in connect
    sock = SSL.Connection(self.ssl_ctx, family=family)
TypeError: __init__() got an unexpected keyword argument 'family'



Version-Release number of selected component (if applicable):


How reproducible: 100%


Steps to Reproduce:
1. install m2crypto-0.21.1.pulp-13.el7sat.x86_64 on rhel 7
2. yum update subscription-manager (with its dependencies) to subscription-manager-1.17.15-1.el7.x86_64 

Actual results: any yum or subscription-manager command will fail


Expected results: successful yum and sub man commands


Additional info:

subscription-manager-1.17.15-1.el7.x86_64                   Mon Nov 21 12:01:15 2016
subscription-manager-gui-1.17.15-1.el7.x86_64               Mon Nov 21 12:06:02 2016
subscription-manager-initial-setup-addon-1.17.15-1.el7.x86_64 Mon Nov 21 12:06:27 2016
 
 
python-rhsm-1.17.9-1.el7.x86_64                             Mon Nov 21 12:01:14 2016
python-rhsm-certificates-1.17.9-1.el7.x86_64                Mon Nov 21 12:01:14 2016
 
m2crypto-0.21.1.pulp-13.el7sat.x86_64                       Sun Feb  5 15:28:38 2017

Comment 2 Alex Wood 2017-03-27 17:31:20 UTC
This problem was introduced because the special Pulp packaged version of M2Crypto does not carry the IPv6 support patch that is bundled into the RPM delivered with base RHEL.  The IPv6 support exists in M2Crypto version 0.22.4 and up but was backported via patch to 0.21 in RHEL.

Comment 3 Alex Wood 2017-03-27 17:34:56 UTC
commit 134f356d2471a4596d4285d711e5ebae329cca49
Author: Alex Wood <awood>
Date:   Fri Mar 24 16:46:03 2017 -0400

    1435475: Support older versions of M2Crypto
    
    Older versions of M2Crypto do not support the "family" parameter in
    M2Crypto.SSL.Connection.  This parameter allows one to create an IPv4 or
    IPv6 connection.  This patch checks to see if "family" is supported and
    if so, it provides the correct value.  Otherwise, nothing is supplied.
    Usage of an older version of M2Crypto will limit python-rhsm to IPv4
    but this was always the case in actual fact.  Usage of newer versions
    will be able to use either IPv6 or IPv4.

This code is ready to be built and released as python-rhsm 1.17.10

Comment 4 Alex Wood 2017-03-27 17:38:27 UTC
As a side note, the alternative to this patch is to fix the Pulp packaged version of M2Crypto to include the required patch.  Personally, I favor this option as the base RHEL M2Crypto carries 16 other patches that likely need to be in the Pulp version at well!

Comment 7 John Sefler 2017-03-29 16:06:20 UTC
Reproducing the bug beginning on RHEL72 (with some unconventional methods to get around conflict transaction errors to get m2crypto-0.21.1.pulp-13.el7sat installed) and updating to RHEL73 versions of subscription-manager-1.17...

[root@hp-dl380pgen8-02-vm-13 ~]# rpm -q subscription-manager python-rhsm m2crypto
subscription-manager-1.15.9-15.el7.x86_64
python-rhsm-1.15.4-5.el7.x86_64
m2crypto-0.21.1-17.el7.x86_64

[root@hp-dl380pgen8-02-vm-13 ~]# subscription-manager register --serverurl=subscription.rhsm.stage.redhat.com --auto-attach
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: stage_jsefler_openstack
Password: 
The system has been registered with ID: 4da4e1d6-f29b-4aa4-9076-33049eae833b 

Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

[root@hp-dl380pgen8-02-vm-13 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   Red Hat Enterprise Linux OpenStack Platform, Standard (4-sockets)
                     L3-Only
Provides:            Oracle Java (for RHEL Server)
                     Red Hat Enterprise Linux Server
                     Red Hat OpenStack Beta
                     Red Hat Enterprise Linux Atomic Host
                     Red Hat Enterprise MRG Messaging
                     Red Hat Software Collections (for RHEL Server)
                     Red Hat Beta
                     Red Hat Enterprise Linux Atomic Host Beta
                     Red Hat Software Collections Beta (for RHEL Server)
                     Red Hat OpenStack
                     Red Hat Enterprise Linux Load Balancer (for RHEL Server)
                     Red Hat Enterprise Linux High Availability (for RHEL Server)
SKU:                 MCT2901
Contract:            
Account:             
Serial:              200886550467241453
Pool ID:             8a99f9895afb7e37015b00d5fdd413ac
Provides Management: No
Active:              True
Quantity Used:       1
Service Level:       Standard
Service Type:        L3
Status Details:      Subscription is current
Subscription Type:   Standard
Starts:              03/23/2017
Ends:                04/07/2017
System Type:         Virtual

[root@hp-dl380pgen8-02-vm-13 ~]# 

I WOULD LIKE TO YUM UPDATE m2crypto BUT I WILL BE STOPPED BY A FILE CONFLICT ERROR.  INSTEAD, I WILL downloadonly AND USE RPM TO INSTALL m2crypto-0.21.1.pulp-13.el7sat.

[root@hp-dl380pgen8-02-vm-13 ~]# yum update m2crypto --downloadonly --disablerepo=* --enablerepo=rhel-7-server-rh-common-beta-rpms
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Resolving Dependencies
--> Running transaction check
---> Package m2crypto.x86_64 0:0.21.1-17.el7 will be updated
---> Package m2crypto.x86_64 0:0.21.1.pulp-13.el7sat will be an update
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================
 Package    Arch     Version                 Repository                           Size
=======================================================================================
Updating:
 m2crypto   x86_64   0.21.1.pulp-13.el7sat   rhel-7-server-rh-common-beta-rpms   489 k

Transaction Summary
=======================================================================================
Upgrade  1 Package

Total size: 489 k
Background downloading packages, then exiting:
exiting because "Download Only" specified
[root@hp-dl380pgen8-02-vm-13 ~]# 

NOW I WILL RPM ERASE m2crypto-0.21.1-17.el7 AND RPM INSTALL m2crypto-0.21.1.pulp-13.el7sat

[root@hp-dl380pgen8-02-vm-13 ~]# rpm --erase --nodeps m2crypto-0.21.1-17.el7.x86_64
[root@hp-dl380pgen8-02-vm-13 ~]# rpm --query m2crypto
package m2crypto is not installed
[root@hp-dl380pgen8-02-vm-13 ~]# 
[root@hp-dl380pgen8-02-vm-13 ~]# rpm -ivh /var/cache/yum/x86_64/7Server/rhel-7-server-rh-common-beta-rpms/packages/m2crypto-0.21.1.pulp-13.el7sat.x86_64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:m2crypto-0.21.1.pulp-13.el7sat   ################################# [100%]
[root@hp-dl380pgen8-02-vm-13 ~]# 
[root@hp-dl380pgen8-02-vm-13 ~]# rpm -q subscription-manager python-rhsm m2crypto
subscription-manager-1.15.9-15.el7.x86_64
python-rhsm-1.15.4-5.el7.x86_64
m2crypto-0.21.1.pulp-13.el7sat.x86_64
[root@hp-dl380pgen8-02-vm-13 ~]# 

NOW THAT I HAVE m2crypto-0.21.1.pulp-13.el7sat INSTALLED, LET'S CHECK subscription-manager status...

[root@hp-dl380pgen8-02-vm-13 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

NOTICE ^^^ THAT WE ARE STILL GOOD WITH subscription-manager-1.15 and m2crypto-0.21.1.pulp-13.el7sat INSTALLED.  HOWEVER...

IF WE UPGRADE TO subscription-manager-1.17 WITH m2crypto-0.21.1.pulp-13.el7sat INSTALLED, PROBLEMS BEGIN...

[root@hp-dl380pgen8-02-vm-13 ~]# yum update subscription-manager
Loaded plugins: product-id, search-disabled-repos, subscription-manager
rhel-7-server-rpms                                              | 3.5 kB  00:00:00     
rhel-ha-for-rhel-7-server-rpms                                  | 3.4 kB  00:00:00     
Resolving Dependencies
--> Running transaction check
---> Package subscription-manager.x86_64 0:1.15.9-15.el7 will be updated
---> Package subscription-manager.x86_64 0:1.17.15-1.el7 will be an update
--> Processing Dependency: python-rhsm >= 1.17.0 for package: subscription-manager-1.17.15-1.el7.x86_64
--> Running transaction check
---> Package python-rhsm.x86_64 0:1.15.4-5.el7 will be updated
---> Package python-rhsm.x86_64 0:1.17.9-1.el7 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================
 Package                  Arch       Version              Repository              Size
=======================================================================================
Updating:
 subscription-manager     x86_64     1.17.15-1.el7        rhel-7-server-rpms     883 k
Updating for dependencies:
 python-rhsm              x86_64     1.17.9-1.el7         rhel-7-server-rpms     116 k

Transaction Summary
=======================================================================================
Upgrade  1 Package (+1 Dependent package)

Total download size: 999 k
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/2): python-rhsm-1.17.9-1.el7.x86_64.rpm                      | 116 kB  00:00:02     
(2/2): subscription-manager-1.17.15-1.el7.x86_64.rpm            | 883 kB  00:00:02     
---------------------------------------------------------------------------------------
Total                                                     390 kB/s | 999 kB  00:02     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
  Updating   : python-rhsm-1.17.9-1.el7.x86_64                                     1/4 
  Updating   : subscription-manager-1.17.15-1.el7.x86_64                           2/4 
warning: /etc/rhsm/rhsm.conf created as /etc/rhsm/rhsm.conf.rpmnew
  Cleanup    : subscription-manager-1.15.9-15.el7.x86_64                           3/4 
  Cleanup    : python-rhsm-1.15.4-5.el7.x86_64                                     4/4 
  Verifying  : subscription-manager-1.17.15-1.el7.x86_64                           1/4 
  Verifying  : python-rhsm-1.17.9-1.el7.x86_64                                     2/4 
  Verifying  : python-rhsm-1.15.4-5.el7.x86_64                                     3/4 
  Verifying  : subscription-manager-1.15.9-15.el7.x86_64                           4/4 

Updated:
  subscription-manager.x86_64 0:1.17.15-1.el7                                          

Dependency Updated:
  python-rhsm.x86_64 0:1.17.9-1.el7                                                    

Complete!
[root@hp-dl380pgen8-02-vm-13 ~]# 

DESPITE THE SUCCESSFUL UPGRADE TO THE RHSM 1.17 PACKAGES, LET'S RE-CHECK subscription-manager status...

[root@hp-dl380pgen8-02-vm-13 ~]# subscription-manager status
Exception AttributeError: "Connection instance has no attribute 'ssl_close_flag'" in <bound method Connection.__del__ of <M2Crypto.SSL.Connection.Connection instance at 0x1329878>> ignored
__init__() got an unexpected keyword argument 'family'
[root@hp-dl380pgen8-02-vm-13 ~]# 

BANG! ^^^ WE CAN NO LONGER USE subscription-manager-1.17 WITH m2crypto-0.21.1.pulp-13.el7sat INSTALLED.


ADDITIONAL INFO...

[root@hp-dl380pgen8-02-vm-13 ~]# tail -f /var/log/rhsm/rhsm.log 
2017-03-29 12:04:27,492 [INFO] subscription-manager:27979:MainThread @managercli.py:384 - Client Versions: {'python-rhsm': '1.17.9-1.el7', 'subscription-manager': '1.17.15-1.el7'}
2017-03-29 12:04:27,493 [INFO] subscription-manager:27979:MainThread @connection.py:830 - Connection built: host=subscription.rhsm.stage.redhat.com port=443 handler=/subscription auth=identity_cert ca_dir=/etc/rhsm/ca/ verify=False
2017-03-29 12:04:27,493 [INFO] subscription-manager:27979:MainThread @connection.py:830 - Connection built: host=subscription.rhsm.stage.redhat.com port=443 handler=/subscription auth=none
2017-03-29 12:04:27,497 [ERROR] subscription-manager:27979:MainThread @managercli.py:174 - exception caught in subscription-manager
2017-03-29 12:04:27,497 [ERROR] subscription-manager:27979:MainThread @managercli.py:175 - __init__() got an unexpected keyword argument 'family'
Traceback (most recent call last):
  File "/usr/sbin/subscription-manager", line 81, in <module>
    sys.exit(abs(main() or 0))
  File "/usr/sbin/subscription-manager", line 72, in main
    return managercli.ManagerCLI().main()
  File "/usr/lib/python2.7/site-packages/subscription_manager/managercli.py", line 2744, in main
    return CLI.main(self)
  File "/usr/lib/python2.7/site-packages/subscription_manager/cli.py", line 160, in main
    return cmd.main()
  File "/usr/lib/python2.7/site-packages/subscription_manager/managercli.py", line 526, in main
    return_code = self._do_command()
  File "/usr/lib/python2.7/site-packages/subscription_manager/managercli.py", line 2701, in _do_command
    self.sorter = inj.require(inj.CERT_SORTER)
  File "/usr/lib/python2.7/site-packages/subscription_manager/injection.py", line 103, in require
    return FEATURES.require(feature, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/subscription_manager/injection.py", line 77, in require
    self.providers[feature] = provider()
  File "/usr/lib/python2.7/site-packages/subscription_manager/cert_sorter.py", line 325, in __init__
    super(CertSorter, self).__init__()
  File "/usr/lib/python2.7/site-packages/subscription_manager/cert_sorter.py", line 65, in __init__
    self.load()
  File "/usr/lib/python2.7/site-packages/subscription_manager/cert_sorter.py", line 111, in load
    self._parse_server_status()
  File "/usr/lib/python2.7/site-packages/subscription_manager/cert_sorter.py", line 130, in _parse_server_status
    status = self.get_compliance_status()
  File "/usr/lib/python2.7/site-packages/subscription_manager/cert_sorter.py", line 343, in get_compliance_status
    return status_cache.load_status(self.cp_provider.get_consumer_auth_cp(), self.identity.uuid)
  File "/usr/lib/python2.7/site-packages/subscription_manager/cache.py", line 197, in load_status
    self._sync_with_server(uep, uuid)
  File "/usr/lib/python2.7/site-packages/subscription_manager/cache.py", line 306, in _sync_with_server
    self.server_status = uep.getCompliance(uuid)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 1084, in getCompliance
    return self.conn.request_get(method)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 694, in request_get
    return self._request("GET", method)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 584, in _request
    conn.request(request_type, handler, body=body, headers=headers)
  File "/usr/lib64/python2.7/httplib.py", line 979, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib64/python2.7/httplib.py", line 1013, in _send_request
    self.endheaders(body)
  File "/usr/lib64/python2.7/httplib.py", line 975, in endheaders
    self._send_output(message_body)
  File "/usr/lib64/python2.7/httplib.py", line 835, in _send_output
    self.send(msg)
  File "/usr/lib64/python2.7/httplib.py", line 797, in send
    self.connect()
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 246, in connect
    sock = SSL.Connection(self.ssl_ctx, family=family)
TypeError: __init__() got an unexpected keyword argument 'family'

Comment 8 John Sefler 2017-03-29 16:21:06 UTC
IMMEDIATE WORKAROUND is to downgrade the RHSM packages back to their 1.15 versions from RHEL7.2 with --disableplugin=subscription-manager....

[root@hp-dl380pgen8-02-vm-13 ~]# yum downgrade python-rhsm subscription-manager* --disableplugin=subscription-manager --disablerepo=* --enablerepo=rhel-7-server-rpms
Loaded plugins: product-id, search-disabled-repos
No Match for available package: subscription-manager-firstboot-1.10.14-7.el7.x86_64
No Match for available package: subscription-manager-gui-1.10.14-7.el7.x86_64
No Match for available package: subscription-manager-initial-setup-addon-1.15.9-15.el7.x86_64
No Match for available package: subscription-manager-migration-1.10.14-7.el7.x86_64
No Match for available package: subscription-manager-migration-data-2.0.7-1.el7.noarch
No Match for available package: subscription-manager-plugin-container-1.17.15-1.el7.x86_64
Resolving Dependencies
--> Running transaction check
---> Package python-rhsm.x86_64 0:1.15.4-5.el7 will be a downgrade
---> Package python-rhsm.x86_64 0:1.17.9-1.el7 will be erased
---> Package subscription-manager.x86_64 0:1.15.9-15.el7 will be a downgrade
---> Package subscription-manager.x86_64 0:1.17.15-1.el7 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================
 Package                  Arch       Version              Repository              Size
=======================================================================================
Downgrading:
 python-rhsm              x86_64     1.15.4-5.el7         rhel-7-server-rpms     116 k
 subscription-manager     x86_64     1.15.9-15.el7        rhel-7-server-rpms     823 k

Transaction Summary
=======================================================================================
Downgrade  2 Packages

Total download size: 939 k
Is this ok [y/d/N]: y
Downloading packages:
(1/2): python-rhsm-1.15.4-5.el7.x86_64.rpm                      | 116 kB  00:00:01     
(2/2): subscription-manager-1.15.9-15.el7.x86_64.rpm            | 823 kB  00:00:02     
---------------------------------------------------------------------------------------
Total                                                     413 kB/s | 939 kB  00:02     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : python-rhsm-1.15.4-5.el7.x86_64                                     1/4 
  Installing : subscription-manager-1.15.9-15.el7.x86_64                           2/4 
warning: /etc/rhsm/rhsm.conf created as /etc/rhsm/rhsm.conf.rpmnew
  Cleanup    : subscription-manager-1.17.15-1.el7.x86_64                           3/4 
  Cleanup    : python-rhsm-1.17.9-1.el7.x86_64                                     4/4 
  Verifying  : python-rhsm-1.15.4-5.el7.x86_64                                     1/4 
  Verifying  : subscription-manager-1.15.9-15.el7.x86_64                           2/4 
  Verifying  : subscription-manager-1.17.15-1.el7.x86_64                           3/4 
  Verifying  : python-rhsm-1.17.9-1.el7.x86_64                                     4/4 

Removed:
  python-rhsm.x86_64 0:1.17.9-1.el7     subscription-manager.x86_64 0:1.17.15-1.el7    

Installed:
  python-rhsm.x86_64 0:1.15.4-5.el7     subscription-manager.x86_64 0:1.15.9-15.el7    

Complete!
[root@hp-dl380pgen8-02-vm-13 ~]# 
[root@hp-dl380pgen8-02-vm-13 ~]# rpm -q subscription-manager python-rhsm m2crypto
subscription-manager-1.15.9-15.el7.x86_64
python-rhsm-1.15.4-5.el7.x86_64
m2crypto-0.21.1.pulp-13.el7sat.x86_64
[root@hp-dl380pgen8-02-vm-13 ~]# 
[root@hp-dl380pgen8-02-vm-13 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

[root@hp-dl380pgen8-02-vm-13 ~]# 

CONFIRMED: AFTER DOWNGRADING BACK TO THE RHSM 1.15 versions, SUBSCRIPTION MANAGER STATUS WORKS AGAIN WITH m2crypto-0.21.1.pulp-13.el7sat

Comment 10 Kevin Howell 2017-03-30 14:45:07 UTC
Since changes in python-rhsm to reduce m2crypto usage, this is likely a non-issue on 7.4 anyways. However, the fix that Al mentioned in comment 3 has been applied to master, and would best be tested with environment variable RHSM_USE_M2CRYPTO set to '1'.

Comment 12 Shwetha Kallesh 2017-06-07 08:47:33 UTC
Reproducer:

[root@dell-pe-fm120-2c ~]# rpm -q subscription-manager python-rhsm m2crypto
subscription-manager-1.15.9-15.el7.x86_64
python-rhsm-1.15.4-5.el7.x86_64
m2crypto-0.21.1-17.el7.x86_64
[root@dell-pe-fm120-2c ~]# subscription-manager register --serverurl=subscription.rhsm.stage.redhat.com
This system is already registered. Use --force to override
[root@dell-pe-fm120-2c ~]# rm -rf /etc/pki/consumer/*
[root@dell-pe-fm120-2c ~]# subscription-manager register --serverurl=subscription.rhsm.stage.redhat.com
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: shwetha_tier1_test
Password: 
The system has been registered with ID: a14620aa-29d3-4d2d-a8d9-30fb3f14cb0e 

[root@dell-pe-fm120-2c ~]# subscription-manager  attach --pool 8a99f9815c5f83ae015c8196cf757da8
1 local certificate has been deleted.
Successfully attached a subscription for: Red Hat OpenStack Platform, Standard (4-sockets) L3-Only
[root@dell-pe-fm120-2c ~]# yum update m2crypto --downloadonly --disablerepo=* --enablerepo=rhel-7-server-rh-common-beta-rpms
Loaded plugins: product-id, search-disabled-repos, subscription-manager
rhel-7-server-rh-common-beta-rpms                                                                                                                | 3.8 kB  00:00:00     
Resolving Dependencies
--> Running transaction check
---> Package m2crypto.x86_64 0:0.21.1-17.el7 will be updated
---> Package m2crypto.x86_64 0:0.21.1.pulp-13.el7sat will be an update
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
 Package                        Arch                         Version                                      Repository                                               Size
========================================================================================================================================================================
Updating:
 m2crypto                       x86_64                       0.21.1.pulp-13.el7sat                        rhel-7-server-rh-common-beta-rpms                       489 k

Transaction Summary
========================================================================================================================================================================
Upgrade  1 Package

Total size: 489 k
Background downloading packages, then exiting:
exiting because "Download Only" specified
[root@dell-pe-fm120-2c ~]# rpm --erase --nodeps m2crypto-0.21.1-17.el7.x86_64
[root@dell-pe-fm120-2c ~]# rpm --query m2crypto
package m2crypto is not installed
[root@dell-pe-fm120-2c ~]# rpm -ivh /var/cache/yum/x86_64/7Server/rhel-7-server-rh-common-beta-rpms/packages/m2crypto-0.21.1.pulp-13.el7sat.x86_64.rpm
warning: /var/cache/yum/x86_64/7Server/rhel-7-server-rh-common-beta-rpms/packages/m2crypto-0.21.1.pulp-13.el7sat.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f21541eb: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:m2crypto-0.21.1.pulp-13.el7sat   ################################# [100%]
[root@dell-pe-fm120-2c ~]# rpm -q subscription-manager python-rhsm m2crypto
subscription-manager-1.15.9-15.el7.x86_64
python-rhsm-1.15.4-5.el7.x86_64
m2crypto-0.21.1.pulp-13.el7sat.x86_64
[root@dell-pe-fm120-2c ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

Since I couldnot reproduce the error by updating to latest RHSM packages , I decided to download the version of sub-man packages that caused the error and installation of that version led to the error

[root@dell-pe-fm120-2c ~]# ls | grep "subscription-manager"
subscription-manager-1.17.15-1.el7.x86_64.rpm


[root@dell-pe-fm120-2c ~]# yum install subscription-manager*  python-rhsm* -y
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Examining subscription-manager-1.17.15-1.el7.x86_64.rpm: subscription-manager-1.17.15-1.el7.x86_64
Marking subscription-manager-1.17.15-1.el7.x86_64.rpm as an update to subscription-manager-1.15.9-15.el7.x86_64
Examining python-rhsm-1.17.9-1.el7.x86_64.rpm: python-rhsm-1.17.9-1.el7.x86_64
Marking python-rhsm-1.17.9-1.el7.x86_64.rpm as an update to python-rhsm-1.15.4-5.el7.x86_64
Examining python-rhsm-certificates-1.17.9-1.el7.x86_64.rpm: python-rhsm-certificates-1.17.9-1.el7.x86_64
Marking python-rhsm-certificates-1.17.9-1.el7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package python-rhsm.x86_64 0:1.15.4-5.el7 will be updated
---> Package python-rhsm.x86_64 0:1.17.9-1.el7 will be an update
---> Package python-rhsm-certificates.x86_64 0:1.17.9-1.el7 will be installed
---> Package subscription-manager.x86_64 0:1.15.9-15.el7 will be updated
---> Package subscription-manager.x86_64 0:1.17.15-1.el7 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
 Package                                   Arch                    Version                         Repository                                                      Size
========================================================================================================================================================================
Installing:
 python-rhsm-certificates                  x86_64                  1.17.9-1.el7                    /python-rhsm-certificates-1.17.9-1.el7.x86_64                  7.6 k
Updating:
 python-rhsm                               x86_64                  1.17.9-1.el7                    /python-rhsm-1.17.9-1.el7.x86_64                               345 k
 subscription-manager                      x86_64                  1.17.15-1.el7                   /subscription-manager-1.17.15-1.el7.x86_64                     3.8 M

Transaction Summary
========================================================================================================================================================================
Install  1 Package
Upgrade  2 Packages

Total size: 4.1 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
tkinter-2.7.5-58.el7.x86_64 has missing requires of libTix.so()(64bit)
  Installing : python-rhsm-certificates-1.17.9-1.el7.x86_64                                                                                                         1/5 
  Updating   : python-rhsm-1.17.9-1.el7.x86_64                                                                                                                      2/5 
  Updating   : subscription-manager-1.17.15-1.el7.x86_64                                                                                                            3/5 
warning: /etc/rhsm/rhsm.conf created as /etc/rhsm/rhsm.conf.rpmnew
  Cleanup    : subscription-manager-1.15.9-15.el7.x86_64                                                                                                            4/5 
  Cleanup    : python-rhsm-1.15.4-5.el7.x86_64                                                                                                                      5/5 
rhel-7-server-rpms/7Server/x86_64                                                                                                                | 3.5 kB  00:00:00     
  Verifying  : python-rhsm-certificates-1.17.9-1.el7.x86_64                                                                                                         1/5 
  Verifying  : subscription-manager-1.17.15-1.el7.x86_64                                                                                                            2/5 
  Verifying  : python-rhsm-1.17.9-1.el7.x86_64                                                                                                                      3/5 
  Verifying  : python-rhsm-1.15.4-5.el7.x86_64                                                                                                                      4/5 
  Verifying  : subscription-manager-1.15.9-15.el7.x86_64                                                                                                            5/5 

Installed:
  python-rhsm-certificates.x86_64 0:1.17.9-1.el7                                                                                                                        

Updated:
  python-rhsm.x86_64 0:1.17.9-1.el7                                             subscription-manager.x86_64 0:1.17.15-1.el7                                            

Complete!
[root@dell-pe-fm120-2c ~]# subscription-manager  status
Exception AttributeError: "Connection instance has no attribute 'ssl_close_flag'" in <bound method Connection.__del__ of <M2Crypto.SSL.Connection.Connection instance at 0x278d248>> ignored
__init__() got an unexpected keyword argument 'family'

Comment 13 Shwetha Kallesh 2017-06-07 08:48:32 UTC
Verification:


[root@dell-pe-fm120-2c ~]# rpm -q subscription-manager python-rhsm m2crypto
subscription-manager-1.19.15-1.el7.x86_64
python-rhsm-1.19.7-1.el7.x86_64

[root@dell-pe-fm120-2c ~]# subscription-manager  register --force
Unregistering from: subscription.rhsm.stage.redhat.com:443/subscription
The system with UUID 5c734cbc-5f1e-4952-bc4f-e8526f841878 has been unregistered
All local data removed
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: shwetha_tier1_test
Password: 
The system has been registered with ID: 822ea100-8b93-4793-bed2-04644e1b2c75 

[root@dell-pe-fm120-2c ~]# subscription-manager  attach --pool 8a99f9865c67e25a015c8195e97f0a12
Successfully attached a subscription for: Red Hat OpenStack Platform, Standard (4-sockets) L3-Only
[root@dell-pe-fm120-2c ~]# yum update m2crypto --downloadonly --disablerepo=* --enablerepo=rhel-7-server-rh-common-beta-rpms
Loaded plugins: product-id, search-disabled-repos, subscription-manager
rhel-7-server-rh-common-beta-rpms                                                                                                                | 3.8 kB  00:00:00     
Resolving Dependencies
--> Running transaction check
---> Package m2crypto.x86_64 0:0.21.1-17.el7 will be updated
---> Package m2crypto.x86_64 0:0.21.1.pulp-13.el7sat will be an update
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
 Package                        Arch                         Version                                      Repository                                               Size
========================================================================================================================================================================
Updating:
 m2crypto                       x86_64                       0.21.1.pulp-13.el7sat                        rhel-7-server-rh-common-beta-rpms                       489 k

Transaction Summary
========================================================================================================================================================================
Upgrade  1 Package

Total size: 489 k
Background downloading packages, then exiting:
exiting because "Download Only" specified
[root@dell-pe-fm120-2c ~]#  rpm --erase --nodeps m2crypto-0.21.1-17.el7.x86_64
[root@dell-pe-fm120-2c ~]# rpm --query m2crypto
package m2crypto is not installed
[root@dell-pe-fm120-2c ~]# rpm -ivh /var/cache/yum/x86_64/7Server/rhel-7-server-rh-common-beta-rpms/packages/m2crypto-0.21.1.pulp-13.el7sat.x86_64.rpm
warning: /var/cache/yum/x86_64/7Server/rhel-7-server-rh-common-beta-rpms/packages/m2crypto-0.21.1.pulp-13.el7sat.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f21541eb: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:m2crypto-0.21.1.pulp-13.el7sat   ################################# [100%]
[root@dell-pe-fm120-2c ~]# rpm -q subscription-manager python-rhsm m2crypto
subscription-manager-1.19.15-1.el7.x86_64
python-rhsm-1.19.7-1.el7.x86_64
m2crypto-0.21.1.pulp-13.el7sat.x86_64
[root@dell-pe-fm120-2c ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

[root@dell-pe-fm120-2c ~]#  yum update subscription-manager
Loaded plugins: product-id, search-disabled-repos, subscription-manager
rhel-7-server-rpms                                                                                                                               | 3.5 kB  00:00:00     
Resolving Dependencies
--> Running transaction check
---> Package subscription-manager.x86_64 0:1.19.15-1.el7 will be updated
---> Package subscription-manager.x86_64 0:1.19.17-1.el7 will be an update
--> Processing Dependency: python-rhsm >= 1.19.8 for package: subscription-manager-1.19.17-1.el7.x86_64
--> Running transaction check
---> Package python-rhsm.x86_64 0:1.19.7-1.el7 will be updated
---> Package python-rhsm.x86_64 0:1.19.8-1.el7 will be an update
--> Processing Dependency: python-rhsm-certificates = 1.19.8-1.el7 for package: python-rhsm-1.19.8-1.el7.x86_64
--> Running transaction check
---> Package python-rhsm-certificates.x86_64 0:1.19.7-1.el7 will be updated
---> Package python-rhsm-certificates.x86_64 0:1.19.8-1.el7 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
 Package                                           Arch                            Version                                 Repository                              Size
========================================================================================================================================================================
Updating:
 subscription-manager                              x86_64                          1.19.17-1.el7                           beaker-Server                          958 k
Updating for dependencies:
 python-rhsm                                       x86_64                          1.19.8-1.el7                            beaker-Server                          126 k
 python-rhsm-certificates                          x86_64                          1.19.8-1.el7                            beaker-Server                           41 k

Transaction Summary
========================================================================================================================================================================
Upgrade  1 Package (+2 Dependent packages)

Total download size: 1.1 M
Is this ok [y/d/N]: y
Downloading packages:
No Presto metadata available for beaker-Server
(1/3): python-rhsm-certificates-1.19.8-1.el7.x86_64.rpm                                                                                          |  41 kB  00:00:00     
(2/3): python-rhsm-1.19.8-1.el7.x86_64.rpm                                                                                                       | 126 kB  00:00:00     
(3/3): subscription-manager-1.19.17-1.el7.x86_64.rpm                                                                                             | 958 kB  00:00:00     
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                   5.4 MB/s | 1.1 MB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
tkinter-2.7.5-58.el7.x86_64 has missing requires of libTix.so()(64bit)
  Updating   : python-rhsm-certificates-1.19.8-1.el7.x86_64                                                                                                         1/6 
  Updating   : python-rhsm-1.19.8-1.el7.x86_64                                                                                                                      2/6 
  Updating   : subscription-manager-1.19.17-1.el7.x86_64                                                                                                            3/6 
  Cleanup    : subscription-manager-1.19.15-1.el7.x86_64                                                                                                            4/6 
  Cleanup    : python-rhsm-1.19.7-1.el7.x86_64                                                                                                                      5/6 
  Cleanup    : python-rhsm-certificates-1.19.7-1.el7.x86_64                                                                                                         6/6 
  Verifying  : subscription-manager-1.19.17-1.el7.x86_64                                                                                                            1/6 
  Verifying  : python-rhsm-1.19.8-1.el7.x86_64                                                                                                                      2/6 
  Verifying  : python-rhsm-certificates-1.19.8-1.el7.x86_64                                                                                                         3/6 
  Verifying  : python-rhsm-certificates-1.19.7-1.el7.x86_64                                                                                                         4/6 
  Verifying  : subscription-manager-1.19.15-1.el7.x86_64                                                                                                            5/6 
  Verifying  : python-rhsm-1.19.7-1.el7.x86_64                                                                                                                      6/6 

Updated:
  subscription-manager.x86_64 0:1.19.17-1.el7                                                                                                                           

Dependency Updated:
  python-rhsm.x86_64 0:1.19.8-1.el7                                            python-rhsm-certificates.x86_64 0:1.19.8-1.el7                                           

Complete!
[root@dell-pe-fm120-2c ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

^^ status is still current and dont see the error anymore , will move the bug to verified state

Comment 14 errata-xmlrpc 2017-08-01 19:22:43 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://access.redhat.com/errata/RHBA-2017:2083


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