Bug 912882
Summary: | rhn-migrate-classic-to-rhsm fails to connect with xmlrpclib error when going through a proxy. | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Alex Wood <awood> | ||||
Component: | subscription-manager | Assignee: | Alex Wood <awood> | ||||
Status: | CLOSED WONTFIX | QA Contact: | IDM QE LIST <seceng-idm-qe-list> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 5.10 | CC: | bkearney, jgalipea, jsefler | ||||
Target Milestone: | beta | ||||||
Target Release: | 5.10 | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2013-05-10 15:25:54 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 840995, 920191 | ||||||
Attachments: |
|
Description
Alex Wood
2013-02-19 22:09:18 UTC
This bug is closely related to bug #619276. To paraphrase David Malcolm in comment 11 of that bug: The xmlrpclib Transport.request() (in Python 2.7 request() delegates calls to single_request()) method calls make_connection() which returns a connection object (httplib.HTTP prior to 2.7 and httplib.HTTPConnection in 2.7) Eventually a call is made on the object returned from make_connection(). Python's xmlrpclib has changed from calling getreply() to getresponse() in r73638 [1] [2]. httplib.HTTP does not have a getresponse() method. It does have a getreply() method (which delegates to an underlying connection instance's getresponse(), with some wrapper logic). Since we were overriding make_connection() and returning an httplib.HTTP object, we broke when xmlrpclib in 2.7 tried to call getresponse(). The fix is to discriminate between 2.7 and earlier versions. I have elected to do that by looking for the single_request() method which doesn't exist in pre-2.7. This technique is the same as the one used by koji in commit 7876bc06 [3]. [1] http://svn.python.org/view?view=rev&revision=73638 [2] http://svn.python.org/view/python/trunk/Lib/xmlrpclib.py?r1=73638&r2=73637&pathrev=73638 [3] http://git.fedorahosted.org/cgit/koji/commit/?id=7876bc06fe9151fb521409c2e8f6a3535e1eacfe This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux release for currently deployed products. This request is not yet committed for inclusion in a release. This bug should be fixed as a side effect of fixing bug 885130 since we are no longer using xmlrpclib. Created attachment 746210 [details]
A fix for this issue
A fix for this issue for posterity's sake.
|