Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1581424 - Yum Broken on RHEL 7.5 host registered to Satellite 5.7 with rhnreg_ks
Yum Broken on RHEL 7.5 host registered to Satellite 5.7 with rhnreg_ks
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: rhnlib (Show other bugs)
7.5
x86_64 Linux
unspecified Severity urgent
: rc
: ---
Assigned To: Tomáš Kašpárek
Red Hat Satellite QA List
:
Depends On: 1580531 1583809 1583810
Blocks:
  Show dependency treegraph
 
Reported: 2018-05-22 14:01 EDT by Benjamin Schmaus
Modified: 2018-07-18 02:03 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-06-08 07:08:51 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Benjamin Schmaus 2018-05-22 14:01:09 EDT
Description of problem:

When performing a yum update rhnlib was updated from:

    Updated     rhnlib-2.5.65-2.el7.noarch                                        @anaconda/7.1
    Update             2.5.65-7.el7.noarch                                        @rhel-x86_64-server-7

This seems to cause problems with the latest version of python-pyOpenSSL, resulting in the following error when attempting to run yum commands:

[root@716188-lab3-director rhn]# yum history
Loaded plugins: product-id, rhnplugin, search-disabled-repos, subscription-manager
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 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'

Packages:

rhnlib-2.5.65-7.el7.noarch
python-pyOpenSSL-16.2.0-3.el7ost.noarch

The issue seems to be at line 149 of the file /usr/lib/python2.7/site-packages/rhn/SSL.py:

    146         # for Python 2
    147         else:
    148             if self._connection.state_string() == 'SSL negotiation finished successfully':
    149                 self._connection.shutdown()

Changing the line to use the "Python 3" method of get_state_string resolves the issue.


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

How reproducible:
100% when using Satellite 5.7 and rhnreg_ks.

I was unable to reproduce the issue when using CDN and subscription manager registered host.

Steps to Reproduce:
1.Register host via rhnreg_ks to Satellite 5.7
2.Yum upgrade from RHEL 7.3 to RHEL 7.5
3.Yum now broken

Actual results:
Yum outputs traceback

Expected results:
Yum should work

Additional info:
Comment 6 Tomas Lestach 2018-06-08 07:08:51 EDT
Based on Comment 5 and the fact the issue is being addressed in OpenStack I'm closing the BZ NOTABUG.
Comment 7 Colin Coe 2018-06-14 01:18:44 EDT
I'd like to add a 'me too' on this.  I just built a bunch of RHV-H nodes and now I can't register them in Satellite v5.7

I'm at a loss as to how OpenStack is going to help.
Comment 8 Tomáš Kašpárek 2018-06-27 10:05:17 EDT
Just for your information, fix done by Openstack has been shipped live: https://bugzilla.redhat.com/show_bug.cgi?id=1583810

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