Bug 1601471 - [downstream clone - 4.2.5] [RHV] yum fails after updating python-pyOpenSSL
Summary: [downstream clone - 4.2.5] [RHV] yum fails after updating python-pyOpenSSL
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: pyOpenSSL
Version: 4.2.4
Hardware: x86_64
OS: Linux
high
urgent
Target Milestone: ovirt-4.2.5
: ---
Assignee: Alona Kaplan
QA Contact: Petr Kubica
URL:
Whiteboard:
: 1607884 (view as bug list)
Depends On: 1597711
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-16 13:05 UTC by RHV bug bot
Modified: 2021-09-09 15:02 UTC (History)
7 users (show)

Fixed In Version: pyOpenSSL-17.3.0-4
Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
Clone Of: 1597711
Environment:
Last Closed: 2018-07-31 17:52:09 UTC
oVirt Team: Network
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1583810 1 None None None 2022-08-09 10:38:55 UTC
Red Hat Issue Tracker RHV-43241 0 None None None 2021-08-30 12:29:36 UTC
Red Hat Knowledge Base (Solution) 3469361 0 None None None 2018-07-27 19:03:04 UTC
Red Hat Product Errata RHEA-2018:2329 0 None None None 2018-07-31 17:52:11 UTC

Description RHV bug bot 2018-07-16 13:05:36 UTC
+++ This bug is a downstream clone. The original bug is: +++
+++   bug 1597711 +++
======================================================================

Description of problem:
After the update of python-pyOpenSSL from the rhel-7-server-rhv-4.2-manager-rpms repository the yum-rhn-plugin will no longer be able to connect to a Satellite 5 system.


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

RHEL-7.5, RHV-manager 4.2 rhnlib-2.5.22-15.el6, Satellite 5

Jul 03 07:00:35 Updated: ovirt-engine-setup-4.2.4.5-0.1.el7_3.noarch
Jul 03 07:00:35 Installed: python-pyOpenSSL-16.2.0-3.el7ost.noarch
Jul 03 07:01:16 Erased: pyOpenSSL-0.13.1-3.el7.x86_64

How reproducible:
- Always

Actual results:

# yum repolist
Loaded plugins: rhnplugin, search-disabled-repos, versionlock
Traceback (most recent call last):
  File "/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:
yum is able to communicate via rhnlib with Satellite 5

Additional info:

Workaround described in https://access.redhat.com/solutions/3469361 fixes rhnlib, but the issue is introduced by the change of the API of pyOpenSSL.

pyOpenSSL-17.3.0-4.el7ost from the OpenStack repos fixed that issue and re-introduced the API function.

(Originally by Andreas Bleischwitz)

Comment 2 RHV bug bot 2018-07-16 13:05:41 UTC
Aviv, please remind me: what should we do to inherit pyOpenSSL from OSP13? Our current erratum https://errata.devel.redhat.com/errata/details/30165 is not marked as multi-product.

(Originally by danken)

Comment 5 Dan Kenigsberg 2018-07-24 19:18:50 UTC
*** Bug 1607884 has been marked as a duplicate of this bug. ***

Comment 7 Petr Kubica 2018-07-31 11:18:21 UTC
I reproduced it again:
1) Installed clean Sat5
2) synced repositories for RHV4.1
3) Installed rhel 7.5 and registered within Sat5
4) Installed RHV 4.1
5) Added repositories (manually for 4.2)
6) Updated:
...
---> 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
...

7)
# yum repolist
Loaded plugins: product-id, rhnplugin, search-disabled-repos, 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'

Comment 10 Dan Kenigsberg 2018-07-31 13:41:24 UTC
Petr, please retry with the proper version that is included in the erratum (pyOpenSSL-17.3.0-4.el7ost)

Comment 11 Petr Kubica 2018-07-31 13:56:57 UTC
Verified with latest 4.2.5-5
---> Package pyOpenSSL.x86_64 0:0.13.1-3.el7 will be obsoleted
---> Package python2-pyOpenSSL.noarch 0:17.3.0-4.el7ost will be obsoleting

# yum repolist (working)
Loaded plugins: product-id, rhnplugin, search-disabled-repos, versionlock
This system is receiving updates from RHN Classic or Red Hat Satellite.
...

Comment 13 errata-xmlrpc 2018-07-31 17:52:09 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/RHEA-2018:2329


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