Description of problem: During invocation of a simple func call, I receive error "HTTPS instance has no attribute 'getresponse'" Version-Release number of selected component (if applicable): func-0.27-1.fc14.noarch certmaster-0.27-1.fc14.noarch How reproducible: Simply running 'func <HOST> call system ls' causes the error. Steps to Reproduce: 1. yum install func-0.27-1 (certmaster will automatically install) 2. service certmaster start 3. service funcd start 4. func <HOST> call system ls Actual results: {'<HOST>': ['REMOTE_ERROR', 'exceptions.AttributeError', "HTTPS instance has no attribute 'getresponse'", ' File "/usr/lib/python2.7/site-packages/func/overlord/client.py", line 860, in process_server\n retval = getattr(conn, meth)(*args[:])\n File "/usr/lib64/python2.7/xmlrpclib.py", line 1224, in __call__\n return self.__send(self.__name, args)\n File "/usr/lib64/python2.7/xmlrpclib.py", line 1570, in __request\n verbose=self.__verbose\n File "/usr/lib64/python2.7/xmlrpclib.py", line 1264, in request\n return self.single_request(host, handler, request_body, verbose)\n File "/usr/lib64/python2.7/xmlrpclib.py", line 1294, in single_request\n response = h.getresponse(buffering=True)\n']} Expected results: Return results of 'ls' command on <HOST> Additional info:
Clint found bug #619276 which seems to be the exact same issue for koji (these seem to be python 2.7 compat issues). The SSLConnection.py patch at https://fedorahosted.org/koji/changeset/7876bc06fe9151fb521409c2e8f6a3535e1eacfe should be applied to SSLConnection.py in certmaster in order to properly emulate the socket interface. To get func running, I also needed to replace SSLCommon.HTTPS with SSLCommon.HTTPSConnection in func/overlord/sslclient.py. I'm not sure how this affects compatibility for python <2.7 - perhaps there are some hints about this in the koji bug.
This is the equivalent patch to the koji/ssl/XMLRPCServerProxy.py patch applied to koji: diff --git a/func/overlord/sslclient.py b/func/overlord/sslclient.py index 16bd40f..3f49e1a 100644 --- a/func/overlord/sslclient.py +++ b/func/overlord/sslclient.py @@ -23,7 +23,11 @@ class SSL_Transport(xmlrpclib.Transport): # Yay for Python 2.2 pass _host, _port = urllib.splitport(host) - return SSLCommon.HTTPS(_host, int(_port), ssl_context=self.ssl_ctx, timeout=self._timeout) + if hasattr(xmlrpclib.Transport, 'single_request'): + cnx_class = SSLCommon.HTTPSConnection + else: + cnx_class = SSLCommon.HTTPS + return cnx_class(_host, int(_port), ssl_context=self.ssl_ctx, timeout=self._timeout) class SSLXMLRPCServerProxy(xmlrpclib.ServerProxy):
Fix works for me. Was applied to func upstream: https://fedorahosted.org/func/changeset/aa95dc473df1ac987dee1aefe4c8947e4eb00d50 @Seth: please create a package in updates-testing with this patch.
Also, this corresponding changeset needs to be applied to certmaster, and a new certmaster package needs to be created in updates-testing as well: https://fedorahosted.org/certmaster/changeset/c11b1babbe56144f39212e4b453c4519e0521ca6
updates-testing now has a pkg for certmaster and func which, I believe, handles this. I know that both are working on f14/python 2.7
this bug affects fedora F15 - func-0.27-2.fc15.noarch
Seconded on it not working on F15.
This message is a notice that Fedora 14 is now at end of life. Fedora has stopped maintaining and issuing updates for Fedora 14. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At this time, all open bugs with a Fedora 'version' of '14' have been closed as WONTFIX. (Please note: Our normal process is to give advanced warning of this occurring, but we forgot to do that. A thousand apologies.) Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, feel free to reopen this bug and simply change the 'version' to a later Fedora version. Bug Reporter: Thank you for reporting this issue and we are sorry that we were unable to fix it before Fedora 14 reached end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged to click on "Clone This Bug" (top right of this page) and open it against that version of Fedora. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping