Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1607884

Summary: YUM stopped working after update to latest 7.5 RHV-H.
Product: Red Hat Enterprise Virtualization Manager Reporter: Frank DeLorey <fdelorey>
Component: pyOpenSSLAssignee: Marcin Mirecki <mmirecki>
Status: CLOSED DUPLICATE QA Contact: meital avital <mavital>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.2.4CC: danken
Target Milestone: ---   
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: 2018-07-24 19:18:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Frank DeLorey 2018-07-24 13:30:32 UTC
Description of problem:

yum fails after updating python-pyOpenSSL

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

RHEL7

How reproducible:

Always

Steps to Reproduce:

# yum upgrade
---> Package pyOpenSSL.x86_64 0:0.13.1-3.el7 will be obsoleted
---> Package python-pyOpenSSL.noarch 0:16.2.0-3.el7ost will be obsoleting

 python-pyOpenSSL       noarch       16.2.0-3.el7ost           rhel7-201805-x86_64-openstack-11-for-server-7        88 k
     replacing  pyOpenSSL.x86_64 0.13.1-3.el7

Actual results:

# yum repolist
Loaded plugins: aliases, changelog, langpacks, product-id, rhnplugin, search-disabled-repos, subscription-manager,
              : tmprepo, verify, versionlock
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 375, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 170, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 262, in getOptionsConfig
    self.conf
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1078, in <lambda>
    conf = property(fget=lambda self: self._getConfig(),
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 420, in _getConfig
    self.plugins.run('init')
  File "/usr/lib/python2.7/site-packages/yum/plugins.py", line 188, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/share/yum-plugins/rhnplugin.py", line 121, in init_hook
    login_info = up2dateAuth.getLoginInfo(timeout=timeout)
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 228, in getLoginInfo
    login(timeout=timeout)
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 195, in login
    li = server.up2date.login(systemId)
  File "/usr/share/rhn/up2date_client/rhnserver.py", line 63, in __call__
    return rpcServer.doCall(method, *args, **kwargs)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 204, in doCall
    ret = method(*args, **kwargs)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1233, in __call__
    return self.__send(self.__name, args)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 38, in _request1
    ret = self._request(methodname, params)
  File "/usr/lib/python2.7/site-packages/rhn/rpclib.py", line 384, in _request
    self._handler, request, verbose=self._verbose)
  File "/usr/lib/python2.7/site-packages/rhn/transports.py", line 188, in request
    return self._process_response(fd, connection)
  File "/usr/lib/python2.7/site-packages/rhn/transports.py", line 195, in _process_response
    fd = resp.decode(fd)
  File "/usr/lib/python2.7/site-packages/rhn/transports.py", line 442, in decode
    self.read(fd)
  File "/usr/lib/python2.7/site-packages/rhn/transports.py", line 420, in read
    max_mem_size=self.max_mem_size)
  File "/usr/lib/python2.7/site-packages/rhn/transports.py", line 528, in _smart_read
    chunk = fd.read(l)
  File "/usr/lib64/python2.7/httplib.py", line 610, in read
    self.close()
  File "/usr/lib64/python2.7/httplib.py", line 555, in close
    self.fp.close()
  File "/usr/lib/python2.7/site-packages/rhn/SSL.py", line 133, in close
    self._really_close()
  File "/usr/lib/python2.7/site-packages/rhn/SSL.py", line 148, in _really_close
    if self._connection.state_string() == 'SSL negotiation finished successfully':
  File "/usr/lib/python2.7/site-packages/OpenSSL/SSL.py", line 1135, in __getattr__
    return getattr(self._socket, name)
AttributeError: '_socketobject' object has no attribute 'state_string'

Expected results:

No crashes, yum should work

Additional info:

[root@rhevmt:~]#yum list bash
Loaded plugins: langpacks, product-id, rhnplugin, search-disabled-repos, subscription-manager, versionlock
This system is receiving updates from RHN Classic or Red Hat Satellite.
Installed Packages
bash.x86_64                                        4.2.46-30.el7                                        @rhel-x86_64-server-7

[root@rhevmt:/var/log/ovirt-engine]#yum update -y
Loaded plugins: langpacks, product-id, rhnplugin, search-disabled-repos, subscription-manager, versionlock
This system is receiving updates from RHN Classic or Red Hat Satellite.
Resolving Dependencies
--> Running transaction check
---> Package pyOpenSSL.x86_64 0:0.13.1-3.el7 will be obsoleted
---> Package python-pyOpenSSL.noarch 0:16.2.0-3.el7ost will be obsoleting
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================================
 Package                              Arch                       Version                             Repository                                        Size
============================================================================================================================================================
Installing:
 python-pyOpenSSL                     noarch                     16.2.0-3.el7ost                     rhel-x86_64-server-7-rhv-4.2                      88 k
     replacing  pyOpenSSL.x86_64 0.13.1-3.el7

Transaction Summary
============================================================================================================================================================
Install  1 Package

