Red Hat Bugzilla – Bug 1546351
A RHEL-7.5 client host cannot rhnreg_ks to a Satellite 5 server through a proxy
Last modified: 2018-05-17 12:02:41 EDT
Description of problem: The recent change in python-libs-2.7.5-66 to address bug 1483438 has broke rhnreg_ks ability to register to a Satellite 5 server through a proxy. Note... The following package combination from compose RHEL-7.5-Snapshot-3.1 was not a problem. python-libs-2.7.5-65.el7.x86_64.rpm rhnlib-2.5.65-7.el7.noarch.rpm The following package combination from compose RHEL-7.5-Snapshot-4.0 causes the traceback seen in the reproducer steps below. python-libs-2.7.5-66.el7.x86_64.rpm rhnlib-2.5.65-7.el7.noarch.rpm Version-Release number of selected component (if applicable): [root@hp-dl380pgen8-02-vm-2 ~]# rpm -q python-libs python-libs-2.7.5-66.el7.x86_64 [root@hp-dl380pgen8-02-vm-2 ~]# [root@hp-dl380pgen8-02-vm-2 ~]# rpm -q --changelog python-libs | grep 2.7.5-66 -A2 * Fri Feb 09 2018 Charalampos Stratakis <cstratak@redhat.com> - 2.7.5-66 - Fix https connections behind a proxy. Resolves: rhbz#1483438 [root@hp-dl380pgen8-02-vm-2 ~]# rpm -q --whatprovides /usr/lib/python2.7/site-packages/rhn/connections.py rhnlib-2.5.65-7.el7.noarch [root@hp-dl380pgen8-02-vm-2 ~]# rpm -q --whatprovides `which rhnreg_ks` rhn-setup-2.0.2-21.el7.noarch How reproducible: Steps to Reproduce: Configure /etc/sysconfig/rhn/up2date to use a valid proxy server when registering to a valid Sat5 server (steps not shown) [root@hp-dl380pgen8-02-vm-2 ~]# rhnreg_ks --serverUrl=https://rhsm-sat5.usersys.redhat.com/XMLRPC --username=rhsm-client --password=REDACTED --profilename=rhsm-automation.hp-dl380pgen8-02-vm-2.lab.bos.redhat.com --force --norhnsd --nohardware --nopackages --novirtinfo An error has occurred: <type 'exceptions.AttributeError'> See /var/log/up2date for more information [root@hp-dl380pgen8-02-vm-2 ~]# [root@hp-dl380pgen8-02-vm-2 ~]# tail -f /var/log/up2date [Fri Feb 16 15:33:39 2018] up2date Traceback (most recent call last): File "/usr/sbin/rhnreg_ks", line 218, in <module> cli.run() File "/usr/share/rhn/up2date_client/rhncli.py", line 96, in run sys.exit(self.main() or 0) File "/usr/sbin/rhnreg_ks", line 90, in main rhnreg.getCaps() File "/usr/share/rhn/up2date_client/rhnreg.py", line 248, in getCaps s.capabilities.validate() 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 147, in request connection = self.get_connection(host) File "/usr/lib/python2.7/site-packages/rhn/transports.py", line 327, in get_connection trusted_certs=self.trusted_certs) File "/usr/lib/python2.7/site-packages/rhn/connections.py", line 202, in __init__ password, timeout=timeout) File "/usr/lib/python2.7/site-packages/rhn/connections.py", line 120, in __init__ self._set_hostport(host, port) <type 'exceptions.AttributeError'>: HTTPSProxyConnection instance has no attribute '_set_hostport' Actual results: above Expected results: successful registration using a valid proxy Additional info: Patch https://bugzilla.redhat.com/attachment.cgi?id=1392607 from bug 1483438 appears to have removed '_set_hostport' thereby breaking client tools like rhnreg_ks.
John, thank you for letting us know. Adding more people to CC of this BZ. Is it possible to keep _set_hostport() available for compatibility reasons? It can be simplified, but it shouldn't be removed. I feel such interface shouldn't change between RHEL minor versions, as there may be many tools relying on that, like e.g. the registration piece for Satellite 5.
We'll see if it can be re-added. In the future, use of private APIs should really be coordinated with maintainers, so a proper API can be added for the use case.
I patched Python to bring the old private API back, so _set_hostport() should work once again. Build: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=15336311 x86_64: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=15336313 Could I ask you, John, to test if this fixes your issue or help me setup a system so I can reproduce and test myself? IMPORTANT: If we want to get this into RHEL 7.5, the deadline is this Wednesday.
Changing status to VERIFIED based on John's comment.
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-2018:0833