Total download size: 88 k
Downloading packages:
python-pyOpenSSL-16.2.0-3.el7ost.noarch.rpm                                                                                          |  88 kB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : python-pyOpenSSL-16.2.0-3.el7ost.noarch                                                                                                  1/2
  Erasing    : pyOpenSSL-0.13.1-3.el7.x86_64                                                                                                            2/2
  Verifying  : python-pyOpenSSL-16.2.0-3.el7ost.noarch                                                                                                  1/2
  Verifying  : pyOpenSSL-0.13.1-3.el7.x86_64                                                                                                            2/2

Installed:
  python-pyOpenSSL.noarch 0:16.2.0-3.el7ost

Replaced:
  pyOpenSSL.x86_64 0:0.13.1-3.el7

Complete!
[root@rhevmt:/var/log/ovirt-engine]#yum check-update

Loaded plugins: langpacks, product-id, rhnplugin, search-disabled-repos, subscription-manager, versionlock
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 375, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 170, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 262, in getOptionsConfig
    self.conf
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1078, in <lambda>
    conf = property(fget=lambda self: self._getConfig(),
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 420, in _getConfig
    self.plugins.run('init')
  File "/usr/lib/python2.7/site-packages/yum/plugins.py", line 188, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/share/yum-plugins/rhnplugin.py", line 141, in init_hook
    svrChannels = rhnChannel.getChannelDetails(timeout=timeout)
  File "/usr/share/rhn/up2date_client/rhnChannel.py", line 71, in getChannelDetails
    sourceChannels = getChannels(timeout=timeout)
  File "/usr/share/rhn/up2date_client/rhnChannel.py", line 98, in getChannels
    up2dateChannels = s.up2date.listChannels(up2dateAuth.getSystemId())
  File "/usr/share/rhn/up2date_client/rhnserver.py", line 63, in __call__
    return rpcServer.doCall(method, *args, **kwargs)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 204, in doCall
    ret = method(*args, **kwargs)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1233, in __call__
    return self.__send(self.__name, args)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 38, in _request1
    ret = self._request(methodname, params)
  File "/usr/lib/python2.7/site-packages/rhn/rpclib.py", line 384, in _request
    self._handler, request, verbose=self._verbose)
  File "/usr/lib/python2.7/site-packages/rhn/transports.py", line 188, in request
    return self._process_response(fd, connection)
  File "/usr/lib/python2.7/site-packages/rhn/transports.py", line 195, in _process_response
    fd = resp.decode(fd)
  File "/usr/lib/python2.7/site-packages/rhn/transports.py", line 442, in decode
    self.read(fd)
  File "/usr/lib/python2.7/site-packages/rhn/transports.py", line 420, in read
    max_mem_size=self.max_mem_size)
  File "/usr/lib/python2.7/site-packages/rhn/transports.py", line 528, in _smart_read
    chunk = fd.read(l)
  File "/usr/lib64/python2.7/httplib.py", line 610, in read
    self.close()
  File "/usr/lib64/python2.7/httplib.py", line 555, in close
    self.fp.close()
  File "/usr/lib/python2.7/site-packages/rhn/SSL.py", line 133, in close
    self._really_close()
  File "/usr/lib/python2.7/site-packages/rhn/SSL.py", line 148, in _really_close
    if self._connection.state_string() == 'SSL negotiation finished successfully':
  File "/usr/lib/python2.7/site-packages/OpenSSL/SSL.py", line 1135, in __getattr__
    return getattr(self._socket, name)
AttributeError: '_socketobject' object has no attribute 'state_string'

I have repaired system with these steps:

[root@rhevmt:/var/log/ovirt-engine]#rpm -e python-pyOpenSSL-16.2.0-3.el7ost.noarch
error: Failed dependencies:
        pyOpenSSL is needed by (installed) python2-ipalib-4.5.4-10.el7_5.1.noarch
        pyOpenSSL is needed by (installed) rhnlib-2.5.65-7.el7.noarch
        pyOpenSSL is needed by (installed) insights-client-0:3.0.3-9.el7_5.noarch
        pyOpenSSL is needed by (installed) ovirt-engine-4.2.3.5-0.1.el7.noarch

[root@rhevmt:/var/log/ovirt-engine]#rpm -e python-pyOpenSSL-16.2.0-3.el7ost.noarch --nodeps


Find and download manually package pyOpenSSL-0.13.1-3.el7.x86_64.rpm from our Satellite:

[root@rhevmt:/var/log/ovirt-engine]#rpm -ivh /home/qsgarabiboh/install/pyOpenSSL-0.13.1-3.el7.x86_64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:pyOpenSSL-0.13.1-3.el7           ################################# [100%]

[root@rhevmt:/var/log/ovirt-engine]#yum check-update
Loaded plugins: langpacks, product-id, rhnplugin, search-disabled-repos, subscription-manager, versionlock
This system is receiving updates from RHN Classic or Red Hat Satellite.
Obsoleting Packages
python-pyOpenSSL.noarch                                             16.2.0-3.el7ost                                             rhel-x86_64-server-7-rhv-4.2
    pyOpenSSL.x86_64                                                0.13.1-3.el7                                                installed

Comment 1 Frank DeLorey 2018-07-24 13:32:56 UTC
This was also reported in OSP via the following BZs:

1583810
1583809
1580531

Comment 2 Dan Kenigsberg 2018-07-24 19:18:50 UTC

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